Re: [PATCH net-next RFC] selftests: net: add netpoll basic functionality test
From: Breno Leitao
Date: Fri Jun 20 2025 - 04:42:06 EST
On Fri, Jun 13, 2025 at 05:42:33PM -0700, Jakub Kicinski wrote:
> On Fri, 13 Jun 2025 05:47:50 -0700 Breno Leitao wrote:
> > > Or is there another way that the packets could be observed, e.g.,
> > > counters.
> >
> > Unfortunately netpoll doesn't expose any data, thus, it is hard to get
> > it.
> >
> > I have plans to create a configfs for netpoll, so, we can check for
> > these numbers (as also configure some pre-defined values today, such as
> > USEC_PER_POLL, MAX_SKBS, ip6h->version = 6; ip6h->priority = 0, etc.
> >
> > In fact, I've an private PoC for this, but, I am modernizing the code
> > first, and creating some selftests to help me with those changes later
> > (given we have very little test on netpoll, and I aim to improve this,
> > given how critical it is for some datacenter designs).
>
> FWIW you can steal bpftrace integration from this series:
> https://lore.kernel.org/all/20250421222827.283737-22-kuba@xxxxxxxxxx/
Yes, that would be great. I think we can iterate until we hit the poll
path, otherwise we skip the test at timeout. Something as:
while (true):
send msg
if netpoll_poll_dev() was invoked:
ksft_exit
if timeout:
raise KsftSkipEx
As soon as your code lands, I will adapt the test to do so. Meanwhile,
I will send the v1 for the netpoll, and later we can iterate.
Thanks for working on this bfptrace helper. This will be useful on other
usecases as well.
--breno