|WARNING| [v2, 6/6] app/dumpcap: disable capture on the interface that failed
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri Nov 27 22:28:04 CET 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173298
_AI Code Review_
warning: review has no Review-Result line, severity inferred from prose (response may be truncated)
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-27
**[PATCH v2 3/6] pdump: validate queues before installing callbacks**
Error: the undo path can remove callbacks that belong to a different capture session.
- With `RTE_PDUMP_ALL_QUEUES`, `pdump_check_queues()` now skips queues that already have a callback instead of failing:
```c
if (operation == ENABLE && cbs->cb != NULL) {
if (all)
continue;
```
- The registration loops skip the same queues:
```c
if (operation == ENABLE ? cbs->cb != NULL : cbs->cb == NULL)
continue;
```
- If registration then fails, the undo issues a DISABLE over the whole queue range for both directions:
```c
if (flags & RTE_PDUMP_FLAG_RX)
pdump_register_rx_callbacks(p->ver, nb_rx_q, port, queue,
ring, mp, filter,
DISABLE, p->snaplen);
if (flags & RTE_PDUMP_FLAG_TX)
pdump_register_tx_callbacks(p->ver, nb_tx_q, port, queue,
...
```
- In DISABLE mode, any queue with `cbs->cb != NULL` is removed. That includes queues another client enabled earlier, whose callbacks point at that client's ring.
- The problem is worse when Rx registration fails. Tx registration was never attempted, yet the Tx undo still strips every pre-existing Tx callback on the port.
- The result is that a failed request from one client silently stops another client's active capture.
Suggested fix: restrict the undo to callbacks installed by this request. For example, have the undo skip entries where `cbs->ring != ring`. Alternatively, record which qids were enabled in this call and disable only those.
Warning: enabling with `RTE_PDUMP_ALL_QUEUES` now succeeds when some queues are already being captured by another session.
- Previously this returned `-EEXIST`.
- Now the request succeeds with a partial capture, and the caller is not told that some queues are going to a different ring.
- This is a user-visible semantic change, made in a patch tagged for stable.
- Either keep returning `-EEXIST` when an explicit capture conflicts, or document the new behaviour.
**[PATCH v2 5/6] pdump: report secondary process failures**
Error: the primary's own rollback has the same cross-session removal problem as patch 3.
```c
undo.op = DISABLE;
undo.prm = NULL; /* no filter needed to remove callbacks */
set_pdump_rxtx_cbs(&undo);
pdump_request_to_secondary(&undo);
```
- When `req->queue` is `RTE_PDUMP_ALL_QUEUES`, this DISABLE removes every callback on the port in the primary and in all secondaries.
- That includes callbacks installed by other clients that the original enable skipped.
- The rollback should only remove callbacks referencing this request's ring.
Info: `resp->err_value` is read from each reply without checking the reply length.
```c
const struct pdump_response *resp =
(const struct pdump_response *)mp_reply.msgs[i].param;
```
- `mp_reply.msgs[i].len_param` is not checked against `sizeof(struct pdump_response)
More information about the test-report
mailing list