Skip to content

net/null: bug fixes and improvements

Stephen Hemminger dpdk-dev 9 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest7 patches 0 repliesNew
  2. v106 patches 0 repliesSuperseded
  3. v95 patches 0 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v85 patches0 repliesSuperseded
v75 patches0 repliesSuperseded
v63 patches0 repliesSuperseded
v53 patches0 repliesSuperseded
v43 patches1 replySuperseded
v33 patches3 repliesSuperseded

Changes in v11 from the cover letter

- Add VLAN insert and strip offload support to the driver
- Rebase to main

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net/null: fix missing mbuf leakage in the copy transmitdrivers/net/null/rte_eth_null.c+1 -00 replies
2/7net/null: cleanup info responsedrivers/net/null/rte_eth_null.c+3 -70 replies
3/7net/null: validate the numeric devargsdrivers/net/null/rte_eth_null.c+26 -330 replies
4/7net/null: remove redundant argument validationdrivers/net/null/rte_eth_null.c+10 -340 replies
5/7test: support larger packet sizes in burst generatorapp/test/packet_burst_generator.c app/test/packet_burst_generator.h+22 -160 replies
6/7test: add a test for null PMDapp/test/meson.build app/test/test_pmd_null.c+936 -00 replies
7/7net/null: add VLAN insert and strip offload supportapp/test/test_pmd_null.c drivers/net/null/rte_eth_null.c+229 -1790 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v11 yet.

Read the v11 thread

Cover letter [PATCH v11 0/7] net/null: bug fixes and improvements

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) Adds VLAN insert and strip offload support. The driver advertises RX VLAN strip and TX VLAN insert capabilities. When VLAN strip is enabled, received mbufs are marked with the appropriate flags and a dummy vlan_tci. The vlan_offload_set dev_op is implemented for runtime toggling via rte_eth_dev_set_vlan_offload().

5) Extends the packet burst generator to support larger packets by widening parameter types from uint8_t to uint16_t.

6) 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, VLAN strip, VLAN insert, 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.

v11:
- Add VLAN insert and strip offload support to the driver
- Rebase to main

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 (7):
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
net/null: add VLAN insert and strip offload support

 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          | 947 ++++++++++++++++++++++++++++++
 drivers/net/null/rte_eth_null.c   | 156 ++---
 5 files changed, 1050 insertions(+), 92 deletions(-)
 create mode 100644 app/test/test_pmd_null.c
Signature · 1 line
2.51.0