summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device/common.c')
-rw-r--r--src/plugins/dpdk/device/common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index aedc3f5227d..c65cec6734d 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -78,8 +78,11 @@ dpdk_device_setup (dpdk_device_t * xd)
dpdk_device_error (xd, "rte_eth_tx_queue_setup", rv);
}
+ vec_validate_aligned (xd->buffer_pool_for_queue, xd->rx_q_used - 1,
+ CLIB_CACHE_LINE_BYTES);
for (j = 0; j < xd->rx_q_used; j++)
{
+ dpdk_mempool_private_t *privp;
uword tidx = vnet_get_device_input_thread_index (dm->vnet_main,
xd->hw_if_index, j);
unsigned lcore = vlib_worker_threads[tidx].lcore_id;
@@ -95,6 +98,9 @@ dpdk_device_setup (dpdk_device_t * xd)
SOCKET_ID_ANY, 0,
dm->pktmbuf_pools[socket_id]);
+ privp = rte_mempool_get_priv (dm->pktmbuf_pools[socket_id]);
+ xd->buffer_pool_for_queue[j] = privp->buffer_pool_index;
+
if (rv < 0)
dpdk_device_error (xd, "rte_eth_rx_queue_setup", rv);
}