This series makes several improvements to the null PMD driver and
adds comprehensive unit tests.

Changes in 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

The series:
1) Cleans up the info_get callback by removing redundant argument
   checks and using proper constants (UINT32_MAX instead of cast).

2) Extends the packet burst generator to support larger packets
   by changing type from uint8_t to uint16_t, enabling better
   testing of drivers with various packet sizes.

3) 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.

4) Adds validation that the mbuf pool passed to rx_queue_setup
   has sufficient data room for the configured packet size.
   This prevents generating invalid mbufs in copy mode.

5) Adds validation that the packet size devarg doesn't exceed
   UINT16_MAX, which is the maximum size for a single mbuf
   data segment.

Patches 4 and 5 are marked for stable backport as they fix
potential issues where invalid mbufs could be generated.

Stephen Hemminger (5):
  net/null: cleanup info response
  test: generate larger packet bursts
  test: add a test for null PMD
  net/null: add check for pool vs packet size
  net/null: check packet size argument

 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               | 916 +++++++++++++++++++++++++
 doc/guides/rel_notes/release_26_03.rst |  10 +
 drivers/net/null/rte_eth_null.c        |  21 +++---
 6 files changed, 959 insertions(+), 27 deletions(-)
 create mode 100644 app/test/test_pmd_null.c

-- 
2.51.0



Stephen Hemminger (5):
  net/null: cleanup info response
  test: generate larger packet bursts
  test: add a test for null PMD
  net/null: add check for pool vs packet size
  net/null: check packet size argument

 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               | 938 +++++++++++++++++++++++++
 doc/guides/rel_notes/release_26_03.rst |   8 +
 drivers/net/null/rte_eth_null.c        |  21 +-
 6 files changed, 980 insertions(+), 26 deletions(-)
 create mode 100644 app/test/test_pmd_null.c

-- 
2.51.0

Reply via email to