DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] cxgbe: fix alignment for data offset in mbufs
@ 2017-06-15  2:13 Rahul Lakkireddy
  2017-06-15 12:19 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Lakkireddy @ 2017-06-15  2:13 UTC (permalink / raw)
  To: dev; +Cc: Nirranjan Kirubaharan, Indranil Choudhury, Kumar Sanghvi

Fixup alignment for data offset when refilling mbufs.

Fixes: edd04c619685 ("net/cxgbe: update Rx path for Chelsio T6")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
 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 d088065..4e4a462 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.5.3

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

* Re: [dpdk-dev] [PATCH] cxgbe: fix alignment for data offset in mbufs
  2017-06-15  2:13 [dpdk-dev] [PATCH] cxgbe: fix alignment for data offset in mbufs Rahul Lakkireddy
@ 2017-06-15 12:19 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-06-15 12:19 UTC (permalink / raw)
  To: Rahul Lakkireddy, dev
  Cc: Nirranjan Kirubaharan, Indranil Choudhury, Kumar Sanghvi

On 6/15/2017 3:13 AM, Rahul Lakkireddy wrote:
> Fixup alignment for data offset when refilling mbufs.
> 
> Fixes: edd04c619685 ("net/cxgbe: update Rx path for Chelsio T6")
> 
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>

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

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

end of thread, other threads:[~2017-06-15 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15  2:13 [dpdk-dev] [PATCH] cxgbe: fix alignment for data offset in mbufs Rahul Lakkireddy
2017-06-15 12:19 ` 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).