Skip to contentSkip to conversation

app/test: add standalone test for af_packet

PATCH New Stephen Hemminger 1 participant 1 message Mar 10 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/test: add standalone test for af_packet

Recent updates ot af_packet prompted me to resubmit this. I expect test will fail until jumbo support for AF_PACKET is merged.

Add comprehensive unit test suite for AF_PACKET PMD covering:
- Device info and link status
- TX/RX packet handling
- Loopback verification
- Promiscuous mode
- MAC address operations
- MTU configuration
- Statistics and reset
- Multi-threaded concurrent TX/RX
- Invalid configuration handling
- Multi-queue support
- Jumbo frame support (9K packets)

Uses TAP interface as the underlying device for testing.

---
 app/test/meson.build          |    1 +
 app/test/test_pmd_af_packet.c | 1356 +++++++++++++++++++++++++++++++++
 2 files changed, 1357 insertions(+)
 create mode 100644 app/test/test_pmd_af_packet.c
app/test/meson.build +1 -0
index 7d458f9c07..24f71fb987 100644
@@ -141,6 +141,7 @@ source_file_deps = {
     'test_per_lcore.c': [],
     'test_pflock.c': [],
     'test_pie.c': ['sched'],
+    'test_pmd_af_packet.c': ['net_af_packet', 'ethdev', 'bus_vdev'],
     'test_pmd_perf.c': ['ethdev', 'net'] + packet_burst_generator_deps,
     'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'],
     'test_pmd_ring_perf.c': ['ethdev', 'net_ring', 'bus_vdev'],
app/test/test_pmd_af_packet.c new file +1356 -0

1,356 lines not on this page · raw message

Signature · 1 line
2.51.0