dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: <agupta3@marvell.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>, Amit Gupta <agupta3@marvell.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: fix latencystats deinit on signal
Date: Wed, 7 Aug 2019 18:42:09 +0530	[thread overview]
Message-ID: <1565183529-641-1-git-send-email-agupta3@marvell.com> (raw)

From: Amit Gupta <agupta3@marvell.com>

On receiving signal, testpmd showing warning as
"LATENCY_STATS: failed to remove Rx/Tx callback"
because rte_latencystats_uninit is called without
checking if latencystats is enabled or not.

After this fix, rte_latencystats_uninit will be
called onlyif latencystats is enabled.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")
Cc: stable@dpdk.org

Signed-off-by: Amit Gupta <agupta3@marvell.com>
---
 app/test-pmd/testpmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a461cef..e8e2a39 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3212,7 +3212,8 @@ uint8_t port_is_bonding_slave(portid_t slave_pid)
 		rte_pdump_uninit();
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
-		rte_latencystats_uninit();
+		if (latencystats_enabled != 0)
+			rte_latencystats_uninit();
 #endif
 		force_quit();
 		/* Set flag to indicate the force termination. */
-- 
1.8.3.1


             reply	other threads:[~2019-08-07 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 13:12 agupta3 [this message]
2019-08-08  8:54 ` [dpdk-dev] [PATCH] app/testpmd: fix latencystats deinit on signal Jerin Jacob Kollanukkaran
2019-08-08 10:15   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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=1565183529-641-1-git-send-email-agupta3@marvell.com \
    --to=agupta3@marvell.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /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).