[dpdk-dev] [PATCH] net/sfc: fix mbuf data alignment calculation
Andrew Rybchenko
arybchenko at solarflare.com
Mon Mar 19 08:50:11 CET 2018
Unlike ffs() rte_bsf32() counts bit position from 0.
Fixes: 0c7a0c35f24c ("net/sfc: calculate Rx buffer size which may be used")
Cc: stable at dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko at 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
More information about the dev
mailing list