summaryrefslogtreecommitdiff
path: root/drivers/net/bnxt/bnxt_rxr.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2018-04-20 07:22:02 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-27 15:54:56 +0100
commitc4fed4ff4fb20dc43036c6874c00846750990704 (patch)
treed0f5ba2ff77cf0cfff747c6de089c9c258ec0df6 /drivers/net/bnxt/bnxt_rxr.c
parent1b533790f44ee160bae86bdcc5307d7b52225726 (diff)
downloaddpdk-next-eventdev-c4fed4ff4fb20dc43036c6874c00846750990704.zip
dpdk-next-eventdev-c4fed4ff4fb20dc43036c6874c00846750990704.tar.gz
dpdk-next-eventdev-c4fed4ff4fb20dc43036c6874c00846750990704.tar.xz
net/bnxt: fix mbuf data offset initialization
Initialize mbuf->data_off to RTE_PKTMBUF_HEADROOM after allocation. Without this, it might be possible that the DMA address provided to the HW may not be in sync to what is indicated to the application in bnxt_rx_pkt. Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net/bnxt/bnxt_rxr.c')
-rw-r--r--drivers/net/bnxt/bnxt_rxr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 4bc3204..7b956ac 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -46,6 +46,7 @@ static inline int bnxt_alloc_rx_data(struct bnxt_rx_queue *rxq,
}
rx_buf->mbuf = mbuf;
+ mbuf->data_off = RTE_PKTMBUF_HEADROOM;
rxbd->addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));
@@ -73,6 +74,7 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
rx_buf->mbuf = mbuf;
+ mbuf->data_off = RTE_PKTMBUF_HEADROOM;
rxbd->addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));