From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 4B8B51B799 for ; Wed, 7 Feb 2018 10:00:18 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C674920F27; Wed, 7 Feb 2018 04:00:17 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 07 Feb 2018 04:00:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=KEAYk50vLqQgVirT1 gEdExhlH4kCtC63qQ6mYE/eQFQ=; b=QgpWt4l34Aw1B4gVlPbBUGE3ybiYfRCxO fjA6N3/NzL0ttz7v/Ele5XE6JW9jp79N4AEW6KUJsdCpjaHshsQuOMTJ8QQjmBZz QuaYqQZ+kHuwcoGc+lvKnjnhCfNBJzqBl57PgFi6UWwgVlN8Du4kLLIUkN0uFLBw L5rfqGlzHNrT7hAYs4sJ0j3qKVzCr0o3JhMb9gwNcJMSlqf1nh2x4m3TIFSNX5NB LPOMIWs02w0hQ+RPmlQfa0v7wxBpS1agApSQMWJsgxqYYEQyzOd3gsUVYG+CYG+I rI8qDjDwKbA6VfZQEnu1mX3PXkgXrAjlqL3ErLDmoqUyqDQF50apQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=KEAYk50vLqQgVirT1gEdExhlH4kCtC63qQ6mYE/eQFQ=; b=OuXr17TJ jyxHNW/cKDazUfANxn42q5snpcRqQpKIFKvJnGGTPS2wPw+/RdiW2ydJBNIPM8rY eJhQ32BS9cYD0X1MV4PwIJD6V+fCKXn2KJ7v4+Qyoz9b36K0e4s06OsX9npZdxDQ MM4lj4Q6bN2gfAHrPhJIIsawck8S92MzsPm89shkwN2NtOCG7wAABEnw1xxSSSv+ 1KQdS1/VKrzaxaP7ItKJOiby4lSlb4GauoZXQywokyfWlfeYIwYPf7nCycXZ3BVZ OZbnfZ7W6/YM27igEJwmkv3mDLG1I74YravzEhWzkcdVd0vSXA4LobW1MXNCbusP qF3zpijkGQtUaw== X-ME-Sender: Received: from localhost.localdomain (unknown [182.84.161.100]) by mail.messagingengine.com (Postfix) with ESMTPA id 23201240DE; Wed, 7 Feb 2018 04:00:14 -0500 (EST) From: Yuanhan Liu To: Anatoly Burakov Cc: Olivier Matz , dpdk stable Date: Wed, 7 Feb 2018 16:57:15 +0800 Message-Id: <1517993838-26692-21-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517993838-26692-1-git-send-email-yliu@fridaylinux.org> References: <1517993838-26692-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'test/ring_perf: fix memory leak' has been queued to LTS release 17.11.1 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: Wed, 07 Feb 2018 09:00:18 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 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. --yliu --- >>From 763a2d2512886e37c69d54fdeee601f6e7fb5b84 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov 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 Acked-by: Olivier Matz --- test/test/test_ring_perf.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/test/test/test_ring_perf.c b/test/test/test_ring_perf.c index 84d2003..66aa51a 100644 --- a/test/test/test_ring_perf.c +++ b/test/test/test_ring_perf.c @@ -61,9 +61,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; }; @@ -144,7 +141,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<r; const unsigned size = params->size; unsigned i; void *burst[MAX_BURST] = {0}; @@ -221,6 +220,7 @@ dequeue_bulk(void *p) const unsigned iter_shift = 23; const unsigned iterations = 1<r; const unsigned size = params->size; unsigned i; void *burst[MAX_BURST] = {0}; @@ -251,7 +251,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}; @@ -259,6 +259,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); @@ -281,7 +282,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<