[dpdk-users] Swapping membuf pools while running

Filip Janiszewski contact at filipjaniszewski.com
Thu Sep 3 15:03:07 CEST 2020


Hi,

Is there a way to swap the currently configured mempool for a given
queue while the nic is up and running (so, without reconfiguration)?

The scenario would be:

a) capturing packets (rx_burst) in a loop
b) mempool configured for the queue (while calling
rte_eth_rx_queue_setup) gets filled up
c) before the next rx_burst provide an additional mempool so that the
new one is used.
d) Continue rx bursting using the new mempool

Hopefully the scenario is sufficiently clear.

Ideally I would like to run this scenario using MLX5 NICs, but for what
I was able to see this is not possible, since the DPDK driver code runs
some cache-related operations on the mempool items.

Specifically mlx5_mr_update_mp iterate over all the mbufs by calling
mlx5_mr_update_mp_cb (that does some magic cache-related stuff), which
smells to me like a roadblock for adding some handcrafted function to
swap those buffers (I think there's no explicit API in DPDK for swapping
rx queue mempools).

My idea was just to manipulate mlx5_rxq_data in mlx5_rxq_ctrl (that
contains the mempool pointer) using a new function in DPDK that access
those structures, but all those "update mp" operations above looks like
they're doing something with those mbufs so swapping pool pointer might
mess up a lot.. but not sure, any idea?

Thanks

-- 
BR, Filip
+48 666 369 823


More information about the users mailing list