linux/net/mctp/test
Jeremy Kerr 6ab578739a net: mctp: test: move TX packetqueue from dst to dev
To capture TX packets during a test, we are currently intercepting the
dst->output with an implementation that adds the transmitted packet to
a skb queue attached to the test-specific mock dst. The netdev itself is
not involved in the test TX path.

Instead, we can just use our test device to stash TXed packets for later
inspection by the test. This means we can include the actual
mctp_dst_output() implementation in the test (by setting dst.output in
the test case), and don't need to be creating fake dst objects, or their
corresponding skb queues.

We need to ensure that the netdev is up to allow delivery to
ndo_start_xmit, but the tests assume active devices at present anyway.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20251126-dev-mctp-test-tx-queue-v2-1-4e5bbd1d6c57@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-12-01 13:52:13 -08:00
..
route-test.c net: mctp: test: move TX packetqueue from dst to dev 2025-12-01 13:52:13 -08:00
sock-test.c net: mctp: Test conflicts of connect() with bind() 2025-07-15 12:08:39 +02:00
utils.c net: mctp: test: move TX packetqueue from dst to dev 2025-12-01 13:52:13 -08:00
utils.h net: mctp: test: move TX packetqueue from dst to dev 2025-12-01 13:52:13 -08:00