From: Jakub Kicinski <kuba@kernel.org>
To: Pavan Chebbi <pavan.chebbi@broadcom.com>
Cc: Bobby Eshleman <bobbyeshleman@gmail.com>,
Michael Chan <michael.chan@broadcom.com>,
davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch,
andrew.gospodarek@broadcom.com
Subject: Re: [PATCH net v2 4/4] selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up
Date: Tue, 10 Feb 2026 17:46:27 -0800 [thread overview]
Message-ID: <20260210174627.2360a03c@kernel.org> (raw)
In-Reply-To: <CALs4sv1Z+oWNT5myaEr=LyZsLCGUYfOKAet_bc+fmw7g8PbaxA@mail.gmail.com>
On Sun, 8 Feb 2026 21:56:39 +0530 Pavan Chebbi wrote:
> > > +
> > > + import subprocess
> > > + max_wait = 10
> > > + ping_success = False
> > > + remote_addr = cfg.remote_addr_v[cfg.addr_ipver]
> > > + for attempt in range(max_wait):
> > > + try:
> > > + result = subprocess.run(['ping', '-c', '1', '-W', '1', remote_addr],
> > > + capture_output=True, timeout=2)
> > > + if result.returncode == 0:
> > > + ping_success = True
> > > + break
> >
> > This might be wanting to use utils.py's cmd()?
>
> I checked and tried using the cmd() and it indeed eliminates a lot of
> lines here. But the test itself becomes a little unreliable.
> I often see TimeoutError: [Errno Wait for file contents failed]
> /sys/class/net/ens2f0np0/carrier from the wait_file (Jakub asked me to
> use wait_file)
Does the link take more than the default 5 sec to come up?
wait_file() has a deadline param that should let us wait longer
> Also, even when the test succeeds, after the suite exits, I cannot
> ping the remote host for a long time. In contrast, my manual loop
> worked 100pc of the times I tested.
> I am using the command like below:
>
> for _ in range(10):
> if cmd(f"ping -c 1 -W 1 {remote_addr}", fail=False, timeout=2).ret == 0:
> break
> time.sleep(1)
> else:
> raise KsftSkipEx("Cannot reach remote host after interface up")
>
> I am not a py expert so is there something I am missing?
I don't think there's anything Python related here :(
Is it possible that NIC reports carrier before it can actually send
packets? Maybe the wait_file() gives ping has a higher chance of failing
with carrier up which makes the neighbor resolution failure more sticky?
next prev parent reply other threads:[~2026-02-11 1:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 5:29 [PATCH net v2 0/4] bnxt_en: Fix RSS context and ntuple filter issues Michael Chan
2026-02-06 5:29 ` [PATCH net v2 1/4] bnxt_en: Fix RSS context delete logic Michael Chan
2026-02-06 5:29 ` [PATCH net v2 2/4] bnxt_en: Don't overload fw_vnic_id for RSS context's filters Michael Chan
2026-02-06 5:29 ` [PATCH net v2 3/4] bnxt_en: Fix deleting of Ntuple filters Michael Chan
2026-02-06 5:29 ` [PATCH net v2 4/4] selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up Michael Chan
2026-02-06 18:45 ` Bobby Eshleman
2026-02-08 16:26 ` Pavan Chebbi
2026-02-11 1:46 ` Jakub Kicinski [this message]
2026-02-11 3:58 ` Pavan Chebbi
2026-02-11 4:17 ` Jakub Kicinski
2026-02-11 5:15 ` Pavan Chebbi
2026-02-11 7:59 ` Pavan Chebbi
2026-02-11 16:31 ` Jakub Kicinski
2026-02-11 16:38 ` Pavan Chebbi
2026-02-11 16:58 ` Jakub Kicinski
2026-02-11 17:23 ` Pavan Chebbi
2026-02-11 17:50 ` Pavan Chebbi
2026-02-12 8:12 ` [PATCH 1/1] " Pavan Chebbi
2026-02-13 1:52 ` Jakub Kicinski
2026-02-13 3:52 ` Pavan Chebbi
2026-02-21 0:40 ` patchwork-bot+netdevbpf
2026-02-07 5:12 ` Jakub Kicinski
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=20260210174627.2360a03c@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=bobbyeshleman@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.