|SUCCESS| net: fix tunnel parsing of non-IP packets

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Nov 9 15:50:14 CET 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/172744

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-09

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

The patch correctly fixes a bug where non-IP EtherTypes were being misinterpreted as IP protocol numbers in tunnel parsing, causing incorrect packet type classification.

**Logic verified:**
- The bug occurs because `proto` holds a big-endian EtherType (e.g., 0x0400) when the packet is not IPv4/IPv6
- `ptype_tunnel_without_udp()` at line 430+ compares `proto` against `IPPROTO_IPIP` (4), `IPPROTO_IPV6` (41), `IPPROTO_GRE` (47)
- On little-endian systems, byte-swapped EtherTypes 0x0400, 0x2900, 0x2F00 match those values
- The early return after L2 is the correct fix - non-IP packets have no L4 or tunnel layer to parse

**Diff context shows:**
```c
} else if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
    /* IPv6 parsing */
} else {
    /* not IPv4 or IPv6 - proto still holds EtherType */
    pkt_type |= ptype_l4(proto);  /* BUG: treats EtherType as IP protocol */
+   return pkt_type;              /* FIX: stop here for non-IP */
}
```

The patch is a minimal, correct fix for the stated bug. The early return prevents tunnel parsing logic from running on non-IP packets, which is the intended behavior.

Review-Result: CLEAN


More information about the test-report mailing list