From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796268214; b=NpOeH+GAymz469B5ZZhPnaTkmJOwQZEdlna6MS87NRpEBMD2ZNUZcr0uk2wegmk21YXg R7AmjTNSMDHAXZxM9xAwn2xl1sPY8+3NFYGg3qx9P+/CWGwm22scfTJqn/ObRtrzfqx4z gLfYP8VRltNHBb1edrTyuLZQG0dh9Kg7AFH0LCvJBmCXPVaCOmj5vG53g0Kc7jobTZlw2 XJ27Rely9qwLYet0kmWwEAD4s+j7uJyh3QP59rkv/rAabHzjYGH33dzABGMK+Yg5lo6V2 taL02sC8+s1O1qP9zA4QxlBd3wQ153hc07N1JC8mG7EN24OY6rPzp7qyhMsVq5fR7rw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796268214; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=RHuSdEGTiAL0rX9oMXGh0hpgKGtvX7t7NgH59mbgpq0=; b=PEtJF5SeDQ0i9w4kK4wLjPGSsMfsJLzM5yPDYIegueNWY0K9AdLMVHqV7Cw2r1WEX+Vz szx8RHvIAv+xer554S4BddOnINbgOO8lew9rMCMs4xWV6NaUY1bABB7qTImoAUtpSDyca 0nkDHbmZJ5/aFuO0dLQpVe1H6y1E2knuV8W4jiVI9WlgOKm2pEAKIphEfT70sERownCFU azrwRtaFo7HlhYHA4LwnDMT8nDCwWudUcPufL3ErfSfIGBzRsgHhtVn5naPEYTe0IPWwR AbTDjgh50mzk2jt5HQSk8g2zuV1zb31amSZ96oD+441dmx2iYQe45pphHJqcXq80FqQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hw5rN35q; arc=none smtp.remote-ip=95.215.58.47 Received: from mta1.migadu.com (out-47.mta1.migadu.com [95.215.58.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58A3E606A32D for ; Thu, 3 Dec 2026 03:23:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 58A3E606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hw5rN35q X-Envelope-To: netdev@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=8ci7PmxvTxeiWUWN32xqoBItcU5Ke/5bMx2gayBM288=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796268210; v=1; x=1796873010; b=hw5rN35qaB+bqTc/QB7/xKYfympwpL/9oiIPqlcq1OxEANCMOvLtsGuBLtveetRKGdmW8P8g Bu2j0lKhOKXaQu5ZDokvSlHBSztVpXa0AI/xn053w6Bb78dg4zzFRI/2TSLJKhmfPCzoi9bKVXj datlE+NOAKx6jYAKkWljZhQo= X-Envelope-To: netdev@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id 95673dcce7b3f8b3; Thu, 03 Dec 2026 03:23:30 +0000 X-Mizu-Trace-ID: 95673dcce7b3f8b3 X-Migadu-Flow: FLOW_OUT Date: Thu, 3 Dec 2026 11:23:18 +0800 From: Hangbin Liu To: ramses@well-founded.dev Cc: Jay Vosburgh , Andrew Lunn , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jiri Bohac , Eric Dumazet , Willem de Bruijn , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Nikolay Aleksandrov , Shuah Khan Subject: Re: [PATCH net-next 2/2] selftests: bonding: test that the ARP monitor keeps UP slaves when it starts Message-ID: References: <20261201-bonding-arp-reseed-v1-0-984d4a3991cb@well-founded.dev> <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> Hi Ramses, On Tue, Dec 01, 2026 at 12:20:30PM +0200, Ramses de Norre via B4 Relay wrote: > From: Ramses de Norre > > Add a test for the two ways the ARP monitor can start after the slaves > were enslaved: bringing the bond up after enslaving into it while it is > down, and setting arp_interval on a running bond that uses miimon. In > both cases the test waits longer than the arp_missed_max window before > the monitor starts, and checks that the primary stays active and that no > slave gets a link failure. > > Without the previous patch, both cases fail: the first monitor run takes > both slaves down and the bond comes back on eth1, where it stays with > primary_reselect=failure. > > Signed-off-by: Ramses de Norre > --- > .../testing/selftests/drivers/net/bonding/Makefile | 1 + > .../drivers/net/bonding/bond_arp_monitor_start.sh | 154 +++++++++++++++++++++ > 2 files changed, 155 insertions(+) > > diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile > index 46d9fede59185..12276c942506e 100644 > --- a/tools/testing/selftests/drivers/net/bonding/Makefile > +++ b/tools/testing/selftests/drivers/net/bonding/Makefile > @@ -6,6 +6,7 @@ TEST_PROGS := \ > bond-break-lacpdu-tx.sh \ > bond-eth-type-change.sh \ > bond-lladdr-target.sh \ > + bond_arp_monitor_start.sh \ > bond_ipsec_offload.sh \ > bond_lacp_independent_control.sh \ > bond_lacp_prio.sh \ > diff --git a/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh > new file mode 100755 > index 0000000000000..a718292172244 > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh > @@ -0,0 +1,154 @@ > +#!/bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Check that the ARP monitor does not take UP slaves down when it starts > +# after the slaves were enslaved. That happens when the slaves are enslaved > +# while the bond is down, or when arp_interval is set on a running bond > +# that used miimon. The monitor must give the slaves a full arp_missed_max > +# window from when it starts, not from when they were enslaved. > +# > +# +------------------------+ > +# | bond0 192.0.2.1/24 | h_ns > +# | eth0 eth1 | > +# +---+-------------+------+ > +# | | > +# +---+-------------+------+ > +# | sw0 sw1 | sw_ns > +# | br0 192.0.2.254/24 | > +# +------------------------+ > + > +# shellcheck disable=SC2034,SC2329 > +ALL_TESTS=" > + arp_monitor_start_on_open > + arp_monitor_start_on_interval_set > +" > +REQUIRE_MZ=no > +NUM_NETIFS=0 > +lib_dir=$(dirname "$0") > +# shellcheck disable=SC1091 > +source "$lib_dir"/../../../net/forwarding/lib.sh > + > +require_command jq > + [...] > + > +trap cleanup EXIT > + > +setup_prepare > +setup_wait Since we don't need the NUM_NETIFS, there is no need to call setup_wait. With that, we can include net/lib.sh directly, and remove the REQUIRE_MZ/NUM_NETIFS setting. Thanks Hangbin > + > +tests_run > + > +exit "$EXIT_STATUS" > > -- > 2.56.1 > >