Skip to content

Commit 824d123

Browse files
committed
drivers/nfb: simple support for multi-queue
This can minimize type0 descriptors to be generated when each queue uses own pool.
1 parent 1f76c35 commit 824d123

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/net/nfb/nfb_ethdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ nfb_eth_dev_info(struct rte_eth_dev *dev,
375375
dev_info->max_rx_pktlen = (uint32_t)-1;
376376
dev_info->max_rx_queues = priv->max_rx_queues;
377377
dev_info->max_tx_queues = priv->max_tx_queues;
378+
dev_info->max_rx_mempools = priv->max_rx_queues;
378379
dev_info->speed_capa = RTE_ETH_LINK_SPEED_FIXED;
379380
dev_info->rx_offload_capa =
380381
RTE_ETH_RX_OFFLOAD_TIMESTAMP;

drivers/net/nfb/nfb_rx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ nfb_eth_rx_queue_setup(struct rte_eth_dev *dev,
8282
int nfb_qid;
8383
int ret;
8484

85+
int nmp;
86+
if (rx_conf->rx_nmempool > 0) {
87+
nmp = rx_queue_id % rx_conf->rx_nmempool;
88+
mb_pool = rx_conf->rx_mempools[nmp];
89+
}
8590
rxq = rte_zmalloc_socket("ndp rx queue",
8691
sizeof(struct ndp_rx_queue),
8792
RTE_CACHE_LINE_SIZE, socket_id);

0 commit comments

Comments
 (0)