From patchwork Wed May 13 10:36:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186585 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp335889ilb; Wed, 13 May 2020 03:38:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIdxiknkMtUCJPpb+KILg1nZP85CQ0xWoL/vBFYqC1BY8dxn4W/SPZEDbwDUEcceIecpe9U X-Received: by 2002:a1c:a557:: with SMTP id o84mr22554514wme.165.1589366335696; Wed, 13 May 2020 03:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589366335; cv=none; d=google.com; s=arc-20160816; b=m7u/4xL+W/QU8ZgWMQujf4eC/ayPObloFqp8RMxdyrL99uc3UwDuRQ87KX6CFIYA9s Bc2fyopcUIjdMxO7yQeLP3cxX038ZNWk9YcBVrjoDLoitdbLlMET/17Hj3J+NxeHgSGc tA1zfi9GOw8t7p06cSGpKxG3D55JbmrBLhUNMo2/lHRbBKuSPqDyiOFvRPW1qLR1ipqH PjQ7jgn4oK+wgx0Le+wns/fG424ocmdF1UIiKbCQKxk72QP8lN7rt/7bSHhL12umbbDf NNxGPRj9bnMHctj15z2jFLO6pDmY6ip3RPOLbI/Kx8u32JN5TRaOtlOdm/RX2jEQw1DT wJOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=T3pOAdtW6cNiYu1X+A5ZlOkzuk2VtggKi5IsNBj+h2U=; b=EvXFVIF2fyVDBXflYkeENXekgVbvsj0s5CpcplG8VIQo75hebvxd43iJSscQNVjINe 3yLx1mx4TmrDUZ5j+JGE+Q9oKq3uDQZ449ZSqTchlGBGOO/5PR1Xfd8ZfqK/aPADT9k3 Ov/eEMCsOV3uD6vu0UjlSmHz8FSKnpeNesqX6oddhpMuhtFPMFBJOCVybmiGLktG+SFl 7uJc0C1Fn7C3wWs3EZJ53x1H3dvPCeO/qZPj5Icwo2L19fcA6Bf5mgZ32rg0smB2m7nq cMJNkIdO7BQ5C2cMDYAKvEYw8zvDdfOg/2AUbOFbN2plrMiej/JYRoA5HsCjBoIO/STV HvdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id f1si16590418wrq.441.2020.05.13.03.38.55; Wed, 13 May 2020 03:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1213F1D15C; Wed, 13 May 2020 12:38:55 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 29C181C2F6 for ; Wed, 13 May 2020 12:38:54 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 88B75200E4C; Wed, 13 May 2020 12:38:53 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DBF7A200A53; Wed, 13 May 2020 12:38:51 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 5AA12402BC; Wed, 13 May 2020 18:38:49 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: bruce.richardson@intel.com, Hemant Agrawal Date: Wed, 13 May 2020 16:06:28 +0530 Message-Id: <20200513103629.8436-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 1/2] lib/metrics: fix to reset the init flag 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" metrics_initialized shall be reset in deinit function This is currently causing issue in running metrics_autotest mulutiple times Fixes: 07c1b6925b65 ("telemetry: invert dependency on metrics library") Signed-off-by: Hemant Agrawal --- lib/librte_metrics/rte_metrics.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c index e07670219..f570cf226 100644 --- a/lib/librte_metrics/rte_metrics.c +++ b/lib/librte_metrics/rte_metrics.c @@ -96,6 +96,8 @@ rte_metrics_deinit(void) stats = memzone->addr; memset(stats, 0, sizeof(struct rte_metrics_data_s)); + metrics_initialized = 0; + return rte_memzone_free(memzone); }