Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp897888pxb; Tue, 1 Feb 2022 12:42:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkhVk1VuyeFXTHCwpmdQFrZHsqIhQx8/dy3v2/Tln4KboYy0AQ/Y0vvv6+hkSQ2XtUo39X X-Received: by 2002:a17:907:728b:: with SMTP id dt11mr22030126ejc.70.1643748175622; Tue, 01 Feb 2022 12:42:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748175; cv=none; d=google.com; s=arc-20160816; b=KkDEPR0cI+ptTbQzr4NSUgtKKtSzdsFuwjCKfTxcqOCcwqCSv5xXxdhZUJyacu9HA5 oAkrpwW0wz2x+MvqWzIItHR5+Mkc5pqlbpVeyh1xb1Ah9rURmUsJPmqx2tsdnKP75R4J WIFGxIhZ6Z70Tq5Iezc8lT5A8mcE8UbZaImefM2hOdrZD3K4jylfUGIpGKyxsDEs27R3 W7s9Pzc9sJULasLAimCYO9p4aZOhISg4fGxmp9nRr1vRD5HdvPSupZqzIxQPTXU1L3ht iciJUq5y1zzC+M80Qj9Ojn5WBmR0valTZzShRfbSgeHC2pplsp6gcRBQY+OCy/LaY7YF 2DCQ== 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=oi9yvU3XKTdc5uhXdMEKWVeiea3s3v3BWMJvFWzqoII=; b=Mgv0wsov0b3ktuzSHOslgSFAIx3YYXpc7zMO7eKEUMBxSj1LWqFrEVRaEffIy15ciA 6lTLzhMwxQcHFZQfZTl8wNA/j0+rh/hQfC9zIwUm0sTVAlljoFkYqYBohvy0cJ90tmJE xKIpwijd7EpXMcFxgQllKuTZBz5y+sBFltotjXUknQ4kCCES0HIbYq1qi/FmbNYqTWzO S2tGAR+KX0oXqUajp46rWIQzXbKZIEV4SF/XalGFhaTTXDhdKjq4brh7m6jEBYNNcyzg VJDN+iUnmq1HEM4QDdPTct0sKTbJIwmLxQU0/jeLd0i1woRNi5NHvlUq3QmDhUUCP/Nc jbhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=TAh0C2wl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si9183504eju.755.2022.02.01.12.42.30; Tue, 01 Feb 2022 12:42:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@waldekranz-com.20210112.gappssmtp.com header.s=20210112 header.b=TAh0C2wl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379869AbiAaPr2 (ORCPT + 99 others); Mon, 31 Jan 2022 10:47:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379824AbiAaPrN (ORCPT ); Mon, 31 Jan 2022 10:47:13 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68070C06173E for ; Mon, 31 Jan 2022 07:47:12 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id c15so19954218ljf.11 for ; Mon, 31 Jan 2022 07:47:12 -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=oi9yvU3XKTdc5uhXdMEKWVeiea3s3v3BWMJvFWzqoII=; b=TAh0C2wliAYjMd4G1rAPxd/DFTr3IOIZa1naAEywf9trhKvRPRrNYFhN+R2+nFtnnf 9dC8Fxiv09pGPLaUC7kv4Qb2jWaeOUFfpc8zhviw7bSWy2EnvMVIF5MFFheCw4LFob7N BqX9W2bCzfIa2Am3hkOr5nYSbkC/Eo1kNXWPBX0XHfFv0jBNvqo5KhFG8JmVtGZVd52A ih8KTtrXhhbTtizICgog7Kk9GEE8DO/PS8PL8eBKnXwCaYRRzuHoEA4aDHDwmZ3rnh0s Y0dR6NwKUGZnj+JSbwOXd+fJfs/2jclqvGudIcMNoCTfrKiMoNEfNN/Xbu1JkCAf6oKp ApSg== 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=oi9yvU3XKTdc5uhXdMEKWVeiea3s3v3BWMJvFWzqoII=; b=JC0yFkZ1hEqC+ozuctiEkeaQXnWLcJm52L8Wane9/B5mnZW8XHjLTqldVjikDZC8Nr qXUBZC43p1KohYBu7x6WP/ZRZiu+JFl5QrwYi0wkcum3csFQNIKTc1cyhppvUY8rTiJ+ XOH68OeZA0BfcybJLoiG9Po5VhK70spqTqvwie74rNiKp9VsFIUlz+vso6pz7G7BqR7m PcB4UoEYkMh0iZN71JzIuODGac9MVM1no5dYKMqY3o+F/QdZh8eU+vQMsc+R6qsoGp62 fIhD1VNuQB2AQh+L/QYuexgjsFnqsANAWP61yWMwwV7ye8rkZSE8shUgGtfG70vE6HWr 4+Yw== X-Gm-Message-State: AOAM530GNM8H7zsB2h4T1Qwyqh6LsIqIOjE7QaeA4voTEJhPQlK2Vx/M sPzs17OlyjSUeMXi0xlYneZdkA== X-Received: by 2002:a2e:9d96:: with SMTP id c22mr10537327ljj.293.1643644030741; Mon, 31 Jan 2022 07:47:10 -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 y36sm3374769lfa.82.2022.01.31.07.47.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 07:47:10 -0800 (PST) From: Tobias Waldekranz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Shuah Khan , Ido Schimmel , Amit Cohen , David Ahern , Hangbin Liu , Stephen Suryaputra , Petr Machata , Florian Fainelli , Vladimir Oltean , Guillaume Nault , Po-Hsu Lin , Danielle Ratson , Baowen Zheng , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 5/5] selftests: net: bridge: Parameterize ageing timeout Date: Mon, 31 Jan 2022 16:46:55 +0100 Message-Id: <20220131154655.1614770-6-tobias@waldekranz.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com> References: <20220131154655.1614770-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 --- 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