From: luca.boccassi@gmail.com
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: Olivier Matz <olivier.matz@6wind.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'test/ring_perf: fix memory leak' has been queued to LTS release 16.11.5
Date: Wed, 7 Feb 2018 16:47:02 +0000 [thread overview]
Message-ID: <20180207164705.29052-31-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20180207164705.29052-1-luca.boccassi@gmail.com>
Hi,
FYI, your patch has been queued to LTS release 16.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 02/09/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 6bfcc3271016cab722c12b11f178b4ca82b06b67 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:40 +0000
Subject: [PATCH] test/ring_perf: fix memory leak
[ upstream commit cac64abd2572e3d9b1a34d44bbb3fcaf359d3d14 ]
Fixes: ac3fb3019c52 ("app: rework ring tests")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test/test_ring_perf.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index 320c20cd2..b4e4daeca 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -60,9 +60,6 @@
*/
static const volatile unsigned bulk_sizes[] = { 8, 32 };
-/* The ring structure used for tests */
-static struct rte_ring *r;
-
struct lcore_pair {
unsigned c1, c2;
};
@@ -143,7 +140,7 @@ get_two_sockets(struct lcore_pair *lcp)
/* Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */
static void
-test_empty_dequeue(void)
+test_empty_dequeue(struct rte_ring *r)
{
const unsigned iter_shift = 26;
const unsigned iterations = 1<<iter_shift;
@@ -171,6 +168,7 @@ test_empty_dequeue(void)
* and return two. Input = burst size, output = cycle average for sp/sc & mp/mc
*/
struct thread_params {
+ struct rte_ring *r;
unsigned size; /* input value, the burst size */
double spsc, mpmc; /* output value, the single or multi timings */
};
@@ -185,6 +183,7 @@ enqueue_bulk(void *p)
const unsigned iter_shift = 23;
const unsigned iterations = 1<<iter_shift;
struct thread_params *params = p;
+ struct rte_ring *r = params->r;
const unsigned size = params->size;
unsigned i;
void *burst[MAX_BURST] = {0};
@@ -220,6 +219,7 @@ dequeue_bulk(void *p)
const unsigned iter_shift = 23;
const unsigned iterations = 1<<iter_shift;
struct thread_params *params = p;
+ struct rte_ring *r = params->r;
const unsigned size = params->size;
unsigned i;
void *burst[MAX_BURST] = {0};
@@ -250,7 +250,7 @@ dequeue_bulk(void *p)
* used to measure ring perf between hyperthreads, cores and sockets.
*/
static void
-run_on_core_pair(struct lcore_pair *cores,
+run_on_core_pair(struct lcore_pair *cores, struct rte_ring *r,
lcore_function_t f1, lcore_function_t f2)
{
struct thread_params param1 = {0}, param2 = {0};
@@ -258,6 +258,7 @@ run_on_core_pair(struct lcore_pair *cores,
for (i = 0; i < sizeof(bulk_sizes)/sizeof(bulk_sizes[0]); i++) {
lcore_count = 0;
param1.size = param2.size = bulk_sizes[i];
+ param1.r = param2.r = r;
if (cores->c1 == rte_get_master_lcore()) {
rte_eal_remote_launch(f2, ¶m2, cores->c2);
f1(¶m1);
@@ -280,7 +281,7 @@ run_on_core_pair(struct lcore_pair *cores,
* takes on a single lcore. Result is for comparison with the bulk enq+deq.
*/
static void
-test_single_enqueue_dequeue(void)
+test_single_enqueue_dequeue(struct rte_ring *r)
{
const unsigned iter_shift = 24;
const unsigned iterations = 1<<iter_shift;
@@ -313,7 +314,7 @@ test_single_enqueue_dequeue(void)
* as for the bulk function called on a single lcore.
*/
static void
-test_burst_enqueue_dequeue(void)
+test_burst_enqueue_dequeue(struct rte_ring *r)
{
const unsigned iter_shift = 23;
const unsigned iterations = 1<<iter_shift;
@@ -347,7 +348,7 @@ test_burst_enqueue_dequeue(void)
/* Times enqueue and dequeue on a single lcore */
static void
-test_bulk_enqueue_dequeue(void)
+test_bulk_enqueue_dequeue(struct rte_ring *r)
{
const unsigned iter_shift = 23;
const unsigned iterations = 1<<iter_shift;
@@ -385,32 +386,35 @@ static int
test_ring_perf(void)
{
struct lcore_pair cores;
+ struct rte_ring *r = NULL;
+
r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), 0);
- if (r == NULL && (r = rte_ring_lookup(RING_NAME)) == NULL)
+ if (r == NULL)
return -1;
printf("### Testing single element and burst enq/deq ###\n");
- test_single_enqueue_dequeue();
- test_burst_enqueue_dequeue();
+ test_single_enqueue_dequeue(r);
+ test_burst_enqueue_dequeue(r);
printf("\n### Testing empty dequeue ###\n");
- test_empty_dequeue();
+ test_empty_dequeue(r);
printf("\n### Testing using a single lcore ###\n");
- test_bulk_enqueue_dequeue();
+ test_bulk_enqueue_dequeue(r);
if (get_two_hyperthreads(&cores) == 0) {
printf("\n### Testing using two hyperthreads ###\n");
- run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+ run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
}
if (get_two_cores(&cores) == 0) {
printf("\n### Testing using two physical cores ###\n");
- run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+ run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
}
if (get_two_sockets(&cores) == 0) {
printf("\n### Testing using two NUMA nodes ###\n");
- run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+ run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
}
+ rte_ring_free(r);
return 0;
}
--
2.14.2
next prev parent reply other threads:[~2018-02-07 16:48 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'eal: update assertion macro' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'contigmem: fix build on FreeBSD 12' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'mem: fix mmap error check on huge page attach' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'mbuf: cleanup function to get last segment' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: protect stats with lock' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix jumbo " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix typo in functions comment' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix NVM lock' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix link LED blink' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix compile issue for GCC 6.3' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe/base: add media type of fixed fiber' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix mailbox interrupt handler' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/crypto: fix missing include' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix mbuf free' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'mbuf: fix NULL freeing when debug enabled' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/enic: fix crash due to static max number of queues' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/mlx5: fix missing RSS capability' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/virtio: fix Rx and Tx handler selection for ARM32' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/virtio: fix queue flushing with vector Rx enabled' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/virtio: fix memory leak when reinitializing device' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/virtio: fix typo in function name' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/i40e: fix VF Rx interrupt enabling' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/bnxt: fix size of Tx ring in HW' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/qede/base: fix VF LRO tunnel configuration' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'eal/ppc: remove the braces in memory barrier macros' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'mk: support renamed Makefile in external project' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/ixgbe: fix reset error handling' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'test/pmd_perf: declare variables as static' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'examples/bond: check mbuf allocation' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'mk: fix external build' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'test/memzone: handle previously allocated memzones' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'usertools/devbind: remove unused function' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'net/qede: fix few log messages' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " luca.boccassi
2018-02-07 16:46 ` [dpdk-stable] patch 'app/testpmd: fix port topology " luca.boccassi
2018-02-07 16:47 ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " luca.boccassi
2018-02-07 16:47 ` [dpdk-stable] patch 'test/reorder: fix memory leak' " luca.boccassi
2018-02-07 16:47 ` luca.boccassi [this message]
2018-02-07 16:47 ` [dpdk-stable] patch 'test/table: " luca.boccassi
2018-02-07 16:47 ` [dpdk-stable] patch 'test/timer_perf: " luca.boccassi
2018-02-07 16:47 ` [dpdk-stable] patch 'net/i40e: fix Rx interrupt' " luca.boccassi
2018-02-09 10:40 ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
2018-02-09 10:40 ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
2018-02-11 12:49 ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
2018-02-11 12:49 ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'net/virtio: fix resuming port with Rx vector path' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'net/vhost: fix log messages on create/destroy' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'examples/exception_path: align stats on cache line' " Luca Boccassi
2018-02-15 12:03 ` [dpdk-stable] patch 'doc: fix outdated link to IPsec white paper' " Luca Boccassi
2018-02-11 12:49 ` [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' " Luca Boccassi
2018-02-11 12:49 ` [dpdk-stable] patch 'igb_uio: fix MSI-X IRQ assignment with new IRQ function' " Luca Boccassi
2018-02-09 10:40 ` [dpdk-stable] patch 'net/i40e: check multi-driver option parsing' " Luca Boccassi
2018-02-09 10:40 ` [dpdk-stable] patch 'app/testpmd: fix flow director filter' " Luca Boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180207164705.29052-31-luca.boccassi@gmail.com \
--to=luca.boccassi@gmail.com \
--cc=anatoly.burakov@intel.com \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).