From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 538549957 for ; Thu, 25 May 2017 11:51:35 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2017 02:51:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,391,1491289200"; d="scan'208";a="91624472" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 25 May 2017 02:51:33 -0700 From: Yuanhan Liu To: Michal Krawczyk Cc: Yuanhan Liu , Jakub Palider , Jan Medala , dpdk stable Date: Thu, 25 May 2017 17:48:54 +0800 Message-Id: <1495705809-21416-82-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/ena: fix delayed cleanup of Rx descriptors' has been queued to stable release 17.02.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 09:51:35 -0000 Hi, FYI, your patch has been queued to stable release 17.02.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/28/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 4284e185f6acb951adeaa9783b4f252dfab128a0 Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Mon, 10 Apr 2017 16:28:09 +0200 Subject: [PATCH] net/ena: fix delayed cleanup of Rx descriptors [ upstream commit ec78af6bc0556cf2a1133185ca33fb835b38afe0 ] On RX path, after receiving bunch of packets, variable tracking available descriptors in HW queue was not updated. To fix this issue, variable tracking used descriptors must be updated after receiving packets - it must be reduced by the amount of received descriptors in current batch. Additionally, variable next_to_clean in rx_ring must be updated before entering ena_populate_rx_queue() to keep it up to date with the current ring state. Fixes: 1daff5260ff8 ("net/ena: use unmasked head and tail") Signed-off-by: Michal Krawczyk Reviewed-by: Jakub Palider Acked-by: Jan Medala --- drivers/net/ena/ena_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 90cf2ad..b4c713f 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1575,13 +1575,13 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, recv_idx++; } - desc_in_use += 1; + rx_ring->next_to_clean = next_to_clean; + + desc_in_use = desc_in_use - completed + 1; /* Burst refill to save doorbells, memory barriers, const interval */ if (ring_size - desc_in_use > ENA_RING_DESCS_RATIO(ring_size)) ena_populate_rx_queue(rx_ring, ring_size - desc_in_use); - rx_ring->next_to_clean = next_to_clean; - return recv_idx; } -- 1.9.0