[REVIEW] doc/nfb: cleanup and update guide

Stephen Hemminger stephen at networkplumber.org
Mon Feb 2 18:54:00 CET 2026


On Mon,  2 Feb 2026 09:42:35 -0800
Stephen Hemminger <stephen at networkplumber.org> wrote:

> ## Patch 5/8: net/nfb: init only MACs associated with device
> 
> ### Errors
> None.
> 
> ### Warnings
> 
> 1. **Using `calloc()` instead of `rte_calloc()`** (nfb_ethdev.c:74-78)
>    ```c
>    intl->rxmac = calloc(ifc->eth_cnt, sizeof(*intl->rxmac));
>    ...
>    intl->txmac = calloc(ifc->eth_cnt, sizeof(*intl->txmac));
>    ```
>    For consistency within the driver and proper NUMA-aware allocation, consider using `rte_calloc()` or `rte_zmalloc()`. However, since these are control structures (not DMA-accessible), standard `calloc()` is acceptable.
> 
> 2. **Using `free()` instead of `rte_free()`** (nfb_ethdev.c:114-115)
>    ```c
>    free(intl->txmac);
>    free(intl->rxmac);
>    ```
>    Should match the allocation function. If using `calloc()`, then `free()` is correct.


Another false-positive. If you can use regular calloc then it is fine.


More information about the dev mailing list