net/af_xdp: fix umem frame size and headroom
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 13 Feb 2020 08:49:12 +0000 (08:49 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 14 Feb 2020 11:42:12 +0000 (12:42 +0100)
commitb79ae90c78a143605610ed5c7d59d42c0846847f
treeb91bf83ae4b775cccc4024c972e74529f00d8867
parent2df00d562d203fb1450261c26d0ffa47b8007089
net/af_xdp: fix umem frame size and headroom

The previous frame size calculation incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size.
Instead of performing a manual calculation, use the
rte_mempool_calc_obj_size API to determine the frame size.

The previous frame headroom calculation also incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size or
the mbuf priv size. Fix this.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/af_xdp/rte_eth_af_xdp.c