|WARNING| [v2] vhost: remove dependency on PCI library
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Sep 1 09:52:10 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/168797
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-01
# DPDK Patch Review: vhost: remove dependency on PCI library
## Summary
This patch removes the PCI library dependency from the vhost library itself and adds it back to the two example applications (vdpa and vhost) that actually need it. The change is correct in principle -- vhost no longer uses PCI directly after the dmadev integration. However, there are some considerations regarding ABI/API impact and testing.
---
## Findings
### **Errors**
None.
### **Warnings**
**1. Missing release notes update**
The patch changes build dependencies and affects applications linking against vhost.
This should be documented in the release notes.
**Suggested action:**
Add an entry to `doc/guides/rel_notes/release_26_11.rst` (or appropriate version):
```rst
* **Updated vhost library dependencies.**
Removed the PCI library as a direct dependency of vhost.
Applications using vhost that also need PCI functionality must now
explicitly link against ``librte_pci`` in their build configuration.
```
**2. Potential impact on out-of-tree applications**
Applications that depend on vhost and use PCI indirectly (relying on vhost's transitive dependency)
will need to add an explicit PCI dependency.
**Suggested action:**
Consider if this warrants a deprecation notice in a prior release,
or at minimum verify no in-tree applications beyond vdpa/vhost examples are affected.
The release notes entry mentioned above should highlight this change clearly.
**3. vdpa example: dependency list ordering**
In `examples/vdpa/meson.build`, the new `deps += 'pci'` should maintain alphabetical order with the existing dependency.
**Current:**
```python
deps += 'vhost'
deps += 'pci'
```
**Suggested:**
```python
deps += 'pci'
deps += 'vhost'
```
(or combine as `deps += ['pci', 'vhost']` if preferred)
**4. vhost example: dependency list ordering**
In `examples/vhost/meson.build`, the new `deps += 'pci'` should be ordered with the other dependencies:
**Current:**
```python
deps += 'vhost'
deps += 'dmadev'
deps += 'pci'
```
**Suggested:**
```python
deps += ['dmadev', 'pci', 'vhost']
```
or keep individual lines but alphabetically:
```python
deps += 'dmadev'
deps += 'pci'
deps += 'vhost'
```
---
### **Info**
**1. Consider testing with example applications**
The examples now explicitly depend on PCI.
Verify that both `examples/vdpa` and `examples/vhost` build and run correctly after this change,
particularly that all PCI-related functionality (device initialization, capability queries) still works.
**2. Verify no other consumers**
Confirm no other in-tree code (drivers, other examples, test applications)
depends on vhost and implicitly uses PCI through it.
A recursive dependency check would catch this.
---
## Code Style Check
Meson indentation (4 spaces): Correct
Line lengths: Acceptable
Alphabetical ordering: See warnings #3 and #4 above
---
## Correctness Review
No resource management issues
No forbidden tokens introduced
Change is logically sound (PCI no longer used by vhost core)
Fixes tag references appropriate commit
---
## Recommendation
**Approve with minor changes:**
1. Add release notes entry (Warning #1)
2. Reorder dependency lists alphabetically (Warnings #3, #4)
3. Verify no other in-tree consumers are affected (Info #2)
The core change is correct -- vhost transitioned away from PCI when it adopted dmadev.
The examples that still need PCI (for device enumeration and management) correctly declare the dependency now.
More information about the test-report
mailing list