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 and 2 are marked for stable backport as they fix issues
where invalid mbufs could be generated or invalid arguments silently
accepted.

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

v8:
  - Rebased to latest main
  - Minor revision to avoid changes in later fixes

v7:
  - Added release notes to patch 1
  - Simplified test code by using single-line comments and struct
    initializers instead of explicit zeroing
  - Added two new bug fix patches (patches 4 and 5) that validate
    packet size against mbuf data room constraints

Stephen Hemminger (5):
  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   | 113 ++--
 5 files changed, 997 insertions(+), 90 deletions(-)
 create mode 100644 app/test/test_pmd_null.c

-- 
2.51.0

Reply via email to