From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 69BF7567F for ; Tue, 2 May 2017 11:36:40 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2017 02:36:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,404,1488873600"; d="scan'208";a="1163483239" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga002.fm.intel.com with ESMTP; 02 May 2017 02:36:39 -0700 From: Yuanhan Liu To: Jerin Jacob Cc: Yuanhan Liu , dpdk stable Date: Tue, 2 May 2017 17:32:25 +0800 Message-Id: <1493717548-12434-24-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1493717548-12434-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1493717548-12434-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/thunderx: fix deadlock in Rx path' has been queued to LTS release 16.11.2 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: Tue, 02 May 2017 09:36:41 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.2 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/07/17. So please shout if anyone has objections. Thanks. --yliu --- >>From dbcd67e3b000adcece8aa962cd85c5a4b3514585 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Tue, 2 May 2017 00:11:55 +0530 Subject: [PATCH] net/thunderx: fix deadlock in Rx path [ upstream commit b31eb105463fa1844c19fde382dd6bd294329831 ] RBDR buffers are refilled when SW consumes the buffers from CQ. This creates deadlock case when CQ buffers exhausted due to lack of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh meet, irrespective of the number of CQ buffers consumed. Fixes: e2d7fc9f0a24 ("net/thunderx: add single and multi-segment Rx") Signed-off-by: Jerin Jacob --- drivers/net/thunderx/nicvf_rxtx.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index fc43b74..87e9de1 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -469,11 +469,10 @@ nicvf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxq->head = cqe_head; nicvf_addr_write(rxq->cq_door, to_process); rxq->recv_buffers += to_process; - if (rxq->recv_buffers > rxq->rx_free_thresh) { - rxq->recv_buffers -= nicvf_fill_rbdr(rxq, - rxq->rx_free_thresh); - NICVF_RX_ASSERT(rxq->recv_buffers >= 0); - } + } + if (rxq->recv_buffers > rxq->rx_free_thresh) { + rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); + NICVF_RX_ASSERT(rxq->recv_buffers >= 0); } return to_process; @@ -563,11 +562,10 @@ nicvf_recv_pkts_multiseg(void *rx_queue, struct rte_mbuf **rx_pkts, rxq->head = cqe_head; nicvf_addr_write(rxq->cq_door, to_process); rxq->recv_buffers += buffers_consumed; - if (rxq->recv_buffers > rxq->rx_free_thresh) { - rxq->recv_buffers -= - nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); - NICVF_RX_ASSERT(rxq->recv_buffers >= 0); - } + } + if (rxq->recv_buffers > rxq->rx_free_thresh) { + rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); + NICVF_RX_ASSERT(rxq->recv_buffers >= 0); } return to_process; -- 1.9.0