|WARNING| net/af_packet: fix build with old kernel headers

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Fri Nov 6 16:02:09 CET 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172698

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

None identified.

## WARNINGS

**Missing Cc: stable at dpdk.org**

This patch fixes a build failure on RHEL 8 (kernel-headers-4.18.0) and includes a runtime fallback for kernels older than 4.20. The `Fixes:` tag is present, but the patch is missing `Cc: stable at dpdk.org` to ensure the fix is backported to stable branches.

**Suggested fix:**
Add the following line after the `Fixes:` tag in the commit message:
```
Cc: stable at dpdk.org
```

## INFO

**Variable initialization pattern**

Line 924:
```c
bool pmd_filter;
```

The `pmd_filter` variable is declared but not initialized at declaration. It is unconditionally assigned on line 1062 (inside the conditional at line 1063) or line 1069. Both paths are within the outer loop that guarantees assignment before the variable is read on line 1098. This is acceptable and does not require initialization at declaration since a meaningful value does not exist until runtime logic determines it.

**Pre-existing: Inconsistent treatment of PACKET_FANOUT_FLAG_IGNORE_OUTGOING**

The patch correctly defines `PACKET_IGNORE_OUTGOING` when missing from headers (lines 35-37), matching the pattern already used for `PACKET_FANOUT_FLAG_IGNORE_OUTGOING` (lines 39-42). However, there is an asymmetry in error handling: when `PACKET_IGNORE_OUTGOING` fails with `ENOPROTOOPT` (kernel too old), the code falls back to PMD filtering and continues (lines 1066-1069). When `PACKET_FANOUT_FLAG_IGNORE_OUTGOING` is not supported, the fanout setup silently succeeds because the kernel ignores unknown flags (per the comment on line 39), and the PMD filter is enabled based on `nb_queues > 1` (line 1062). This is consistent with the documented behavior, so no change is required. This note is provided for awareness only.

---

Review-Result: WARNING


More information about the test-report mailing list