|WARNING| gso: fix segmentation of unsupported tunnel packets
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Nov 9 10:51:07 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 identified.
## WARNINGS
**Missing release notes update:**
This is a bug fix that changes the behavior of the GSO library by returning `-ENOTSUP` for unsupported tunnel packets instead of silently corrupting them. This behavior change should be documented in the release notes under `doc/guides/rel_notes/release_*.rst` in the "Bug Fixes" section.
## INFO
**Pre-existing: Macro complexity**
The `IS_IPV4_TCP` and similar macros are becoming complex multi-line expressions. Consider refactoring these as static inline functions for better type safety and debuggability. This would also make the code more readable:
```c
static inline bool
is_ipv4_tcp(uint64_t flag)
{
const uint64_t mask = RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_IPV4 |
RTE_MBUF_F_TX_TUNNEL_MASK;
const uint64_t expected = RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_IPV4;
return (flag & mask) == expected;
}
```
Note: This is not introduced by the current patch but applies to the entire set of `IS_*` macros in this header.
**Correctness verification:**
The fix correctly ensures that `RTE_MBUF_F_TX_TUNNEL_MASK` bits must be zero for plain TCP/IPv4 and UDP/IPv4 packets. This prevents misclassification of tunnel packets with unsupported tunnel types. The mask check is consistent with the existing tunnel-specific macros (`IS_IPV4_VXLAN_TCP4`, `IS_IPV4_GRE_TCP4`, etc.) which all check for specific tunnel type bits.
Review-Result: WARNING
More information about the test-report
mailing list