From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 128DEA0567;
	Wed, 10 Mar 2021 14:46:48 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 81F2222A65E;
	Wed, 10 Mar 2021 14:46:23 +0100 (CET)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com
 (mail-mw2nam12on2071.outbound.protection.outlook.com [40.107.244.71])
 by mails.dpdk.org (Postfix) with ESMTP id F2A4222A653;
 Wed, 10 Mar 2021 14:46:21 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Bks+F5HJJoaBQhVqomQuc6u9/8txaIjbHsBQNBIn1Mv/85fNNpOK17FnmTq1kIJzYTSVs3K/SUVS/ieZMVojCWk8QEwh2p/qgkkhhCnqCgwk1yZ5m9LwjnYxLvkJNb+7ga4ffaO+Ghysc4Bs57DfvQ38D5cVqEhCK9RTLKilTmS/20HVAoLbgEcHSw5y2J/mPDpt3dUvp4/23/Hgq/AOZWOrKEjQrcTYls98wyHUPVOAiKDV7a23ZxA9X8ExU+nIY4ZCUDNtt9zULsYE1rivVOilb8wWqyct53wRW2vdpbxdyugzbw+8KhsOciJEz8O0bW0QED7w7rYaIexr5ZayJA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=1f9K6+Ak8rvXKQOw8bb4VPkXFNgQ3U80OdRR2d/YESo=;
 b=FkmNi/074W4Ku61ax2UVXPMOGBpUj+s/xSjHKdG+PcS8xTkSJLXj/sViRi+0jTIYyOCVzUUyguGZoEdj+BmS8FgQcJear7AQllxvRvCVdDD61UIJB/0ZoNCArBwmtQQBHKv/nicnowihxLIBkYQlSo+5Ta4rREFzvKHdfMM0CsEzwkLlmS/Ok3ckh3tXF7WxhJCXOz3vpDgZJoW19s+G38yBJagtwFFT2BDZkNxdC+DyvCcnOLSywSr9MsPujVs3hNfTMyvz1LlbwwZt1LbyLyTnw4GUFBpMXtDKpgHTaUWqX1ABBcU9bGg911nBtLUuS7B3HYxMJKr2DpWkpU5/nQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;
 dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com;
 dkim=none (message not signed); arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
 s=selector2;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=1f9K6+Ak8rvXKQOw8bb4VPkXFNgQ3U80OdRR2d/YESo=;
 b=R5VMxrXLxA9aWMnE1XFVVTZrvnAjZ8MikLpL2hlgonN/PRYSmoeE5/sgR2lvUmBZEwdxn358AJP38H9dZt8RoWcG83D71++UUWGd7991xoYWUUl7XtZY0TCWh/TG4wXofl2WT7S98P/ID8OJgpQYKvmaXGUfeyPHj9jCW0dElmit6WgrlUnkt6QRnZQyKfWdvW2EnAL550wT7W5qzNUHyvbRA3OvQ43kCG86Kp55il+b4FkGdXf3K3vFwZbvceTikWu4vBQyuBACydpfAwuXMC9M/MPQDSO1WEJVg1vAKQ6FSujx8BSy7mNN+rwSxtlz4gF+A1KFC2scFz7HhWGCUA==
Received: from DM6PR11CA0004.namprd11.prod.outlook.com (2603:10b6:5:190::17)
 by DM6PR12MB2665.namprd12.prod.outlook.com (2603:10b6:5:41::22) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.29; Wed, 10 Mar
 2021 13:46:19 +0000
Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com
 (2603:10b6:5:190:cafe::1a) by DM6PR11CA0004.outlook.office365.com
 (2603:10b6:5:190::17) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend
 Transport; Wed, 10 Mar 2021 13:46:18 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34)
 smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed)
 header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com;
Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates
 216.228.112.34 as permitted sender) receiver=protection.outlook.com;
 client-ip=216.228.112.34; helo=mail.nvidia.com;
