|WARNING| [2/2] meson: add drivers to dynamic libraries

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Oct 15 12:37:22 CEST 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-15

# DPDK Patch Review

## PATCH 1/2: meson: rename static drivers list

### ERRORS

None.

### WARNINGS

None.

### INFO

None.

---

## PATCH 2/2: meson: add drivers to dynamic libraries

### ERRORS

**Incorrect shared driver dependency collection:**

The patch adds shared driver dependencies to `dpdk_shared_lib_deps` unconditionally when a driver has headers, but this list is intended for shared library dependencies only. The condition `if headers.length() > 0` does not verify that `shared_dep` actually represents a shared library build.

Line in question:
```python
if headers.length() > 0
    dpdk_shared_lib_deps += shared_dep
endif
```

When `get_option('default_library') == 'static'`, the `shared_dep` dependency may not exist or may reference a static library, and adding it to `dpdk_shared_lib_deps` would be incorrect. The shared library dependency list should only be populated when actually building shared libraries.

**Suggested fix:** Guard the addition with a check for shared library builds:

```python
if headers.length() > 0 and get_option('default_library') != 'static'
    dpdk_shared_lib_deps += shared_dep
endif
```

Or, if `shared_dep` is only defined for shared builds, verify that assumption and ensure the code path is not reached during static-only builds.

---

### WARNINGS

**Missing context about dpdk_shared_lib_deps initialization and usage:**

The patch modifies `dpdk_shared_lib_deps` but does not show where this variable is declared or how it differs from the existing pattern. In `lib/meson.build`, there is likely a similar pattern for libraries. Without seeing the full context, it's unclear whether this change correctly mirrors the library behavior or introduces an inconsistency.

This is not necessarily wrong, but the commit message claims to "mirror what is already done for libraries" without demonstrating that the same conditional logic applies. Review the initialization and usage of `dpdk_shared_lib_deps` to confirm the pattern is correct.

---

### INFO

None.

---

Review-Result: ERROR


More information about the test-report mailing list