Unlike ffs() rte_bsf32() counts bit position from 0. Fixes: 0c7a0c35f24c ("net/sfc: calculate Rx buffer size which may be used") Cc: sta...@dpdk.org
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com> --- drivers/net/sfc/sfc_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index abc53fb..64bc9d4 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -887,7 +887,7 @@ sfc_rx_mbuf_data_alignment(struct rte_mempool *mb_pool) order = MIN(order, rte_bsf32(data_off)); - return 1u << (order - 1); + return 1u << order; } static uint16_t -- 2.7.4