summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/sfc_rx.c
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchenko@solarflare.com>2018-03-19 07:50:11 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:44 +0200
commitbd0c7b4d76783484e1600ec34b0dae2c5d9ef57b (patch)
tree74933316f7a47442a8516aea71a5178c3850b2e2 /drivers/net/sfc/sfc_rx.c
parent0f5b98a56d7aa3df57861bfe9d544a53a395c913 (diff)
downloaddpdk-bd0c7b4d76783484e1600ec34b0dae2c5d9ef57b.zip
dpdk-bd0c7b4d76783484e1600ec34b0dae2c5d9ef57b.tar.gz
dpdk-bd0c7b4d76783484e1600ec34b0dae2c5d9ef57b.tar.xz
net/sfc: fix mbuf data alignment calculation
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>
Diffstat (limited to 'drivers/net/sfc/sfc_rx.c')
-rw-r--r--drivers/net/sfc/sfc_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index f7aaab0..2478a15 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