|WARNING| [3/3] net/af_packet: fix QinQ outer TPID on VLAN reinsertion
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Aug 24 21:52:41 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/168268
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-24
# DPDK Patch Review
## Patch 1/3: net: fix VLAN insert doc comment for shared-mbuf error code
**No issues found.**
This is a documentation-only fix that corrects the return value in the doc comment to match the implementation.
---
## Patch 2/3: net: add VLAN insert function with a TPID argument
### Errors
**API tag missing:**
The new function `rte_vlan_insert_tpid()` is added to a public header without the `__rte_experimental` attribute.
All new API functions must be marked experimental.
```c
__rte_experimental
static inline int rte_vlan_insert_tpid(struct rte_mbuf **m, uint16_t tpid)
```
**Missing export macro:**
New public functions require an `RTE_EXPORT_EXPERIMENTAL_SYMBOL(name, version)` macro in the corresponding `.c` file.
However, this is an inline function in a header, so no `.c` file exists.
For inline functions in headers, only the `__rte_experimental` attribute is needed (no export macro required for inlines).
---
## Patch 3/3: net/af_packet: fix QinQ outer TPID on VLAN reinsertion
### Warnings
**Missing release notes:**
This patch adds a new API function (`rte_vlan_insert_tpid()`) and fixes a QinQ bug.
The series should update `doc/guides/rel_notes/release_26_03.rst` (or the current development release) to document:
- The new API function in the "New Features" section
- The af_packet QinQ fix in the "Fixed Issues" section
**Dependency on experimental API:**
Patch 3/3 uses `rte_vlan_insert_tpid()` introduced in patch 2/3.
Once patch 2 marks it as experimental, any code using it should acknowledge this is experimental API.
However, PMDs using experimental net library APIs is acceptable during the experimental period.
### Info
**Test quality:**
The new tests in `test_net_ether.c` are well-structured.
They use the `TEST_ASSERT` macros correctly and verify both the standard 802.1Q case and the QinQ TPID case.
Good addition.
**Correctness of the fix:**
The af_packet driver change correctly preserves the original TPID when reinserting VLAN tags.
Reading `tp_vlan_tpid` when `TP_STATUS_VLAN_TPID_VALID` is set,
and falling back to `RTE_ETHER_TYPE_VLAN` otherwise, is the correct logic.
---
## Summary
**Critical items to address:**
1. Add `__rte_experimental` to `rte_vlan_insert_tpid()` in patch 2/3
2. Add release notes for the new API and the bug fix
**Optional improvements:**
- None; the code changes are correct
More information about the test-report
mailing list