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 52BCDA04DD for ; Wed, 28 Oct 2020 11:56:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C576CB00; Wed, 28 Oct 2020 11:56:43 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by dpdk.org (Postfix) with ESMTP id 396E7C9D6 for ; Wed, 28 Oct 2020 11:56:39 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id t3so1877144wmi.3 for ; Wed, 28 Oct 2020 03:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Shg4uAt1oatwhRhL224wQWiPqGPuqMAv9+nNmh4d438=; b=uHPBUR6JeVvPe7KxyyY+6DpfnRAaksu3dRtH+AGniuilIHilvZyHlkFalJv9iLDXT2 1iutIakpzvNPp8Qds7Fs/Oc1uLY2SiIcI90Npa2ZqJXq9Hyd0izykd7ARq4bRB3NO0/J n0Lf7iTD28pvcJTCEyTDIvEEdvOwkUgJhORsGDux8QjuLp24BFkDL/bBlgmWGwDnhKwq Bxu0er3jswHCbFccIkdBXoMKHMyHag/4V2bEd0l6qfE/+fQT8MkHA4Bx4uEAFkKAKhCN kPj53iqFVheGvH50MDVSUytklU11S13J3S9DHT8Aqfe6TmRrAgIZgbh5j3LwU+7Q1Mho IwzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Shg4uAt1oatwhRhL224wQWiPqGPuqMAv9+nNmh4d438=; b=N5tM8UTH70DAad3wFtMnr712vI+HnAuRALIHcX5WSQkG7xqyszeTfSI4eSsoeBLx/l zPIAO/OGNjYr1+iX2TddwnWUG5wYnO/xkfE8k8S+fdM8UKgkuRkNC3Q4oC18E7/iRdXS C4f28xP//dwP4HUzG6NaXIwBFeCi79lk1HWCZXuYgD5aCs+dJ2/gMp3vAAZNAZYK2JtJ VOQ2hLic7QgjO67wdgGFMBkciP3FbBJ6LgSOEek28CH5dwoPIfjM/5C/YmylfziAVbfA P6v6GqsteWpR61e+5Uzy/SimBcGHCCg1ZLxVEKF5kISg7qJKt0Fml32lblfm5VtrzFc5 QgZw== X-Gm-Message-State: AOAM5327JmTaa7VJJv24XzowEog/kA8QKOcmvpKVpzwFmK6XQCr2SkdY HZtcgeRmhXBhiBWot/+hG2A= X-Google-Smtp-Source: ABdhPJyT0B+KeqL0RdkEk9V1odeNep1Lmk9oBAtiLTzyXU85HaPr6gDd7Wd7crh+yQU9p+BFzBeGhQ== X-Received: by 2002:a1c:5a06:: with SMTP id o6mr7725374wmb.181.1603882598935; Wed, 28 Oct 2020 03:56:38 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x65sm6165239wmg.1.2020.10.28.03.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:56:38 -0700 (PDT) From: luca.boccassi@gmail.com To: Sarosh Arif Cc: Lukasz Wojciechowski , David Hunt , dpdk stable Date: Wed, 28 Oct 2020 10:45:57 +0000 Message-Id: <20201028104606.3504127-198-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' has been queued to stable release 19.11.6 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 stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/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. Thanks. Luca Boccassi --- >From cb224aacbc652fe4f706bc84e07833f01d93cf51 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 --- app/test/test_distributor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 281b015363..3b2a4cbcf9 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) printf("Line %d: Error, not all packets flushed. " "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -160,6 +161,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) printf("Line %d: Error, not all packets flushed. " "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -188,6 +190,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) printf("Line %d: Error, not all packets flushed. " "Expected %u, got %u\n", __LINE__, BURST, total_packet_count()); + rte_mempool_put_bulk(p, (void *)bufs, BURST); return -1; } @@ -243,6 +246,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) if (num_returned != BIG_BATCH) { printf("line %d: Missing packets, expected %d\n", __LINE__, num_returned); + rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH); return -1; } @@ -257,6 +261,7 @@ 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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:17.828051142 +0000 +++ 0198-test-distributor-fix-mbuf-leak-on-failure.patch 2020-10-28 10:35:11.804834440 +0000 @@ -1,8 +1,10 @@ -From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001 +From cb224aacbc652fe4f706bc84e07833f01d93cf51 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. @@ -12,7 +14,6 @@ fails and returns. Fixes: c3eabff124e6 ("distributor: add unit tests") -Cc: stable@dpdk.org Signed-off-by: Sarosh Arif Acked-by: Lukasz Wojciechowski @@ -22,7 +23,7 @@ 1 file changed, 5 insertions(+) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c -index e0cb698e1c..73d735aa75 100644 +index 281b015363..3b2a4cbcf9 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)