Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2463126pxb; Thu, 3 Feb 2022 07:13:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0aShLNI9xziFGRqb9GcA0hS77tEMR+cPpNkU52re1rnaq2Fq5xblcDolIodB9aJhzNO/R X-Received: by 2002:a05:6402:510e:: with SMTP id m14mr35635355edd.39.1643901182493; Thu, 03 Feb 2022 07:13:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643901182; cv=none; d=google.com; s=arc-20160816; b=CQbd9ZonZFQxB0/9yzlgJupcO8RuWzJgP/Tugjm6ibEjZDiBVzne4vXoRwm0nGTtWg olz5oyxyI98aJux1zSatoK3kRb5hLhgWHhFpY7StRm0F+tqBlSkhbTbpogf+l5wwLR7x 6Aa2SyJig1sGLaq2on/xxbZO7YoRnwSpfp5lF8lR5+z6r3P7Z6jB2I+o/GzcjZCdjqyK 4S0wJpRJSLlYSy17XiMkEzuGjmz5it0vaxRTSMTzNJnEpmYSs7eKmN0Gr3bROO45sraF +QubpJLjtPJ+K9aJehhLcQ2knmaS0LmKMNHYuwblwUTxUKG+tab1oIwt6GqRIVWQBjTJ AZdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o3foges394i2Torrv4y+TkfDP2u0wbyz9Waj/q2IzPs=; b=TPLZVoIfO82oTAZr/gv2mzWxLl8Qtu1DNw/L96mz6VUaoLA/Q2cwoeI5wvynbCyZvQ 3w8WSIarXJwIe88n3WgqGOzfuI6P8JxEJtTOcjiayzaPo6klu7h0Z8ToXu0y+Xr1lHPO G/rToRHJvLxxMhc7nbVd8RTCiND03VM0elAEEaZdYEqtQnVD98dAQBBSSEr6TA5tThOc RLQOL+OD1ZUadF1OgrbulFDwOofDBn5CrH1IWeSO4eu4+QLjlaUV5J3r/WAFcW/5YYaV nq4O8lfHYPhJHS5KnPPODVVKkatDnpuuMRZOCA2GFRYH2jVhH5TmYd4Nlw7ez3nghZfY MaeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=YyabZF+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq3si15015966ejc.417.2022.02.03.07.12.36; Thu, 03 Feb 2022 07:13:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=YyabZF+b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350090AbiBCKRk (ORCPT + 99 others); Thu, 3 Feb 2022 05:17:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350055AbiBCKRN (ORCPT ); Thu, 3 Feb 2022 05:17:13 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A2AC06173B for ; Thu, 3 Feb 2022 02:17:13 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id r7so1563556wmq.5 for ; Thu, 03 Feb 2022 02:17:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=o3foges394i2Torrv4y+TkfDP2u0wbyz9Waj/q2IzPs=; b=YyabZF+bAVlRUnVwcDYtoiQuljWP8JdqwJ197sAprqEqfy3sUeWGBzBPvbwHfkl+yZ TkJGHXhhiT5XFU426aMqKd26Wm2OXpj189RZW8qlgUtSlUi+vhD9tCJOHGpTeKywBbKw HSJL167+DsD/m0oJweA4wrMli+DLoY+pvjeT+CvAIph+m6vRg61PadA+baeDyqBGbF8L Hx0rga7a23FFBBJMmTj1ZCIWyuMFPgZCPm9Fa5pznlV9aI0hcVw4YBPsSuOAhQsfAiBO 8ACnLygQxPst0fyQh2dJKFgePAomhNsXXXNmexztTCkC0vRhUvQpoQie/Nn9Ai2tkrsF eGiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=o3foges394i2Torrv4y+TkfDP2u0wbyz9Waj/q2IzPs=; b=CNiTk44/+S+KIoQfjurFQ31CaIqTkhwJmbgVycDFd8jMKGOtQ6wBV1M79ZRUJqnCq3 hC+WZ8n0JS+mWM7rLu892NOjvj8y8606/Le5vBPj7QDfcRBCIRokbx5oYSDvgQIvdfkN 3RmpKUv6AGVZzhOj/GApypLDgTL26st1MDw17mq8RcHzemiH5YVQTnrw8nK+juM44tOs uH8/pwwAMxFF404bo1s1+sjO2HoujdNoP4Ruct5esq2ymVVD8Kp3vhUf/qIm8hcrgx7S D/Z6sMBa0qkKaI4zu5o27TViZhFP7SS9o27pojI1HqhbLyNKfReT3e6p3bN/CGGQmM9l cH+g== X-Gm-Message-State: AOAM530rFh++QCKkAO9CRvD/NvIrell66+FKt3r9pdXzh+HjpSZwEZLY qNvuLiUcQDaI1b4TTOVID+CAlw== X-Received: by 2002:a05:600c:3392:: with SMTP id o18mr9769405wmp.59.1643883431935; Thu, 03 Feb 2022 02:17:11 -0800 (PST) Received: from veiron.westermo.com (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id g6sm19017148wrq.97.2022.02.03.02.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 02:17:11 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Petr Machata , Shuah Khan , Ido Schimmel , Stephen Suryaputra , Hangbin Liu , Amit Cohen , Guillaume Nault , Vladimir Oltean , Danielle Ratson , Po-Hsu Lin , Baowen Zheng , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next 5/5] selftests: net: bridge: Parameterize ageing timeout Date: Thu, 3 Feb 2022 11:16:57 +0100 Message-Id: <20220203101657.990241-6-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220203101657.990241-1-tobias@waldekranz.com> References: <20220203101657.990241-1-tobias@waldekranz.com> MIME-Version: 1.0 Organization: Westermo Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow the ageing timeout that is set on bridges to be customized from forwarding.config. This allows the tests to be run on hardware which does not support a 10s timeout (e.g. mv88e6xxx). Signed-off-by: Tobias Waldekranz Reviewed-by: Petr Machata --- tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh | 5 +++-- .../testing/selftests/net/forwarding/bridge_vlan_unaware.sh | 5 +++-- .../selftests/net/forwarding/forwarding.config.sample | 2 ++ tools/testing/selftests/net/forwarding/lib.sh | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh index b90dff8d3a94..64bd00fe9a4f 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh @@ -28,8 +28,9 @@ h2_destroy() switch_create() { - # 10 Seconds ageing time. - ip link add dev br0 type bridge vlan_filtering 1 ageing_time 1000 \ + ip link add dev br0 type bridge \ + vlan_filtering 1 \ + ageing_time $LOW_AGEING_TIME \ mcast_snooping 0 ip link set dev $swp1 master br0 diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh index c15c6c85c984..1c8a26046589 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh @@ -27,8 +27,9 @@ h2_destroy() switch_create() { - # 10 Seconds ageing time. - ip link add dev br0 type bridge ageing_time 1000 mcast_snooping 0 + ip link add dev br0 type bridge \ + ageing_time $LOW_AGEING_TIME \ + mcast_snooping 0 ip link set dev $swp1 master br0 ip link set dev $swp2 master br0 diff --git a/tools/testing/selftests/net/forwarding/forwarding.config.sample b/tools/testing/selftests/net/forwarding/forwarding.config.sample index b0980a2efa31..4a546509de90 100644 --- a/tools/testing/selftests/net/forwarding/forwarding.config.sample +++ b/tools/testing/selftests/net/forwarding/forwarding.config.sample @@ -41,6 +41,8 @@ NETIF_CREATE=yes # Timeout (in seconds) before ping exits regardless of how many packets have # been sent or received PING_TIMEOUT=5 +# Minimum ageing_time (in centiseconds) supported by hardware +LOW_AGEING_TIME=1000 # Flag for tc match, supposed to be skip_sw/skip_hw which means do not process # filter by software/hardware TC_FLAG=skip_hw diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 7da783d6f453..e7e434a4758b 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -24,6 +24,7 @@ PING_COUNT=${PING_COUNT:=10} PING_TIMEOUT=${PING_TIMEOUT:=5} WAIT_TIMEOUT=${WAIT_TIMEOUT:=20} INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600} +LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000} REQUIRE_JQ=${REQUIRE_JQ:=yes} REQUIRE_MZ=${REQUIRE_MZ:=yes} -- 2.25.1