|SUCCESS| [v3] examples/l3fwd: dynamic NUMA-aware alloc lcore_conf

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Oct 29 04:37:23 CET 2026


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

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

**Pre-existing: `init_lcore_rx_queues()` error path skips cleanup**

The function `init_lcore_rx_queues()` allocates `lcore_conf` entries in a loop,
but when it returns `-1` on error (lines 372-374), it does not free the entries allocated so far.
This is pre-existing code not touched by the patch, but worth noting:

```c
for (i = 0; i < nb_lcore_params; ++i) {
    lcore = lcore_params[i].lcore_id;
    nb_rx_queue = lcore_conf[lcore]->n_rx_queue;
    if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
        printf("error: too many queues (%u) for lcore: %u\n",
            (unsigned int)nb_rx_queue + 1, lcore);
        return -1;  /* leaks allocations if this is not the first iteration */
    }
```

The patch introduces `deinit_lcore_conf()` which could be called here,
but the patch does not change this function so the observation is pre-existing.

**Observation: `init_lcore_conf()` called before `init_lcore_rx_queues()`**

The patch calls `init_lcore_conf()` at line 1721 (in `main()`),
which allocates `lcore_conf` entries for all enabled lcores.
`init_lcore_rx_queues()` is called later (existing code, around line 367),
which populates those entries.
This ordering appears correct: allocate first, then populate.

The cleanup on error in `main()` after `init_lcore_conf()` relies on `rte_exit()` terminating the process,
so there is no memory leak in practice (the OS reclaims all process memory on exit).
The new `deinit_lcore_conf()` is called only in the normal shutdown path at line 1852.

Review-Result: CLEAN


More information about the test-report mailing list