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 0DB86A0567; Wed, 10 Mar 2021 14:56:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 080DA22A6BE; Wed, 10 Mar 2021 14:56:17 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by mails.dpdk.org (Postfix) with ESMTP id 6D4FF22A6A1 for ; Wed, 10 Mar 2021 14:56:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OrSDW41edQzHPssMO+/bxWA4xicqPPtj/3oIynOCJRF7eJpD6yg5gIbaWISdQjNlO1bBSPEoRIS8kHtiOQP5CoKEC8UVDsOooipLVqpjqpxOipxLmgYDHvJ71Jibc8t1nUqbGZJIMd1Wv0wd2WTKCvXcMDh89AsURyp0roSQ59qWK7GgPKm7GHv26UknbpIKH3FvZ2N/EcwkScUGMujfS4pdlzq5X8E6EU8NQgMBxTdw1HXaqUrgXogBBGAUiO7AEw0RwvxQE9ha7ypdUpSrmLDuXFJTBq/AGSPvYRKQBgJm+tV8r795lllzu6E6orXqA/t5FsGDQ5TyGRsvEptcjA== 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=czFZuQn2//nvcswIqmPuZfHAYuLWG0kZ/fti2IlebTSCoAuUU3/NTUZoq9iPwqJeJ/d4TD2E1YSB4Nn92PSn+x9eQDCDWBy/wFxPVFZtubJOim6wjDoRaZU9E/k0rMwU9KUj40jja6y9rphwh8YcnG5+VfH6iCpZ36XQ98fbFrgWO/BzRx5dgqg6pEr5UbpP0bQs0aRWKSQ7mouYBeoWBOd3/O0VDvm4k70MOisDJdBiZTNSmnsqTZwmh0aSzVn+5jePBKhWws7tqAIchvdHchEqLkm3VyJxU5lbic3yqoNR5epk82oG7gadPGnvwH1M7r056Vq33k9EJmJZLX2hGQ== 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=jM0OhPal9g/tWIeBQy4dy/ozlsHigPqqbBIQIOGqVhO3ZKlkYFGWOuEBw6zXF4qlIC3C73rcpH4NYBLzJ+D6u0VOo84BcadG7zzvAAfT/es05hJ1G9fMBlWwPPbpCDC8DamAQ+zJEGEsqEit24fqoTvRO4rEW2+vIHysvHlAqwltENJiuugKdnrhFsHHkH4nFZBHwpAq3zax4gNqYpNuXwYBzzjOcyT0i6DzeeCm1gsQEhSEuoQbSc9f3yz3Z2SfHgJMjFHjtHMMWbsCJsYDvjilJRoUIXDWzdcdO55hwq+DbxZOfnVzbIzxYX+bXA+V0qFpTaQtiYpX6nUNAHPggg== Received: from BN1PR13CA0008.namprd13.prod.outlook.com (2603:10b6:408:e2::13) by DM4PR12MB5104.namprd12.prod.outlook.com (2603:10b6:5:393::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.8; Wed, 10 Mar 2021 13:56:13 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e2:cafe::d3) by BN1PR13CA0008.outlook.office365.com (2603:10b6:408:e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.13 via Frontend Transport; Wed, 10 Mar 2021 13:56:13 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3933.31 via Frontend Transport; Wed, 10 Mar 2021 13:56:13 +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:56:11 +0000 From: Wisam Jaddo To: , , , , Date: Wed, 10 Mar 2021 15:55:45 +0200 Message-ID: <20210310135546.8680-7-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310135546.8680-1-wisamm@nvidia.com> References: <20210310134858.8104-2-wisamm@nvidia.com> <20210310135546.8680-1-wisamm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02ac509b-861e-4c36-0b9e-08d8e3cc4479 X-MS-TrafficTypeDiagnostic: DM4PR12MB5104: 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: jR9eQVmC4TqLHCPRdjGU55PulciyZCHGQ4ZF7YQz4ujigdZAObxgZDLKi743tHLTP5sKcdp+DJCcvmC6I2EUkXLCkzj5c/xUgl7FKSztIfFBpzWfx4h7+WR/+glORCDd6n1vuPx4WwjypYm7vjXvVK9V2Ntm61wgehb+PFTywsKkFpnYVfUMmmY3Lh77FUDjMr+rFTpNW8QW/OD6z6XZWcrUUpzjnhNooGK62zuXHZligAErVv0iy2IWijrG0RPC88VzzQ299YH5KExmKuXjNOhDIHpeJUQqDGxOS77Krm+RnUeO5wskljIWg6wqBTUM0G4OU3v95iCyD/NhsgzKzMVejg89qZK8u73T6N6OWAjNhZftvRtVWyQxhNe4bgOdGxewfj0qj30oiSncMyt9hJs+xS8TruNb5ZRXgOHMmA5vW/g56sejpn0n6Lc0wKsw0n7IMb6rAxKJDnIjvWVI9DcI7CyZNMOo7doyKJSZ51j1oxlxc+Ym9l8cLWJraBFvTz7HRLnDRe8mhzsZVZNWbIX50p2XJ5EqYqe58VabqGXzSRu3XdTlLB+g3U+eB4LjIXuscPlm9mpTkpYTbErKS9P5+AjiOCG7EMsgxL0PzaLcbIWHGsRmbwNnNNwuOfKI2IomyQU8o8S/qfT0XnQrfHFgg1nKW4lOnGY0Xg7aiULSOzcf4aHgOdUSq1EiADFM 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)(136003)(39860400002)(346002)(396003)(376002)(46966006)(36840700001)(8676002)(36860700001)(36756003)(426003)(336012)(34020700004)(55016002)(36906005)(110136005)(82740400003)(82310400003)(316002)(70206006)(8936002)(70586007)(7696005)(83380400001)(26005)(2616005)(186003)(16526019)(86362001)(356005)(6666004)(47076005)(5660300002)(478600001)(7636003)(1076003)(6286002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:56:13.3053 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02ac509b-861e-4c36-0b9e-08d8e3cc4479 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5104 Subject: [dpdk-dev] [PATCH v3 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