public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Florian Westphal <fw@strlen.de>
Cc: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	Dong Chenchen <dongchenchen2@huawei.com>
Subject: Re: [PATCH net] selftests: avoid using ifconfig
Date: Thu, 31 Jul 2025 01:16:33 +0000	[thread overview]
Message-ID: <aIrD8eEfmsIggLKb@fedora> (raw)
In-Reply-To: <20250730075139.21848612@hermes.local>

On Wed, Jul 30, 2025 at 07:51:39AM -0700, Stephen Hemminger wrote:
> On Wed, 30 Jul 2025 12:56:19 +0000
> Hangbin Liu <liuhangbin@gmail.com> wrote:
> 
> > On Wed, Jul 30, 2025 at 11:53:13AM +0000, Eric Dumazet wrote:
> > > ifconfig is deprecated and not always present, use ip command instead.
> > > 
> > > Fixes: e0f3b3e5c77a ("selftests: Add test cases for vlan_filter modification during runtime")
> > > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > > Cc: Dong Chenchen <dongchenchen2@huawei.com>  
> > 
> > Not sure if there is a way to replace the ifconfig in rtnetlink.sh.
> > 
> > Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
> > 
> 
> Would this work:

From Florian's commit description, the ifconfig could trigger infinite
loop/soft lockup. I'm wondering if "ip" cmd able to trigger the same issue.

6a9e9cea4c51 ("net: ipv4: fix infinite loop on secondary addr promotion")
bb2bd090854c ("selftests: rtnetlink: add small test case with 'promote_secondaries' enabled")

Thanks
Hangbin
> 
> diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> index 2e8243a65b50..a3d3f2261bab 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -318,7 +318,7 @@ kci_test_promote_secondaries()
>         for i in $(seq 2 254);do
>                 IP="10.23.11.$i"
>                 ip -f inet addr add $IP/16 brd + dev "$devdummy"
> -               ifconfig "$devdummy" $IP netmask 255.255.0.0
> +               ip addr add dev "$devdummy" $IP/16
>         done
>  
>         ip addr flush dev "$devdummy"

  reply	other threads:[~2025-07-31  1:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 11:53 [PATCH net] selftests: avoid using ifconfig Eric Dumazet
2025-07-30 12:56 ` Hangbin Liu
2025-07-30 14:51   ` Stephen Hemminger
2025-07-31  1:16     ` Hangbin Liu [this message]
2025-08-02  0:14 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aIrD8eEfmsIggLKb@fedora \
    --to=liuhangbin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dongchenchen2@huawei.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox