From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 98A2758EC for ; Fri, 21 Apr 2017 08:23:06 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 23:23:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,229,1488873600"; d="scan'208";a="77100523" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 20 Apr 2017 23:23:05 -0700 From: Yuanhan Liu To: Michal Krawczyk Cc: Yuanhan Liu , Jakub Palider , Jan Medala , dpdk stable Date: Fri, 21 Apr 2017 14:19:33 +0800 Message-Id: <1492755587-28967-8-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1492755587-28967-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1492755587-28967-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/ena: cleanup if refilling of Rx descriptors fails' 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: Fri, 21 Apr 2017 06:23:07 -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 04/26/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 32c782c5926d9c922e04346906198674c74f8cbc Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Mon, 10 Apr 2017 16:28:10 +0200 Subject: [PATCH] net/ena: cleanup if refilling of Rx descriptors fails [ upstream commit 2732e07ad1e54c648c8ca5bc6965af5bf607ba10 ] If wrong number of descriptors for refilling was passed to the Rx repopulate function, there was memory leak which caused memory pool to run out of resources in longer go. In case of fail when refilling Rx descriptors, all additional mbufs have to be released. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Signed-off-by: Michal Krawczyk Reviewed-by: Jakub Palider Acked-by: Jan Medala --- drivers/net/ena/ena_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index c1fd7bb..a62db65 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1160,6 +1160,8 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count) rc = ena_com_add_single_rx_desc(rxq->ena_com_io_sq, &ebuf, next_to_use_masked); if (unlikely(rc)) { + rte_mempool_put_bulk(rxq->mb_pool, (void **)(&mbuf), + count - i); RTE_LOG(WARNING, PMD, "failed adding rx desc\n"); break; } -- 1.9.0