From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C125CA04DD for ; Wed, 18 Nov 2020 17:37:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44135C908; Wed, 18 Nov 2020 17:37:34 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 99BC8C8C6 for ; Wed, 18 Nov 2020 17:37:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605717450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N/WqshpjEv40qd7p9uH+iTEvqssPGVOXc3TQ6XUBO4c=; b=ThTLq27CfybtjpNWXtckPCIw27kAEYcs5aneBfoq/wnd1zngBod2X4LRo4MP6TVNApwB/Z EvtAvk917drIxUpUE/pX24XpnTpU4K5wrALUnHZtDU1CwVP77QJTLC8z+ApuT8/0Zrvlde dycLehl10JLn37HsRfvPsMCXtYmD9qM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-456-l6ldxbAINB6xV_HHVOd2kA-1; Wed, 18 Nov 2020 11:37:26 -0500 X-MC-Unique: l6ldxbAINB6xV_HHVOd2kA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 905DDCE1DA; Wed, 18 Nov 2020 16:37:11 +0000 (UTC) Received: from rh.redhat.com (ovpn-113-249.ams2.redhat.com [10.36.113.249]) by smtp.corp.redhat.com (Postfix) with ESMTP id 546815C1A3; Wed, 18 Nov 2020 16:37:10 +0000 (UTC) From: Kevin Traynor To: Sarosh Arif Cc: Lukasz Wojciechowski , David Hunt , dpdk stable Date: Wed, 18 Nov 2020 16:35:19 +0000 Message-Id: <20201118163558.1101823-33-ktraynor@redhat.com> In-Reply-To: <20201118163558.1101823-1-ktraynor@redhat.com> References: <20201118163558.1101823-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' has been queued to LTS release 18.11.11 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Thanks. Kevin. --- >From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001 From: Sarosh Arif Date: Tue, 8 Sep 2020 15:22:04 +0500 Subject: [PATCH] test/distributor: fix mbuf leak on failure [ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ] rte_mempool_get_bulk is used to get bufs/many_bufs from the pool, but at some locations when test fails the bufs/many_bufs are not returned back to the pool. Due to this, multiple executions of distributor_autotest gives the following error message: Error getting mbufs from pool. To resolve this issue rte_mempool_put_bulk is used whenever the test fails and returns. Fixes: c3eabff124e6 ("distributor: add unit tests") Signed-off-by: Sarosh Arif Acked-by: Lukasz Wojciechowski Reviewed-by: David Hunt --- test/test/test_distributor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c index e00966366d..aa9d35a302 100644 --- a/test/test/test_distributor.c +++ b/test/test/test_distributor.c @@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) printf("line %d: Missing packets, expected %d\n", __LINE__, num_returned); + rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH); return -1; } @@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) if (j == BIG_BATCH) { printf("Error: could not find source packet #%u\n", i); + rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH); return -1; } -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-18 16:33:38.573397934 +0000 +++ 0033-test-distributor-fix-mbuf-leak-on-failure.patch 2020-11-18 16:33:37.935215066 +0000 @@ -1 +1 @@ -From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001 +From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ - app/test/test_distributor.c | 5 +++++ + test/test/test_distributor.c | 5 +++++ @@ -24,5 +25,5 @@ -diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c -index e0cb698e1c..73d735aa75 100644 ---- a/app/test/test_distributor.c -+++ b/app/test/test_distributor.c -@@ -135,4 +135,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) +diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c +index e00966366d..aa9d35a302 100644 +--- a/test/test/test_distributor.c ++++ b/test/test/test_distributor.c +@@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) @@ -34 +35 @@ -@@ -161,4 +162,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) +@@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) @@ -40 +41 @@ -@@ -189,4 +191,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) +@@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) @@ -46 +47 @@ -@@ -244,4 +247,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) +@@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) @@ -52 +53 @@ -@@ -258,4 +262,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) +@@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)