]> git.droids-corp.org - dpdk.git/commit
net/af_xdp: fix shared UMEM fill queue reserve
authorCiara Loftus <ciara.loftus@intel.com>
Fri, 11 Mar 2022 13:45:13 +0000 (13:45 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 Mar 2022 09:48:18 +0000 (10:48 +0100)
commit6dd3286f3a62be287899551b9c422e579af95b0b
tree48052a226c7b18da78da98625274d067f972a328
parent6f6134c35e3d2340e07f86414c75413e3ac7a0bc
net/af_xdp: fix shared UMEM fill queue reserve

Commit 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create")
moves the fill queue reserve logic to before the creation of the socket in
order to suppress kernel logs like:

XSK buffer pool does not provide enough addresses to fill 2047 buffers on
Rx ring 0

However, for queues that share umem, the fill queue reserve must occur
after the socket creation, because the fill queue is not valid until
that point.

This commit uses the umem refcnt value to determine whether the queue is
sharing a umem, and performs the fill queue reservation either before or
after the socket creation, depending on the refcnt value.

The kernel logs will still be seen for the shared umem queues.

Fixes: 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
drivers/net/af_xdp/rte_eth_af_xdp.c