From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC0C2A0567; Wed, 10 Mar 2021 14:50:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D949722A687; Wed, 10 Mar 2021 14:49:35 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) by mails.dpdk.org (Postfix) with ESMTP id 6E0EC22A663 for ; Wed, 10 Mar 2021 14:49:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YHFw9Yb6EPyFLK56cybdbhg52nMMiBePoU2M6RNrpjsVr3wkeZYeRrLHTiYkhC3ihshTsMeYnL+UdptaDKVaZOgZtrC5471Nl2pO506mSXN2aQ6yB+XjG8ttyF+zhPtiBeWQvs9TCo0/E9I+EMBjvhGqDYsV+sXwBEYJiqfeqiEnu9RavjMIivv7tmekC9FU7NK3ZXtotMxPYJfgEfah1q2UbwqdqrDXLFpysEbCKkC/K6GzvvjQ+HevrgSJlu2WiXMpdK8JK+yIOHcjEZtrDnweRkZeqUqYRLW2LJclmJl+TSdj3E7XeXFQ6TlA9e9D2Tqf1wMAzeeE0kJATVcbag== 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=O51ma7LuQLaF+C4kAj73bCOuvCzctb1y7KSc+0J95Vk=; b=KwQbk0QNUI0vUZ2VYup2Up5FlXx2v/XMO67lFYCfniXUPLW5JPtXSfLIN0LmUiq3mBZguc2G11isvdYGLzNSMstlPTCzhEeGUKGtghf2XzaudcjGwTgP17NUHOIpgWMxnAzANsfO/HH+OrG4yY+VdZnTUHZg56NVfKWebFmxfsv6CidC88rGmogOortpwGk0MoPy7kppYoHB+cjAg3yD/cqwep2+A6mxBv2YmxlUtP4NXTeNQTklpIsY30QhG4M5HJLcYplt6BNICeqZsVPfcU5iJL3ikDj+jDvPnMo2LSzMBk3CMrUjb8rtHJ1l4IKiKk3bgJS0E6slVl5qF0vUnA== 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=O51ma7LuQLaF+C4kAj73bCOuvCzctb1y7KSc+0J95Vk=; b=ESFMz9JJGIO5dDOGX5fgZnaGzxtKrdzkfxtjT0a3X6c765rGOyuNXPoLkVuGl35QtN2f2TEUzGSyxiT6fG9TcBJcuhNLNOG4cQFaxvEswy94dkLnVuDX+jDGrbIilZyKok6RGqztUF9mlwscB2PbX7CxEBqo9fBCXzpNOVbmmYs7IMm7GOTByC8+02/YgZcui6gQu1y3iG2OMpRfGRK6WWCbnJtbqWVvk/OCagKD2iSsM3WmlYAkONzQzNUNx4k22rC8mb4ZUabyYL/1Kejejc+IDU1bizy/NM3ThNzj0NlIgix55leUsEN+AqzrWvadLAJdoFJWBDaID9MYnt8/YA== Received: from MW4PR03CA0219.namprd03.prod.outlook.com (2603:10b6:303:b9::14) by BL0PR12MB2339.namprd12.prod.outlook.com (2603:10b6:207:4e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Wed, 10 Mar 2021 13:49:33 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b9:cafe::86) by MW4PR03CA0219.outlook.office365.com (2603:10b6:303:b9::14) 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:49:32 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) 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:49:32 +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:49:26 +0000 From: Wisam Jaddo To: , , , , Date: Wed, 10 Mar 2021 15:48:57 +0200 Message-ID: <20210310134858.8104-7-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310134858.8104-1-wisamm@nvidia.com> References: <20210307091202.586-2-wisamm@nvidia.com> <20210310134858.8104-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: b41ce2d2-a36e-4a1d-75b2-08d8e3cb55b2 X-MS-TrafficTypeDiagnostic: BL0PR12MB2339: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 17RqS9dXG4WD7Z0GTI7S0vyOzt/WxWdvzN7/qgoQ8/ExpLcSAmXGqdpb1JXJKdraYspzInd0NazdgtbR5r8YGy77FVRviRJmYWHeWZrX4sHNoCRZD9FmNWepv2ZUfPuvGY6xSPFjB+tL7KQCUynKk9ZpE9ijyxJEn3u4tzBAP2Z8jBP7za+QmTn5Jho8U7/6azPhLoFi3Nv9mb+STXvoimpL0WgExxnmoSnYRs+lQnsL8E1A7GX/18Ssoi914xqnyuzN3VruNOzX68Xzp5v8GGkCouSXesjpEclWgqJxy9oDyvHWWl5txZfb/hTZL9wiquU8LsnGplAcaPmrn9BPZfmhOIY7q3nSh8vm3NH2+6IKXR0/2Fp7rBnkFex//5+aO/6vVlQ1qmjDKgs9B46g/Ljura3PDWA5Perm76/BAuYYgCbQAPQJdmVk8JFP3kOiRmbsIzGEG9xNTCYKpOoJuLn5j97hgGsPo1lc7azVQ2AplWEyl1S6u0Erthx4rt7e1tjyaDEEM1HJF9Ulq2FsNnp2Lwik7v+i4BFTeJf/KqnpPHFGw2PmKJf4h3vKWlghUWjCQ6P6StrFB98Jr1su9108BVbfY0Xv8OmB8FkPM1C/dvEQBL+Uf271Hl22PQ8TbMM1peyarK6E5JXWwWKPQrQlBEOIq4YwLLcGTZsnx/ww/fbVfEh3L0SG65EkACYk 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)(39860400002)(396003)(376002)(46966006)(36840700001)(34020700004)(86362001)(1076003)(47076005)(36906005)(186003)(26005)(7696005)(82310400003)(8676002)(2906002)(478600001)(5660300002)(110136005)(426003)(36860700001)(16526019)(336012)(8936002)(6666004)(83380400001)(316002)(356005)(70206006)(55016002)(6286002)(36756003)(7636003)(2616005)(82740400003)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:49:32.7560 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b41ce2d2-a36e-4a1d-75b2-08d8e3cb55b2 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2339 Subject: [dpdk-dev] [PATCH v2 6/7] app/flow-perf: add first flow latency support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Starting from this commit the app will always report the first flow latency. This is useful in debugging to check the first flow insertion before any caching effect. Signed-off-by: Wisam Jaddo --- app/test-flow-perf/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index e32714131c..3d79430e9a 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -1143,6 +1143,7 @@ insert_flows(int port_id, uint8_t core_id) struct rte_flow **flows_list; struct rte_flow_error error; clock_t start_batch, end_batch; + double first_flow_latency; double cpu_time_used; double insertion_rate; double cpu_time_per_batch[MAX_BATCHES_COUNT] = { 0 }; @@ -1201,6 +1202,14 @@ insert_flows(int port_id, uint8_t core_id) encap_data, decap_data, core_id, unique_data, &error); + if (!counter) { + first_flow_latency = ((double) (rte_get_timer_cycles() - start_batch) / rte_get_timer_hz()); + /* In millisecond */ + first_flow_latency *= 1000; + printf(":: First Flow Latency :: Port %d :: First flow installed in %f milliseconds\n", + port_id, first_flow_latency); + } + if (force_quit) counter = end_counter; -- 2.17.1