[dpdk-stable] patch 'test: release ring resources after PMD perf test' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Fri Nov 30 00:11:51 CET 2018
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 <phil.yang at arm.com>
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 <phil.yang at arm.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
---
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 <rte_launch.h>
#include <rte_ethdev.h>
#include <rte_eth_ring.h>
+#include <rte_bus_vdev.h>
#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 <phil.yang at arm.com>
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 at dpdk.org
Signed-off-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
@@ -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 <rte_launch.h>
#include <rte_ethdev.h>
#include <rte_eth_ring.h>
@@ -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();
More information about the stable
mailing list