From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2E77EA00E6 for ; Wed, 7 Aug 2019 15:12:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB33D2BD8; Wed, 7 Aug 2019 15:12:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9E0B02BD3; Wed, 7 Aug 2019 15:12:17 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x77DBMCd018093; Wed, 7 Aug 2019 06:12:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=H4ZXD2WAsD3UKNBkGsDio+WXNTdsJGYJEDaabBjwh3Y=; b=GUpIxgKq4fgW0bletkTHzX631RoumDx80IdpxLUQ4SvPKFt9F13V2IcHvGzxQsQJnVB7 jExoHrvhmgP4Wyn3X0KZjI5L+Rx3idgGGgZsB5Wq6aYBazKKLSHpIxWmVJeRKqccwjaO tXB1WBZgjpsmSBO1LqQQgHmIQqBh+4mvRN6zk7OBfM5xRGXepVKMwZnNJAST3wwHGtCW vgWqkOMT9HCP1zVOpI0mqu1nBpsaN0S/DBMSepW1r0UTKjIjwV08GLuz/7QA9ompmFna 6vaMBLo7I53WGfu/TuT7X/nxsXLyuCLh72CYOQ4yTrmEMfG19wflvdQ8NBNbS6UJxip0 /A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2u57mr84rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 07 Aug 2019 06:12:16 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 7 Aug 2019 06:12:15 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 7 Aug 2019 06:12:15 -0700 Received: from dc7-eodlnx01.marvell.com (dc7-eodlnx01.marvell.com [10.28.113.51]) by maili.marvell.com (Postfix) with ESMTP id 906D93F7040; Wed, 7 Aug 2019 06:12:13 -0700 (PDT) From: To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger CC: , , Amit Gupta Date: Wed, 7 Aug 2019 18:42:09 +0530 Message-ID: <1565183529-641-1-git-send-email-agupta3@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-07_03:2019-08-07,2019-08-07 signatures=0 Subject: [dpdk-dev] [PATCH] app/testpmd: fix latencystats deinit on signal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Amit Gupta 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 --- 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