🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15439

Re: [PATCH net-next 2/2] selftests: bonding: Add a test for 802.3ad with coupled control disabled

#15439
From: netdev-bot+sashiko
Date: Thu, 12 Nov 2026 20:21
152 lines
13039 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The bonding selftest config fragment
  (tools/testing/selftests/drivers/net/bonding/config) now asks for…
- [Low] In bond_lacp_independent_control.sh, collecting() reads the total
  packet count of the bond1 ingress ICMP echo-request filter (handle…

--

selftests: bonding: Add a test for 802.3ad with coupled control disabled

This adds a VRF based selftest which checks that a bond port with
coupled_control off receives packets in COLLECTING state. It keeps the
port in COLLECTING state by clearing the Collecting bit in received
LACPDUs, and then checks that ping works in DISTRIBUTING state. The
bonding selftest config fragment gains the VRF, pedit and policy routing
options the test needs.

> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_lacp_independent_control.sh b/tools/testing/selftests/drivers/net/bonding/bond_lacp_independent_control.sh
> new file mode 100755
> index 0000000000000..c29712e01e49e
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_lacp_independent_control.sh

[ ... ]

> +h1_create()
> +{
> +	adf_ip_link_add bond1 type bond mode 802.3ad lacp_rate fast \
> +		coupled_control off
> +	adf_ip_link_set_master "$h1" bond1
> +	adf_simple_if_init bond1 192.0.2.1/28
> +
> +	tc qdisc add dev "$h1" clsact
> +	defer tc qdisc del dev "$h1" clsact
> +
> +	tc qdisc add dev bond1 clsact
> +	defer tc qdisc del dev bond1 clsact
> +
> +	tc filter add dev bond1 ingress pref 1 handle 101 proto ip \
> +		flower skip_hw src_ip 192.0.2.2 dst_ip 192.0.2.1 \
> +		ip_proto icmp type 8 action pass
> +	defer tc filter del dev bond1 ingress pref 1 handle 101 flower
> +}

[ ... ]

> +collecting()
> +{

[ ... ]

> +	ping_do bond2 192.0.2.1
> +	pkts=$(tc_rule_handle_stats_get "dev bond1 ingress" 101)
> +	((pkts >= PING_COUNT))
> +	check_err $? "Packets not received in COLLECTING state"

[Severity: Low]
Can this check pass when no packets were received in COLLECTING state?

The bond1 ingress filter with handle 101 is installed once by
h1_create() from setup_prepare(), outside the per-test defer scopes, so
its counter keeps growing across tests. collecting() compares the
absolute counter with PING_COUNT and does not take a baseline before
ping_do.

tests_run() in net/lib.sh iterates over ${TESTS:-$ALL_TESTS}. Take
TESTS="distributing collecting" as an example:

distributing()
    ping_do bond2 192.0.2.1    <- PING_COUNT echo requests hit filter 101
collecting()
    port moved to COLLECTING state
    ping_do bond2 192.0.2.1    <- nothing received without the fix
    pkts >= PING_COUNT         <- still true from the earlier test

The same thing happens if collecting is listed twice. The default
ALL_TESTS order runs collecting first, so the default run is not
affected.

Since the ping_do return value is ignored here, this counter is the only
check of the fix. Would it make sense to read the counter before ping_do
and check the delta, or to create the filter inside collecting() with a
matching defer?

> +
> +	log_test "Receive in COLLECTING state"
> +}

[ ... ]

> diff --git a/tools/testing/selftests/drivers/net/bonding/config b/tools/testing/selftests/drivers/net/bonding/config
> index b62c707152930..71c6d69d98a18 100644
> --- a/tools/testing/selftests/drivers/net/bonding/config
> +++ b/tools/testing/selftests/drivers/net/bonding/config

[ ... ]

> @@ -15,7 +19,9 @@ CONFIG_NETCONSOLE_DYNAMIC=y
>  CONFIG_NETCONSOLE_EXTENDED_LOG=y
>  CONFIG_NETDEVSIM=m
>  CONFIG_NET_IPGRE=y
> +CONFIG_NET_L3_MASTER_DEV=y
>  CONFIG_NET_SCH_INGRESS=y
> +CONFIG_NET_VRF=y

[Severity: Low]
Should this fragment also enable CONFIG_IP_ADVANCED_ROUTER=y and
CONFIG_IP_MULTIPLE_TABLES=y?

NET_VRF depends on IP_MULTIPLE_TABLES in drivers/net/Kconfig:

config NET_VRF
	tristate "Virtual Routing and Forwarding (Lite)"
	depends on IP_MULTIPLE_TABLES
	depends on NET_L3_MASTER_DEV
	depends on IPV6_MULTIPLE_TABLES || IPV6=n

and in net/ipv4/Kconfig, IP_MULTIPLE_TABLES depends on IP_ADVANCED_ROUTER
and has no default:

config IP_MULTIPLE_TABLES
	bool "IP: policy routing"
	depends on IP_ADVANCED_ROUTER

The patch adds the NET_L3_MASTER_DEV and IPV6_MULTIPLE_TABLES
dependencies but not the IPv4 ones. If the fragment is merged onto a base
config that lacks them, Kconfig silently drops NET_VRF. arm64 defconfig
is one example: it sets neither symbol, while x86_64_defconfig sets both.

In that case setup_prepare()->adf_vrf_prepare()->vrf_prepare() runs:

	ip -4 rule add pref 32765 table local

which needs IPv4 policy routing, and adf_simple_if_init() cannot create
the VRF devices. The test then fails during setup and never exercises the
bonding change.

Several other net selftest fragments have the same gap, while
net/mptcp/config lists IP_MULTIPLE_TABLES explicitly.

>  CONFIG_NLMON=y
>  CONFIG_VETH=y
>  CONFIG_VLAN_8021Q=m

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111171947.2816258-1-idosch%40nvidia.com
Technical Details
Message-ID: <179451491828.2199510.10600083511159752831@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362197-linux-kernel-netdev=dewy.ru
References: <20261111171947.2816258-2-idosch@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362197-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 2/2] selftests: bonding: Add a test for 802.3ad
 with coupled control disabled
