|WARNING| net/ice: fix DCF probe failure when ACL is unavailable
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Nov 10 16:53:04 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172806
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-10
# DPDK Patch Review
## ERRORS
None identified.
## WARNINGS
### 1. Missing release notes entry
**Issue:** The patch fixes a probe failure condition that affects DCF behavior when ACL is unavailable. This is a user-visible change in error handling that should be documented.
**Why it matters:** Users and operators need to understand that DCF probe will now succeed (with a warning) when ACL is unavailable, instead of failing entirely. This changes the observable behavior.
**Fix:** Add an entry to the current release notes under `doc/guides/rel_notes/release_XX_XX.rst` (where XX_XX is the current release):
```rst
**Fixed Issues**
* **net/ice: Fixed DCF probe failure when ACL is unavailable.**
The DCF driver no longer fails probe when the PF refuses ACL capability.
Instead, it logs a warning and continues with the remaining flow engines
(switch and RSS).
```
### 2. Error path cleanup should use `goto` for consistency
**Issue:** In `ice_generic_flow.c`, the error path calls `engine->uninit()` inline and then `continue`, while the normal error case at the end uses `return ret`. This makes the control flow less uniform.
**Why it matters:** Using a common error handling pattern (`goto`) makes the code easier to review for resource leaks and keeps cleanup logic centralized.
**Suggested pattern:**
```c
ret = engine->init(ad);
if (ret) {
/* The PF may refuse the ACL capability to a DCF. Run without it. */
if (ad->hw.dcf_enabled && engine->type == ICE_FLOW_ENGINE_ACL) {
PMD_INIT_LOG(WARNING, "ACL engine not available, disabling it");
if (engine->uninit)
engine->uninit(ad);
ad->disabled_engine_mask |= BIT(ICE_FLOW_ENGINE_ACL);
ret = 0; /* Continue with other engines */
continue;
}
PMD_INIT_LOG(ERR, "Failed to initialize engine %d",
engine->type);
goto err; /* or whatever the cleanup label is */
}
```
**Note:** This assumes there is (or should be) a cleanup label. If the function has no cleanup needed on this path, the inline pattern is acceptable, but zeroing `ret` before `continue` makes the intent clearer.
## INFO
### 1. Pre-existing: `disabled_engine_mask` clearing pattern
**Observation (not introduced by this patch):** In `ice_dcf_parent.c` line 500-501, the code clears the ACL bit from `disabled_engine_mask` before conditionally setting it based on devargs. This pattern suggests the mask may persist across resets and could accumulate state from prior probe attempts.
**Context:** This is correct behavior for reset recovery (the comment says "Retry ACL initialization after reset"), but the two-step clear-then-conditionally-set pattern is only evident in the diff context, not in new code.
**Why noted:** Future reviewers working on this code may want to verify that other engine bits don't need similar treatment on reset.
### 2. Code works correctly with current flow
**Verification completed:** The patch correctly:
- Calls `engine->uninit(ad)` if `engine->uninit` is not NULL before disabling the ACL engine
- Sets the disabled bit in the mask to prevent later attempts to use the failed engine
- Continues the loop to initialize remaining engines (switch, RSS)
- Returns success if all other engines initialize successfully
No resource leaks or control flow issues identified.
Review-Result: WARNING
More information about the test-report
mailing list