From a5fce9670357d3a0c136f881f33df62a6461783c Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Thu, 15 Jun 2017 07:43:54 +0530 Subject: [PATCH] net/cxgbe: fix alignment for data offset in mbuf Fixup alignment for data offset when refilling mbufs. Fixes: edd04c619685 ("net/cxgbe: update Rx path for Chelsio T6") Signed-off-by: Rahul Lakkireddy Signed-off-by: Kumar Sanghvi --- drivers/net/cxgbe/sge.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index 22a168c43a..e281020017 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -415,7 +415,11 @@ static unsigned int refill_fl_usembufs(struct adapter *adap, struct sge_fl *q, } rte_mbuf_refcnt_set(mbuf, 1); - mbuf->data_off = RTE_PKTMBUF_HEADROOM; + mbuf->data_off = + (uint16_t)(RTE_PTR_ALIGN((char *)mbuf->buf_addr + + RTE_PKTMBUF_HEADROOM, + adap->sge.fl_align) - + (char *)mbuf->buf_addr); mbuf->next = NULL; mbuf->nb_segs = 1; mbuf->port = rxq->rspq.port_id; -- 2.20.1