|WARNING| [v2] test/event_eth_tx_adapter: skip tests if no eventdev
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Jul 21 15:53:41 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/166846
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-07-21
# DPDK Patch Review
## Summary
This patch modifies the event_eth_tx_adapter test to skip tests when no eventdev is present and the SW eventdev driver is unavailable, rather than failing. The code introduces conditional compilation based on `RTE_EVENT_SW` to handle this scenario.
---
## Findings
### **Errors**
None identified.
### **Warnings**
**1. Inconsistent variable declaration style within function**
The patch moves `vdev_name` inside the `#ifdef RTE_EVENT_SW` block, but this creates an inconsistency with the existing function style. The original code declared `vdev_name` at the start of the function. While both styles are acceptable per the guidelines, mixing them within a single function reduces readability.
**Suggested fix:**
Consider keeping `vdev_name` at the function start, or if the conditional compilation requires it inside the block, add a comment explaining why the declaration moved.
```c
static int
testsuite_setup(void)
{
#ifdef RTE_EVENT_SW
const char *vdev_name = "event_sw0";
#endif
int err;
err = init_ports();
/* ... rest of function ... */
}
```
**2. Missing release notes update**
This is a user-visible behavior change in the test suite. When `RTE_EVENT_SW` is not defined and no eventdev is available, tests that previously failed will now be skipped. This should be documented in the release notes under the test suite changes section.
**Suggested fix:**
Add an entry to `doc/guides/rel_notes/release_XX_XX.rst` (current release) describing the test behavior change.
### **Info**
**1. Error handling note**
The patch correctly preserves the failure case when `rte_vdev_init()` fails with `RTE_EVENT_SW` defined. This is good defensive programming - it distinguishes between "driver not available" (skip) and "driver available but init failed" (error).
**2. Conditional compilation consideration**
The use of `#ifdef RTE_EVENT_SW` assumes this symbol is defined when the SW eventdev driver is compiled. Verify this matches the actual build system symbol. If the driver uses a different configuration symbol, this check may not work as intended.
---
## Code Style Compliance
- Indentation and formatting correct
- Comments properly formatted
- Variable naming follows conventions
- No forbidden tokens detected
- TEST_ASSERT macros used appropriately
- No trailing whitespace issues
---
## Conclusion
The patch is functionally correct with no blocking issues. The two warnings relate to documentation (missing release notes) and minor style consistency. The logic properly distinguishes between "unavailable driver" (skip) and "init failure" (error), which is the right behavior.
More information about the test-report
mailing list