[PATCH 1/8] net/nfb: prepare for indirect queue mapping scheme

Martin Spinler spinler at cesnet.cz
Tue Jan 20 16:16:37 CET 2026


On Fri, 2026-01-16 at 09:34 -0800, Stephen Hemminger wrote:
> On Thu, 15 Jan 2026 16:16:49 +0100
> spinler at cesnet.cz wrote:
> 
> > diff --git a/drivers/net/nfb/nfb.h b/drivers/net/nfb/nfb.h
> > index d85c5fba62..ef41d100ac 100644
> > --- a/drivers/net/nfb/nfb.h
> > +++ b/drivers/net/nfb/nfb.h
> > @@ -47,6 +47,10 @@ struct pmd_internals {
> >  	uint16_t         max_txmac;
> >  	struct nc_rxmac *rxmac[RTE_MAX_NC_RXMAC];
> >  	struct nc_txmac *txmac[RTE_MAX_NC_TXMAC];
> > +
> > +	int             *queue_map_rx;
> > +	int             *queue_map_tx;
> 
> 
> Since these are queues, would prefer uint16_t rather than int.

The int type of the queue_map_rx values here corresponds with the
libnfb API.
However this patch should have update also the types in function
headers (nfb_eth_*x_queue_init; the nfb_eth_*x_queue_setup is fine).

> > +	internals->queue_map_rx = rte_malloc("NFB queue map",
> > +			sizeof(*internals->queue_map_rx) *
> > +			(priv->max_rx_queues + priv->max_tx_queues), 0);
> 
> Use rte_calloc() of arrays.
> > +	if (internals->queue_map_rx == NULL) {

Ack.


More information about the dev mailing list