Blame SOURCES/bnxt-dpdk-0003-net-bnxt-fix-mbuf-data-offset-initialization.patch

a6040a
From e5c04b1d1bc83115a2cc28615a5d5c6645c66cd4 Mon Sep 17 00:00:00 2001
a6040a
Message-Id: <e5c04b1d1bc83115a2cc28615a5d5c6645c66cd4.1524241750.git.dcaratti@redhat.com>
a6040a
In-Reply-To: <02bd8182658600ebf2cbe61168e80c19ce4cdaa5.1524241750.git.dcaratti@redhat.com>
a6040a
References: <02bd8182658600ebf2cbe61168e80c19ce4cdaa5.1524241750.git.dcaratti@redhat.com>
a6040a
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
a6040a
Date: Fri, 20 Apr 2018 07:22:02 -0700
a6040a
Subject: [PATCH 3/3] net/bnxt: fix mbuf data offset initialization
a6040a
a6040a
Initialize mbuf->data_off to RTE_PKTMBUF_HEADROOM after allocation.
a6040a
Without this, it might be possible that the DMA address provided
a6040a
to the HW may not be in sync to what is indicated to the application
a6040a
in bnxt_rx_pkt.
a6040a
a6040a
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
a6040a
Cc: stable@dpdk.org
a6040a
a6040a
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
a6040a
---
a6040a
 drivers/net/bnxt/bnxt_rxr.c | 2 ++
a6040a
 1 file changed, 2 insertions(+)
a6040a
a6040a
backport notes:
a6040a
 - use data->data_off instead off mbuf->data_off, because we miss
a6040a
   upstream commit 42b883535804 ("net/bnxt: use new API to get IOVA
a6040a
   address")
a6040a
a6040a
--- a/drivers/net/bnxt/bnxt_rxr.c
a6040a
+++ b/drivers/net/bnxt/bnxt_rxr.c
a6040a
@@ -74,6 +74,7 @@ static inline int bnxt_alloc_rx_data(str
a6040a
 	}
a6040a
 
a6040a
 	rx_buf->mbuf = data;
a6040a
+	data->data_off = RTE_PKTMBUF_HEADROOM;
a6040a
 
a6040a
 	rxbd->addr = rte_cpu_to_le_64(RTE_MBUF_DATA_DMA_ADDR(rx_buf->mbuf));
a6040a
 
a6040a
@@ -101,6 +102,7 @@ static inline int bnxt_alloc_ag_data(str
a6040a
 
a6040a
 
a6040a
 	rx_buf->mbuf = data;
a6040a
+	data->data_off = RTE_PKTMBUF_HEADROOM;
a6040a
 
a6040a
 	rxbd->addr = rte_cpu_to_le_64(RTE_MBUF_DATA_DMA_ADDR(rx_buf->mbuf));
a6040a