Received: from mail.nvidia.com (216.228.112.34) by
 DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id
 15.20.3912.17 via Frontend Transport; Wed, 10 Mar 2021 13:46:18 +0000
Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com
 (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 10 Mar
 2021 13:46:16 +0000
From: Wisam Jaddo <wisamm@nvidia.com>
To: <arybchenko@solarflare.com>, <thomas@monjalon.net>, <akozyrev@nvidia.com>, 
 <rasland@nvidia.com>, <dev@dpdk.org>
CC: <dongzhou@nvidia.com>, <stable@dpdk.org>
Date: Wed, 10 Mar 2021 15:45:51 +0200
Message-ID: <20210310134554.7948-5-wisamm@nvidia.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20210310134554.7948-1-wisamm@nvidia.com>
References: <20210307091202.586-2-wisamm@nvidia.com>
 <20210310134554.7948-1-wisamm@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain
X-Originating-IP: [172.20.145.6]
X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To
 HQMAIL107.nvidia.com (172.20.187.13)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 6b2c57ae-9b24-4866-8f21-08d8e3cae20e
X-MS-TrafficTypeDiagnostic: DM6PR12MB2665:
X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr
X-Microsoft-Antispam-PRVS: <DM6PR12MB2665816A778A28E070FB649FA4919@DM6PR12MB2665.namprd12.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:4502;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: zIxzLqHLvRk+rgCpzDpTmmgHmj74F7kAnPzQbq0AOxPOP2vAcZXFYrzwm2eX5VCWyGTdWBxkqgT/9WZYZWI58i8HGJAalyHuHF/fYY1+BaTX7Qygy7P1lnzOXnND2SVXTbAoFy0iiS70u5PhXpCXLY9gv/KrEPzZmWYc1AvycuEgXo72uVfRZ+V6SyTBKiC7l3rzOB48dHi+EF7LRp9mE9ph15IeT8pzxRJBy1GA902BNH0/TRMMus1dS0nwuyiHRkOhcOYrhcv5J7mtdmxfICsddN2PsOpByVfezpy8TBR7usBXBmPJYyhemiTDZAb6LHcyrqFH/eJ1E4/AL3vIWy5oox+ZgTCKfFXIRB82ywumjSb3sxC9txWEz4+h3ag2rbovKU7XYN301P2pQuOsCv3vqJuTUyON1gC4oAcQkzXfeQt2AIXHqEq3jKobTBBrVwlrfPT23nj/Mrck0dYv6z6cnDHl/OtSw9u5SN+yS6yXh92yikWxGtq4b1bjEu/bRlzWDoBHXf7kqB54a0kubGDjKAifyIeIE0koSUL31knClHfinv3FMUHFeHpDMnKwFH2o+u0xJaYRVW+RRkCFe2gMFN/0XZP1O18sH8bv0j8zLwp4sZCZA/HQSPbjUDGgQ5vT4oKkBcDggAHEQcPbj/hVOsspNs1PJNZlpm5NJ0v7OPIWh/kqA5Q71aTWNldR
X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;
 SFS:(4636009)(346002)(136003)(376002)(39860400002)(396003)(36840700001)(46966006)(1076003)(54906003)(426003)(336012)(36860700001)(316002)(16526019)(5660300002)(110136005)(36906005)(86362001)(186003)(6666004)(7696005)(26005)(8936002)(70206006)(70586007)(8676002)(2616005)(2906002)(478600001)(6286002)(4326008)(7636003)(4744005)(47076005)(82740400003)(83380400001)(36756003)(55016002)(34020700004)(82310400003)(356005);
 DIR:OUT; SFP:1101; 
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:46:18.7299 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 6b2c57ae-9b24-4866-8f21-08d8e3cae20e
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];
 Helo=[mail.nvidia.com]
X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2665
Subject: [dpdk-dev] [PATCH v2 4/7] app/flow-perf: fix report total stats for
 masked ports
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Take into consideration that the user may call portmask for
any run, thus the app should always check if port is needed
to collect and report or not.

Fixes: 070316d01d3e ("app/flow-perf: add multi-core rule insertion and deletion")
Fixes: d8099d7ecbd0 ("app/flow-perf: split dump functions")
Cc: dongzhou@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
---
 app/test-flow-perf/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 01607881df..e32714131c 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -1437,6 +1437,9 @@ run_rte_flow_handler_cores(void *data __rte_unused)
 	rte_eal_mp_wait_lcore();
 
 	RTE_ETH_FOREACH_DEV(port) {
+		/* If port outside portmask */
+		if (!((ports_mask >> port) & 0x1))
+			continue;
 		if (has_meter())
 			dump_used_cpu_time("Meters:",
 				port, &mc_pool.meters_record);
-- 
2.17.1