]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: drv-net: Add ntuple (NFC) flow steering test
authorDimitri Daskalakis <daskald@meta.com>
Tue, 7 Apr 2026 16:49:53 +0000 (09:49 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Apr 2026 22:32:11 +0000 (15:32 -0700)
commit18589df9344c459f062ad74a5890e87ad6c0f1a6
tree64271d35622414815b9b4a41b727a055b2fb6f85
parent42f9b4c6ef19e71d2c7d9bfd3c5037d4fe434ad7
selftests: drv-net: Add ntuple (NFC) flow steering test

Add a test for ethtool NFC (ntuple) flow steering rules. The test
creates an ntuple rule matching on various flow fields and verifies
that traffic is steered to the correct queue.

The test forces all traffic to queue 0 via the indirection table,
then installs an ntuple rule to steer select traffic to a specific
queue. The test then verifies the expected number of packets is received
on the queue.

This test has variants for TCP/UDP over IPv4/IPv6, with rules matching
the source IP. Additional match fields will be added in the next commit.

 TAP version 13
 1..4
 ok 1 ntuple.queue.tcp4.src_ip
 ok 2 ntuple.queue.udp4.src_ip
 ok 3 ntuple.queue.tcp6.src_ip
 ok 4 ntuple.queue.udp6.src_ip
 # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
Link: https://patch.msgid.link/20260407164954.2977820-2-dimitri.daskalakis1@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/hw/Makefile
tools/testing/selftests/drivers/net/hw/ntuple.py [new file with mode: 0755]