|WARNING| gso: fix segmentation of unsupported tunnel packets
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Nov 9 11:12:43 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172739
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-09
# DPDK Patch Review
## ERRORS
None.
## WARNINGS
**1. Missing release notes update**
The patch fixes a correctness bug (wrong segmentation of tunnel packets) that affects user-visible behavior. This should be documented in the release notes.
**Suggested fix:**
Add an entry to `doc/guides/rel_notes/release_26_11.rst` (or the appropriate current release file) under the "Fixed Issues" section:
```rst
* **gso: Fixed segmentation of unsupported tunnel packets.**
Fixed a bug where tunnel packets that did not match supported tunnel types
were incorrectly segmented as plain TCP/IPv4 or UDP/IPv4 packets, resulting
in corrupted packet headers. Such packets now return ``-ENOTSUP`` as documented.
```
**2. Missing test coverage**
The patch fixes a bug where unsupported tunnel packets were being incorrectly segmented. There should be a test case added to `app/test/test_gso.c` to verify that packets with unsupported tunnel types return `-ENOTSUP` rather than being incorrectly segmented.
**Suggested fix:**
Add a test case that creates an mbuf with a tunnel type not in the supported list (e.g., a tunnel type set in `RTE_MBUF_F_TX_TUNNEL_MASK` but not matching VXLAN, GRE, GENEVE, or IPIP), sets `RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_IPV4`, and verifies `rte_gso_segment()` returns `-ENOTSUP`.
## INFO
**Code correctness**
The fix is correct. Before the patch:
- `IS_IPV4_TCP(flag)` checked only `RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_IPV4`
- A packet with those flags plus an unsupported tunnel type (e.g., `RTE_MBUF_F_TX_TUNNEL_IP_IN_IP` when `RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO` is not in `gso_types`) would match `IS_IPV4_TCP()` and be incorrectly segmented as a plain TCP/IPv4 packet
- With inner header length fields (`l2_len`, `l3_len`, `l4_len`), the segment processing would corrupt the outer headers
After the patch:
- `IS_IPV4_TCP(flag)` requires `RTE_MBUF_F_TX_TUNNEL_MASK == 0`, so only non-tunneled packets match
- Unsupported tunnel packets fall through to the `-ENOTSUP` return at the end of the function
The same logic applies to `IS_IPV4_UDP(flag)`.
**Style**
The code follows DPDK formatting: hard tabs, proper line continuation alignment, and consistent macro style.
Review-Result: WARNING
More information about the test-report
mailing list