Date: Thu, 12 Nov 2026 20:21:58 +0000
Organization: Usenet Network
Message-ID: <179451491828.2199510.10600083511159752831@kernel.org>
References: <20261111171947.2816258-2-idosch@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1205487"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ZIQ1IniQ9xMN/WgKOUCnNTcucSo= sha256:/7xIqOtSvDYvee7J+BdJedUdthjiViuQR9Os69lcMGY=
	sha1:ZNCMPz4PHrWRTKQqVwjd8/wSHwE= sha256:zIGVtumGut4AMIGJkTp4KajbwQ4cXUSQa1Z+aSUuUt0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 043551143CB; Fri, 13 Nov 2026 02:32:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id nm7cb3G6Maeq;
	Fri, 13 Nov 2026 02:32:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362197-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 9150811400C; Fri, 13 Nov 2026 02:31:54 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 25518147B8A; Thu, 12 Nov 2026 20:22:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794514920;
	b=C53jL5/L1mf8BdKWpwt6swqcnJOR2uEPZfbG/mLli5eaCi3Uqu5NYC2DvwEHYxYljpJF
	 9psNqRXVbotWgdnKqjmMJEreswA3pGj1ISOAqWW8WswmJfD50YdIyfZnrC7lL8TfuMRco
	 dr8gTPViPtjvPFY24aTyT9XS+iBYe2FePnKYvmDOs9MkReOcsB1S+H1DsMvume949YiO3
	 bLFoMopCaWHf9CTc1OssM2jwFfh2HNPq9MTFLYD9qC2KKJUnjVEawmlaTTG31d2gJZCnn
	 DgwTkEoH+tMDzjY7DbTH0g3gWx0oC6lq0onu030IBSY+hu3rbEI+iJA9ONuhWhYU4iA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794514920;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=xQLMtJSqy8FG262aA8N0q0Rpw5hd52l2f1OMCg367UM=;
	b=jFMd1XH8m9Nzf2zTQ8clY3X8NxBIaZzwDdPTQ67B5X/MVATyzG5SuLYWJ7zyJXU/CMtp
	 /6V0Di36HXaybOz5L7pUarpde3Joc1SqzO0sYP+0hbD1H/CmNUS994FLn9aJHbClLLgcp
	 Wv8X1fIOL6ngsLpGUTehhUJlF7ulhrRIz4fWXNMIMcHYI9AzEpjUdch6L/KgRD5xA97xu
	 t4Z7FycyG74L8K8cMGr42Q/Eic3G4aJip7MVTTKwSPEuGrRgsm2hsv2+lWT75y10LSG0/
	 9fwSUCqxXzy4RGKwVF6TQt6rhwuYHczE87DGCdHULbzENho7kE28rPVdKFY7ek+8Qfw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NH1RaPMK;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 9084B606A886;
	Thu, 12 Nov 2026 20:22:00 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NH1RaPMK
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794514919;
	b=2tEulE0HDLtyX6YxuzKDScOCAlKNJM0NHWu15Xy0VqoIptjd9SDwqnzivE7kWZVmeSxs
	 BH4ySC1yFIvHNWJCdyTiSL5kH18x4b2IHylE1ZIB6+MDabD1Fz4wPqu/lfpIpBGOsdZQC
	 98JMFJ7vPlQaNlAmLyZDO3YWeLa3vH9fC8rzQDpg9IAqgRpOY1iyBXmAz5+WUaYidc0Pe
	 K1FOucOIezfhkbc8vJq/2pfS7wti1x4IHct0ODQ0RlYOkMFUq8a5X2y6EmcVK3WqmSvkR
	 Uz27sAa49HkqdGRg+qE6FIvL6oYErq9lUmeEuie0oQHWOr+RF+LLdXPIZL7lj750C8g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794514919;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=xQLMtJSqy8FG262aA8N0q0Rpw5hd52l2f1OMCg367UM=;
	b=eWrL9yhxa3whb2t18OphdA3xa/aU9yo7wJh/47fzo+cL20v21yeKeGyuB6ExprGHQbrI
	 TX1TFBZmVXVS2KQLoHOZXPxRdlqOzIShKwLftv5+c4d1YzqA1CZCV8nrRnwz5qfcf/Pfm
	 rT9G1KHIGYJRRokRED5zEIl0k3gR6mfZXSmSxdg6xfZEkapsN7N4U5gRorAj8820XNCkn
	 r876q2iuwBHZMxkxU+F7n3d20OxveQU6yeOp0xkiRpMfUnYX02WQINiyDEbmnfUpLmU8J
	 W+GehyvWajozMfWMhNXGP+R6sf2rphstbMne+yeWwpxTjhX5qLYk0XDTzNIzLBth8tg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NH1RaPMK;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD112606A882
	for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 20:21:59 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0FD81F000C4;
	Thu, 12 Nov 2026 20:21:58 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794514919;
	bh=xQLMtJSqy8FG262aA8N0q0Rpw5hd52l2f1OMCg367UM=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=NH1RaPMKN1Qy+y/kj112SpA+0zj+M1t55Rvl7oYZkjnC8fEs1w0YjPGjJ6yuZ0Pfz
	 6rQ6kDULnacLIcRMdLQ50g0WtjRDAbB8iTO4wTgLJ9yUIjylVm8H6IjFnLSmPOSaxy
	 RBlOYSDnHuEjWNurk5X0tPCEb3BJe0kGVYPj8Pwp7TL7vPxKqDdViVZ+gVuQGK1GQL
	 CxKzMclGVMUWqJ3AYA6YU4/wwCm0ICKHKU40WkfKle/pMwUIF+hgO74KUNPCBNWB9x
	 wEHNJFybaxWgNF1gP60X95g8+1+OpbpYEyL54dbE0uxyprsJ7e+SaFNmd5eGHeLt27
	 TsJQxbTm+GBYg==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
 pabeni@redhat.com, edumazet@kernel.org, jv@jvosburgh.net,
 andrew+netdev@lunn.ch, razor@blackwall.org, aahila@google.com
X-In-Reply-To: <20261111171947.2816258-2-idosch@nvidia.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list