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 D1A82A48F; Fri, 20 Apr 2018 06:08:53 +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 7B0F730C017; Thu, 19 Apr 2018 21:08:52 -0700 (PDT) Received: from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.117.56]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id AF08BAC0729; Thu, 19 Apr 2018 21:08:51 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org Date: Thu, 19 Apr 2018 21:08:45 -0700 Message-Id: <20180420040845.84616-4-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180420040845.84616-1-ajit.khaparde@broadcom.com> References: <20180420040845.84616-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix mbuf data_off 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 04:08:54 -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 --- 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)