From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, shuah@kernel.org, willemb@google.com,
petrm@nvidia.com, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] selftests: drv-net: test drivers sleeping in ndo_get_stats64
Date: Mon, 6 Jan 2025 07:41:04 -0800 [thread overview]
Message-ID: <20250106074104.7fdf837f@kernel.org> (raw)
In-Reply-To: <677aab862c9b3_15102629427@willemb.c.googlers.com.notmuch>
On Sun, 05 Jan 2025 10:55:50 -0500 Willem de Bruijn wrote:
> Two tiny comments, neither cause for respin.
Let me respin, not much work since comment changes shouldn't need
a re-test..
> > +@ksft_disruptive
> > +def procfs_downup_hammer(cfg) -> None:
> > + """
> > + Reading stats via procfs only holds the RCU lock, drivers often try
> > + to sleep when reading the stats, or don't protect against races.
> > + """
> > + # Max out the queues, we'll flip between max an 1
>
> s/an/and/
>
> > + channels = ethnl.channels_get({'header': {'dev-index': cfg.ifindex}})
> > + if channels['combined-count'] == 0:
> > + rx_type = 'rx'
> > + else:
> > + rx_type = 'combined'
> > + cur_queue_cnt = channels[f'{rx_type}-count']
> > + max_queue_cnt = channels[f'{rx_type}-max']
> > +
> > + cmd(f"ethtool -L {cfg.ifname} {rx_type} {max_queue_cnt}")
> > + defer(cmd, f"ethtool -L {cfg.ifname} {rx_type} {cur_queue_cnt}")
> > +
> > + # Real test stats
> > + stats = __run_inf_loop("cat /proc/net/dev")
> > + defer(stats.kill)
> > +
> > + ipset = f"ip link set dev {cfg.ifname}"
> > + defer(ip, f"link set dev {cfg.ifname} up")
>
> unimportant: could reference ipset here too, as in below.
Ha, that's what I did initially, but then running it I discovered
that ip() adds the initial "ip", so we end up executing:
ip ip link set...
--
pw-bot: cr
next prev parent reply other threads:[~2025-01-06 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 1:15 [PATCH net-next] selftests: drv-net: test drivers sleeping in ndo_get_stats64 Jakub Kicinski
2025-01-05 15:55 ` Willem de Bruijn
2025-01-06 15:41 ` Jakub Kicinski [this message]
2025-01-06 17:14 ` Petr Machata
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=20250106074104.7fdf837f@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.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.