From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A461A0524; Tue, 1 Jun 2021 07:21:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1379F40041; Tue, 1 Jun 2021 07:21:47 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3800340040; Tue, 1 Jun 2021 07:21:46 +0200 (CEST) IronPort-SDR: /e/mhQ/d4btwo0x+AeVLtsV9CXJszDCW/vveaYTPUjHRlkDMFwlMe0pD7kNYl4BWT1Ia61qeyE jYLUGUKqJvYQ== X-IronPort-AV: E=McAfee;i="6200,9189,10001"; a="190589621" X-IronPort-AV: E=Sophos;i="5.83,239,1616482800"; d="scan'208";a="190589621" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2021 22:21:44 -0700 IronPort-SDR: FrqhYCgW998oDq5dYa7vjNAd4yOqm4EI0CI7abX0Xg27CnCGOn0qqH2NlMETFgQZD0YOABmXNZ uyS0SzuGb4iA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,239,1616482800"; d="scan'208";a="479134098" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.182]) by orsmga001.jf.intel.com with ESMTP; 31 May 2021 22:21:43 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, Beilei Xing , stable@dpdk.org Date: Tue, 1 Jun 2021 13:09:51 +0800 Message-Id: <20210601050951.37739-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/iavf: fix Rx issue for scalar Rx functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Beilei Xing The new allocated mbuf should be updated to the SW ring. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path") Cc: stable@dpdk.org Signed-off-by: Beilei Xing --- drivers/net/iavf/iavf_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 6a713df828..3aad050f19 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1218,6 +1218,7 @@ iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (unlikely(rx_id == rxq->nb_rx_desc)) rx_id = 0; @@ -1323,6 +1324,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (unlikely(rx_id == rxq->nb_rx_desc)) rx_id = 0; @@ -1414,6 +1416,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (rx_id == rxq->nb_rx_desc) rx_id = 0; @@ -1567,6 +1570,7 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (rx_id == rxq->nb_rx_desc) rx_id = 0; -- 2.26.2