|WARNING| [v6,3/3] ethdev: hide VMDq internal sizes
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Aug 24 14:16:16 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/168263
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-24
# DPDK Patch Review
## Patch 1/3: ethdev: check VMDq availability
### Errors
None.
### Warnings
None.
### Info
None.
---
## Patch 2/3: ethdev: skip VMDq pools unless configured
### Errors
**lib/ethdev/rte_ethdev.c:1690** - `vmdq` variable should be `const bool`
Since `vmdq` is assigned once from configuration and never modified, declare it `const` to document intent and allow compiler optimizations.
```c
/* Current */
bool vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
/* Suggested */
const bool vmdq = (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0;
```
Same applies to `rte_eth_dev_mac_addr_add()` at line 5450.
### Warnings
**lib/ethdev/rte_ethdev.c:5451** - Inconsistent VMDq check style
The patch introduces a new `vmdq` boolean variable in `rte_eth_dev_mac_addr_add()` but continues using the inline bitwise check `(dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) != 0` in `rte_eth_dev_mac_addr_remove()`. For consistency, consider using the same pattern (either a `vmdq` variable or inline checks) across all three functions (`eth_dev_mac_restore`, `rte_eth_dev_mac_addr_add`, `rte_eth_dev_mac_addr_remove`).
### Info
None.
---
## Patch 3/3: ethdev: hide VMDq internal sizes
### Errors
None.
### Warnings
None.
### Info
None.
---
## Summary
This patch series correctly implements VMDq validation and cleanup with proper error handling and no correctness bugs identified. The main issue is a missed opportunity to declare boolean variables `const` where appropriate.
More information about the test-report
mailing list