From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 331391B50E for ; Fri, 30 Nov 2018 00:15:56 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:46 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW8v032075; Fri, 30 Nov 2018 01:15:51 +0200 From: Yongseok Koh To: Phil Yang Cc: Gavin Hu , dpdk stable Date: Thu, 29 Nov 2018 15:11:51 -0800 Message-Id: <20181129231202.30436-117-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'test: release ring resources after PMD perf test' has been queued to LTS release 17.11.5 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, 29 Nov 2018 23:15:56 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From acceb2833dda32f85881e2cb279ddd0a0feebc9c Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Fri, 19 Oct 2018 19:00:38 +0800 Subject: [PATCH] test: release ring resources after PMD perf test [ upstream commit bc44d448479846966f7aedb90fefe2fa5bd20d2e ] Need to release the port and the ring resources after test. Otherwise, it will cause failure to allocate memory when reentry the test. Fixes: ea764af ("app/test: add performance test for ring driver") Signed-off-by: Phil Yang Reviewed-by: Gavin Hu --- test/test/test_pmd_ring_perf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test/test_pmd_ring_perf.c b/test/test/test_pmd_ring_perf.c index 8e9cd3310..e44676680 100644 --- a/test/test/test_pmd_ring_perf.c +++ b/test/test/test_pmd_ring_perf.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "test.h" @@ -164,6 +165,8 @@ test_bulk_enqueue_dequeue(void) static int test_ring_pmd_perf(void) { + char name[RTE_ETH_NAME_MAX_LEN]; + r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), RING_F_SP_ENQ|RING_F_SC_DEQ); if (r == NULL && (r = rte_ring_lookup(RING_NAME)) == NULL) @@ -180,6 +183,11 @@ test_ring_pmd_perf(void) printf("\n### Testing using a single lcore ###\n"); test_bulk_enqueue_dequeue(); + /* release port and ring resources */ + rte_eth_dev_stop(ring_ethdev_port); + rte_eth_dev_get_name_by_port(ring_ethdev_port, name); + rte_vdev_uninit(name); + rte_ring_free(r); return 0; } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:50.326262291 -0800 +++ 0117-test-release-ring-resources-after-PMD-perf-test.patch 2018-11-29 15:01:45.312957000 -0800 @@ -1,13 +1,14 @@ -From bc44d448479846966f7aedb90fefe2fa5bd20d2e Mon Sep 17 00:00:00 2001 +From acceb2833dda32f85881e2cb279ddd0a0feebc9c Mon Sep 17 00:00:00 2001 From: Phil Yang Date: Fri, 19 Oct 2018 19:00:38 +0800 Subject: [PATCH] test: release ring resources after PMD perf test +[ upstream commit bc44d448479846966f7aedb90fefe2fa5bd20d2e ] + Need to release the port and the ring resources after test. Otherwise, it will cause failure to allocate memory when reentry the test. Fixes: ea764af ("app/test: add performance test for ring driver") -Cc: stable@dpdk.org Signed-off-by: Phil Yang Reviewed-by: Gavin Hu @@ -16,10 +17,10 @@ 1 file changed, 8 insertions(+) diff --git a/test/test/test_pmd_ring_perf.c b/test/test/test_pmd_ring_perf.c -index ad5004a69..6318da18f 100644 +index 8e9cd3310..e44676680 100644 --- a/test/test/test_pmd_ring_perf.c +++ b/test/test/test_pmd_ring_perf.c -@@ -10,6 +10,7 @@ +@@ -39,6 +39,7 @@ #include #include #include @@ -27,7 +28,7 @@ #include "test.h" -@@ -135,6 +136,8 @@ test_bulk_enqueue_dequeue(void) +@@ -164,6 +165,8 @@ test_bulk_enqueue_dequeue(void) static int test_ring_pmd_perf(void) { @@ -36,7 +37,7 @@ r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), RING_F_SP_ENQ|RING_F_SC_DEQ); if (r == NULL && (r = rte_ring_lookup(RING_NAME)) == NULL) -@@ -151,6 +154,11 @@ test_ring_pmd_perf(void) +@@ -180,6 +183,11 @@ test_ring_pmd_perf(void) printf("\n### Testing using a single lcore ###\n"); test_bulk_enqueue_dequeue();