|WARNING| [v1,2/2] net/iavf: keep device stopped if start fails

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Oct 15 11:16:12 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171384

_AI Code Review_

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

# DPDK Patch Review

## PATCH 1/2: net/iavf: fix memory leaks around IRQ resources

### Errors

**Error 1: Missing early return after successful resource cleanup**

Line 991 (after cleanup labels):
```c
efd_alloc_err:
	rte_intr_efd_disable(intr_handle);

	return -1;
```

The `efd_alloc_err` label falls through to `return -1`, but there is no early `return 0` on success before the error labels. The function must return success when no error occurs. After all the IRQ setup completes successfully (around line 983), the function should `return 0` before reaching the error labels.

**Suggested fix:** Add `return 0;` before the `qv_map_alloc_err:` label to ensure successful completion returns zero.

---

### Warnings

**Warning 1: Inconsistent interrupt disable logic in error path**

Line 1129-1130 (error cleanup in `iavf_dev_start`):
```c
if (!wb_on_itr && dev->data->dev_conf.intr_conf.rxq != 0)
    rte_intr_disable(intr_handle);
```

The error path only disables interrupts when `!wb_on_itr`, but the setup path (line 1101-1103) enables interrupts for both `wb_on_itr` (after disabling first) and `!wb_on_itr` cases. If `wb_on_itr` is true and `rxq` interrupts are configured, the enable path does `rte_intr_disable(); rte_intr_enable();`, so the error path should also call `rte_intr_disable()` in that case to match the state change.

**Suggested approach:** The error path should mirror the setup logic. If the setup unconditionally enables interrupts when `rxq != 0` (which it does after line 1103), the error path should unconditionally disable them:
```c
if (dev->data->dev_conf.intr_conf.rxq != 0)
    rte_intr_disable(intr_handle);
```

---

## PATCH 2/2: net/iavf: keep device stopped if start fails

### Errors

None.

### Warnings

None.

---

## Summary

**Patch 1/2** fixes real resource leaks (interrupt vectors and queue-vector map) but has a critical missing success return and a conditional mismatch in the error cleanup path.

**Patch 2/2** correctly fixes the stopped-state logic with no issues found.

---

Review-Result: ERROR


More information about the test-report mailing list