On Tue Feb 18 2025, Joe Damato wrote:
> On Tue, Feb 18, 2025 at 04:18:19PM -0500, Joe Damato wrote:
>> On Mon, Feb 17, 2025 at 12:31:20PM +0100, Kurt Kanzenbach wrote:
>> > This is a follow up for the igb XDP/ZC implementation. The first two 
>> > patches link the IRQs and queues to NAPI instances. This is required to 
>> > bring back the XDP/ZC busy polling support. The last patch removes 
>> > undesired IRQs (injected via igb watchdog) while busy polling with 
>> > napi_defer_hard_irqs and gro_flush_timeout set.
>> > 
>> > Signed-off-by: Kurt Kanzenbach <[email protected]>
>> > ---
>> > Changes in v2:
>> > - Take RTNL lock in PCI error handlers (Joe)
>> > - Fix typo in commit message (Gerhard)
>> > - Use netif_napi_add_config() (Joe)
>> > - Link to v1: 
>> > https://lore.kernel.org/r/[email protected]
>> 
>> Thanks for sending a v2.
>> 
>> My comment from the previous series still stands, which simply that
>> I have no idea if the maintainers will accept changes using this API
>> or prefer to wait until Stanislav's work [1] is completed to remove
>> the RTNL requirement from this API altogether.
>
> Also, may be worth running the newly added XSK test with the NETIF
> env var set to the igb device? Assuming eth0 is your igb device:
>
>   NETIF=eth0 ./tools/testing/selftests/drivers/net/queues.py
>
> should output:
>
>   KTAP version 1
>   1..4
>   ok 1 queues.get_queues
>   ok 2 queues.addremove_queues
>   ok 3 queues.check_down
>   ok 4 queues.check_xdp
>   # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Note the check_xdp line above.
>

Sure, why not. Seems to work.

|root@apl1:~/linux# uname -a
|Linux apl1 6.14.0-rc2+ #2 SMP PREEMPT_RT Wed Feb 19 14:41:23 CET 2025 x86_64 
GNU/Linux
|root@apl1:~/linux# NETIF=enp2s0 ./tools/testing/selftests/drivers/net/queues.py
|KTAP version 1
|1..4
|ok 1 queues.get_queues
|ok 2 queues.addremove_queues
|ok 3 queues.check_down
|ok 4 queues.check_xdp
|# Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0

Has this xsk netlink attribute been added fairly recently? The test
failed on my kernel from a few days ago (kernel from today works). I
think there's room for improvement though:

|root@apl1:~/linux# NETIF=enp2s0 ./tools/testing/selftests/drivers/net/queues.py
|KTAP version 1
|1..4
|ok 1 queues.get_queues
|ok 2 queues.addremove_queues
|ok 3 queues.check_down
|# Exception| Traceback (most recent call last):
|# Exception|   File "/root/linux/tools/testing/selftests/net/lib/py/ksft.py", 
line 218, in ksft_run
|# Exception|     case(*args)
|# Exception|   File 
"/root/linux/./tools/testing/selftests/drivers/net/queues.py", line 53, in 
check_xdp
|# Exception|     ksft_eq(q['xsk'], {})
|# Exception|             ~^^^^^^^
|# Exception| KeyError: 'xsk'
|not ok 4 queues.check_xdp
|# Totals: pass:3 fail:1 xfail:0 xpass:0 skip:0 error:0

I'd assume this shouldn't be a Python exception, but rather say
something like "Expected xsk attribute, but none found. Fix the driver!" :)

While at it would you mind to add a newline to the xdp_helper usage
line (and fix the one typo)?

diff --git a/tools/testing/selftests/drivers/net/xdp_helper.c 
b/tools/testing/selftests/drivers/net/xdp_helper.c
index cf06a88b830b..55bad307d81b 100644
--- a/tools/testing/selftests/drivers/net/xdp_helper.c
+++ b/tools/testing/selftests/drivers/net/xdp_helper.c
@@ -20,7 +20,7 @@
  * this test program is not intended to actually process packets, but could be
  * extended in the future if that is actually needed.
  *
- * it is used by queues.py to ensure the xsk netlinux attribute is set
+ * it is used by queues.py to ensure the xsk netlink attribute is set
  * correctly.
  */
 int main(int argc, char **argv)
@@ -35,7 +35,7 @@ int main(int argc, char **argv)
        char byte;
 
        if (argc != 3) {
-               fprintf(stderr, "Usage: %s ifindex queue_id", argv[0]);
+               fprintf(stderr, "Usage: %s ifindex queue_id\n", argv[0]);
                return 1;
        }

Attachment: signature.asc
Description: PGP signature

Reply via email to