From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E862CD80A1 for ; Tue, 10 Oct 2023 10:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbjJJKaG (ORCPT ); Tue, 10 Oct 2023 06:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjJJKaD (ORCPT ); Tue, 10 Oct 2023 06:30:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA3C9E for ; Tue, 10 Oct 2023 03:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696933756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aJzuP/A/bgFUoe/uV4FgEOUmqz0biBzCtHevaK0fOw4=; b=WvaY5AcLQPQb6y/dwWBHc3dgAIGAzV8Rj/m3fKZA0dtYub9zSF7taG0eUvTFmLYynK7T8n MKMQ7U3RiNdNC0WJ62STg+f8wgfWRo6ghlTnvxsXfjhHy0Wd9/StcD8GRQ0VrWKK0tOgCa 6N9x3wY2bNLPlAvbSqQrqI5Q79WBWUo= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-227-RCquY-SdM4a8_cmJaEy7JQ-1; Tue, 10 Oct 2023 06:29:05 -0400 X-MC-Unique: RCquY-SdM4a8_cmJaEy7JQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-9ae56805c41so134637966b.0 for ; Tue, 10 Oct 2023 03:29:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696933744; x=1697538544; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aJzuP/A/bgFUoe/uV4FgEOUmqz0biBzCtHevaK0fOw4=; b=WcRarjxcZcb6dsZ0Cop0/Tbo5itXimEBhj807CdfRG8vG8oPtI7cqqWBq5WKFlhr17 BsQoLjAROzICGHkvfsNKzv+FHbQ26m5hCgH8v4oJzgrSN7giF4QCtigDCQGoqNanpiby 1SWgplQWY9b2BvBZQWtJaKx7+XmbDwlgNMrm2YdW9mUf8y1f3oTzkzVbTxoG9v8xjoyb c6CVtqReR/7Jngpgzb8OYi8qhfnOr6QzFr9e8TsCg3lR3YwWNmVaKTYd62hpk6tFOGx7 v+XKiynhpL1vj/vJqh/GgsJsZZ4Hm/QoTQIbFqz9j7ZYJRkP56Z3+dY2Di+co3zON/+X 8INw== X-Gm-Message-State: AOJu0YweVo7Ak0pYkqfB2ygxjvBAn1iiNDQ76TgU/F3+wKgtqHTUyw1U rewAjpd3qcgU9f8LTEf32Vu3p+brIA2vZeLhmyIOBU+x+dd0hCqC5zvhYO8u1l9iM02nPLzUGVh 2uINWuZxf11q2FxiCYkMZ7pqv X-Received: by 2002:a17:907:6d1d:b0:9b9:e641:a978 with SMTP id sa29-20020a1709076d1d00b009b9e641a978mr14820642ejc.2.1696933743930; Tue, 10 Oct 2023 03:29:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8HfWaJOeH6Nh0P9k0lFK1hWlbSTQAqhc5rATKQ4TBHmB5waU8bEDQP4QKKK6bkaoktpmWyg== X-Received: by 2002:a17:907:6d1d:b0:9b9:e641:a978 with SMTP id sa29-20020a1709076d1d00b009b9e641a978mr14820617ejc.2.1696933743609; Tue, 10 Oct 2023 03:29:03 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-228-243.dyn.eolo.it. [146.241.228.243]) by smtp.gmail.com with ESMTPSA id ci24-20020a170906c35800b009a2235ed496sm8347645ejb.141.2023.10.10.03.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 03:29:03 -0700 (PDT) Message-ID: <2e7ee087b33fba7e907c76e60d9eaed1807714e2.camel@redhat.com> Subject: Re: [PATCH net 3/4] selftests: openvswitch: Skip drop testing on older kernels From: Paolo Abeni To: Aaron Conole , netdev@vger.kernel.org Cc: dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Adrian Moreno , Eelco Chaudron Date: Tue, 10 Oct 2023 12:29:01 +0200 In-Reply-To: <20231006151258.983906-4-aconole@redhat.com> References: <20231006151258.983906-1-aconole@redhat.com> <20231006151258.983906-4-aconole@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: > Kernels that don't have support for openvswitch drop reasons also > won't have the drop counter reasons, so we should skip the test > completely. It previously wasn't possible to build a test case > for this without polluting the datapath, so we introduce a mechanism > to clear all the flows from a datapath allowing us to test for > explicit drop actions, and then clear the flows to build the > original test case. >=20 > Fixes: 4242029164d6 ("selftests: openvswitch: add explicit drop testcase"= ) > Signed-off-by: Aaron Conole > --- > .../selftests/net/openvswitch/openvswitch.sh | 17 ++++++++++ > .../selftests/net/openvswitch/ovs-dpctl.py | 34 +++++++++++++++++++ > 2 files changed, 51 insertions(+) >=20 > diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/too= ls/testing/selftests/net/openvswitch/openvswitch.sh > index 2a0112be7ead5..ca7090e71bff2 100755 > --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh > +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh > @@ -144,6 +144,12 @@ ovs_add_flow () { > return 0 > } > =20 > +ovs_del_flows () { > + info "Deleting all flows from DP: sbx:$1 br:$2" > + ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-flows "$2" > + return 0 The chunk above mixes whitespaces and tabs for indenting, please be consistent. Thanks! Paolo