|SUCCESS| [v2,2/2] net/ixgbe: fix return value of close operation

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Jul 15 16:28:29 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/166742

_AI Code Review_

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

# Review of DPDK Patch Series

## Patch 1/2: net/i40e: fix return value of close operation

### Errors

None.

### Warnings

None.

### Info

The patch correctly addresses the bug where `rte_intr_callback_unregister()` returns a positive value (count of unregistered callbacks) on success, which was leaking as the return value of `i40e_dev_close()`. The fix properly introduces a separate `cb_ret` variable to avoid clobbering an earlier error stored in `ret`, and correctly stops retrying on non-transient errors. The logic is sound:

1. `cb_ret` receives the unregister return value
2. If `ret == 0` (no prior error), only then is `ret` updated with `cb_ret`
3. The loop breaks on non-transient errors

This follows correct error propagation patterns.

---

## Patch 2/2: net/ixgbe: fix return value of close operation

### Errors

None.

### Warnings

None.

### Info

The patch applies the same fix pattern as Patch 1/2 to the ixgbe driver, maintaining consistency across Intel drivers. The logic correctly:

1. Uses `cb_ret` for the unregister result
2. Only overwrites `ret` if `ret == 0` (preserving earlier errors like from `dev_stop()`)
3. Breaks on non-`-EAGAIN` errors to avoid masking them

Both patches follow the same correct pattern for handling the `rte_intr_callback_unregister()` return value.

---

## Series-Level Comments

**Correctness:** Both patches correctly fix the bug without introducing resource leaks or other correctness issues. The error path logic is sound: earlier errors are preserved, successful unregisters don't leak positive values, and non-transient unregister failures are reported.

**Style:** Code follows DPDK style conventions. Variable declarations, indentation, and control flow are correct.

**Documentation:** The commit messages clearly explain the bug and the fix. However, **release notes are missing**. These are bug fixes that change the return value behavior of `rte_eth_dev_close()` when called on i40e/ixgbe devices, which applications may rely on. The patches should update `doc/guides/rel_notes/release_XX_YY.rst` (current release) with a note in the "Fixed Issues" section describing this behavioral fix.

**Recommendation:** Add release notes entry documenting that i40e and ixgbe `dev_close()` now correctly return 0 on success instead of leaking the callback unregister count.


More information about the test-report mailing list