* [dpdk-stable] [PATCH] net/sfc: fix mbuf data alignment calculation
@ 2018-03-19 7:50 Andrew Rybchenko
2018-03-27 18:37 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2018-03-19 7:50 UTC (permalink / raw)
To: dev; +Cc: stable
Unlike ffs() rte_bsf32() counts bit position from 0.
Fixes: 0c7a0c35f24c ("net/sfc: calculate Rx buffer size which may be used")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-27 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 7:50 [dpdk-stable] [PATCH] net/sfc: fix mbuf data alignment calculation Andrew Rybchenko
2018-03-27 18:37 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).