From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 504D71B74A for ; Wed, 7 Feb 2018 17:48:03 +0100 (CET) Received: by mail-wr0-f193.google.com with SMTP id i56so1762183wra.7 for ; Wed, 07 Feb 2018 08:48:03 -0800 (PST) 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; bh=dqYvHYvvB1KUJd37y3AZBp51oT7y1XbupMXtKWS514U=; b=l1bhSWbzTAKlhW/6WzeL9rxD3UJCSygWQpA13/NVY7J8t7Y6dONnhfwG65YY4YXzQT Fr2kMEemDF2uQ+VMccD9K86pc2GLi3IDosvxXu54iYF+uH+M4t2GNQRLJUNSQOCMnMEz rSjrMPixC+KvtcfYnla8ngKy40FJ7v1V8lAIIiJEHikcCymx8IGT4eyFshvxj5smIDlA Z3GV0Umt6Tu8fw+S2vXUNta676NYhWJG/7Bdzmg8H88e9uc9LbU5vUY+oB7eXBxwS/LM 4asaIPqgALNXyscj9sP83lhFWZXIpPbrWUnJ0S59Q/WUWRi3VQb4flF0ZDc4wVntpe1i B8jQ== 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; bh=dqYvHYvvB1KUJd37y3AZBp51oT7y1XbupMXtKWS514U=; b=ZukMYE6IdWR3V1oOEDCjMYJW8l7rcm6W2yOVuDD2FwwKxJfiFY2y9ZpQdvh+O24dTc TS7utl9CpozyN944iarGkI61xmCRsIq3FacmjzTJZslhSYf84PPOTZ79XQivxs+socmA D7cn2kjk6EKru8umRZaRmtnmUY6OMTtbi87s9oo8WGfIYYBJwMddlecLCHXcQq3LCyxx PSUZoOJbz8V6Bn6q8I0DIwpAdLeRCfW5AkxDPfzmZUbN/CG8Dyxi78N/3lsTG3QffHnt EMpDYnUJtTuxDucjYruAEM5I2Dn6kdBc4EoY955Xv25L7Nkq9uClWhY+p6OF2aCh7r5W cNWg== X-Gm-Message-State: APf1xPAcCeeFmX4UM9qJeoXMvSnJcY2V30zaqsskEt28GEvBoHak8Tjy htj42lqLNn6E2pPho8MXXgA= X-Google-Smtp-Source: AH8x2255ssMYJyff6MUDJJ+G6e9/rL2KDbQvjLMQq3nRwseXibsvTnLYv7an7D3V1/cjoqVFApuacA== X-Received: by 10.223.182.71 with SMTP id i7mr6073009wre.166.1518022083022; Wed, 07 Feb 2018 08:48:03 -0800 (PST) Received: from localhost ([2a00:23c5:bef3:400:9531:588b:44ae:bec4]) by smtp.gmail.com with ESMTPSA id d17sm1723340wrc.38.2018.02.07.08.48.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2018 08:48:02 -0800 (PST) From: luca.boccassi@gmail.com To: Anatoly Burakov Cc: Olivier Matz , dpdk stable Date: Wed, 7 Feb 2018 16:47:02 +0000 Message-Id: <20180207164705.29052-31-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180207164705.29052-1-luca.boccassi@gmail.com> References: <20180126131332.15346-62-luca.boccassi@gmail.com> <20180207164705.29052-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'test/ring_perf: fix memory leak' has been queued to LTS release 16.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: Wed, 07 Feb 2018 16:48:03 -0000 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 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 --- 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<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<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<