This series makes several improvements to the null PMD driver and
adds comprehensive unit tests.
The series:
1) Cleans up the info_get callback by removing redundant argument
checks and using proper constants. Also sets min_rx_bufsize to
the configured packet_size, enabling the ethdev layer to reject
undersized mbuf pools.
2) Adds proper validation for numeric devargs (packet_size,
packet_copy, no_rx) using a common helper function that rejects
empty strings, trailing non-numeric characters, and out-of-range
values.
3) Removes redundant argument validation in dev_ops callbacks that
is already performed by the ethdev layer.
4) Extends the packet burst generator to support larger packets
by widening parameter types from uint8_t to uint16_t.
5) Adds a comprehensive unit test for the null PMD covering RX/TX,
statistics, custom packet sizes, copy mode, no-RX mode, link
status, device info, RSS, RETA, and multi-threaded TX.
Patches 1, 2, and 3 are marked for stable backport as they fix issues
where invalid mbufs could be generated or invalid arguments silently
accepted.
v10:
- Fix mbuf leak in eth_null_copy_tx
v9:
- Consolidated argument validation into a single patch with
common helper function get_unsigned_arg()
- Merged pool vs packet size check into the cleanup patch
- Removed redundant argument validation in a separate patch
- Reordered patches to put fixes before tests
Stephen Hemminger (6):
net/null: fix missing mbuf leakage in the copy transmit
net/null: cleanup info response
net/null: validate the numeric devargs
net/null: remove redundant argument validation
test: support larger packet sizes in burst generator
test: add a test for null PMD
app/test/meson.build | 1 +
app/test/packet_burst_generator.c | 34 +-
app/test/packet_burst_generator.h | 4 +-
app/test/test_pmd_null.c | 935 ++++++++++++++++++++++++++++++
drivers/net/null/rte_eth_null.c | 114 ++--
5 files changed, 998 insertions(+), 90 deletions(-)
create mode 100644 app/test/test_pmd_null.c
--
2.51.0