All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/sfc: fix mbuf data alignment calculation
@ 2018-03-19  7:50 Andrew Rybchenko
  2018-03-27 18:37 ` [dpdk-stable] " 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 related	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] net/sfc: fix mbuf data alignment calculation
  2018-03-19  7:50 [PATCH] net/sfc: fix mbuf data alignment calculation Andrew Rybchenko
@ 2018-03-27 18:37 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-03-27 18:37 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: stable

On 3/19/2018 7:50 AM, Andrew Rybchenko wrote:
> 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>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-27 18:37 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 [PATCH] net/sfc: fix mbuf data alignment calculation Andrew Rybchenko
2018-03-27 18:37 ` [dpdk-stable] " Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.