From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 8985BA568; Fri, 20 Apr 2018 16:22:10 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id CA7C930C01F; Fri, 20 Apr 2018 07:22:07 -0700 (PDT) Received: from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.117.120]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 6FE7DAC076E; Fri, 20 Apr 2018 07:22:07 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 20 Apr 2018 07:22:02 -0700 Message-Id: <20180420142202.95545-4-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180420142202.95545-1-ajit.khaparde@broadcom.com> References: <46189266.0ermlJLUP5@xps> <20180420142202.95545-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH v3 3/3] net/bnxt: fix mbuf data offset initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 14:22:11 -0000 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 -- v1->v2: update commit message and commit log v2->v3: fix commit log as suggested --- drivers/net/bnxt/bnxt_rxr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 4bc320430..7b956ac78 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)); -- 2.15.1 (Apple Git-101)