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

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Nov 9 18:23:46 CET 2026


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

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

**1. Missing release notes update**

The patch makes a user-visible change (PMD will not build on systems with old kernel headers) but does not update the release notes. When a driver's build requirements change, this must be documented.

**Suggested fix:**
Add an entry to `doc/guides/rel_notes/release_XX_YY.rst` (current release notes file) under "Removed Items" or "Known Issues":

```rst
* **af_packet PMD now requires Linux 4.20+ kernel headers.**

  The af_packet PMD now requires kernel headers defining ``PACKET_IGNORE_OUTGOING``
  (Linux 4.20 or later). The PMD will not be built if this symbol is missing.
```

## WARNINGS

**1. Documentation placement could be more user-friendly**

The new prerequisite is added to `doc/guides/nics/af_packet.rst` after "A Linux Kernel;" in the bulleted list. While this documents the requirement, users typically check release notes first for build requirement changes. The doc update alone may not be sufficient visibility.

**Suggested fix:**
Keep the doc change, but add the release notes entry (see Error #1). The documentation update is correct but incomplete without release notes.

**2. Meson logic could be more defensive**

The check for `PACKET_IGNORE_OUTGOING` only runs on Linux (guarded by the earlier `if not is_linux` check). However, the second check does not verify it's checking the right header on the right platform, and relies on the first check's side effects.

**Suggested fix:**
This is acceptable as-is since the first check already does `subdir_done()` on non-Linux, but could be more explicit:

```python
if is_linux and not cc.has_header_symbol('linux/if_packet.h', 'PACKET_IGNORE_OUTGOING')
    build = false
    reason = 'missing symbol "PACKET_IGNORE_OUTGOING" in "linux/if_packet.h"'
    subdir_done()
endif
```

Though the current code is functionally correct due to the ordering and `subdir_done()`.

## SUMMARY

The patch correctly addresses the build failure by checking for the required symbol at configure time and skipping the driver when it's not available. The meson build changes are technically sound and the documentation is updated.

However, the lack of release notes is an error per DPDK guidelines: user-visible changes to build requirements must be documented in release notes. The current approach only updates the driver-specific prerequisites documentation, which users may not check when encountering a build failure.

Review-Result: ERROR


More information about the test-report mailing list