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 7D54CA0524; Sun, 14 Mar 2021 10:55:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CE6116091A; Sun, 14 Mar 2021 10:55:00 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750049.outbound.protection.outlook.com [40.107.75.49]) by mails.dpdk.org (Postfix) with ESMTP id 80759160910 for ; Sun, 14 Mar 2021 10:54:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MCRolySnNdYORtJo8TOsgNuY1tViPyW0taUVTUJZT9PFJG4T4KeId80PxPmP6be4yVyz/pifV8LC5e/LidvoFgP4GICuxrJbR1iouqrAmxSwxc+ZDu9Fqj3EbuQSyUYDaUxMDukbvSb9kISXLBbtXp+JWJpaWK/0i8ymVlSdZb8ZZIyp8PvEW3CUeA8fsDWJAs+DqxU021C6EOIKJZRDL0Kvq2D4oKj/tH6t3bRzdaEIo6fOnccwHBtqWocX/pIfUMKDXStoDN4OjGg81xUbc/xUCYQ5/wDfY3wRp66QB+9aAH6HKDLfUgASzzEVS//WeuqTNfh4G6QA7IOcRUp2Rg== 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=YakBYYIaRHaNo0Ur/lHPHbk4CquA685Yhmid0RE6Ddw=; b=mJBdnoDk5PdU1xV84oKNoYOISCwwxTMJ0es8BS1qtPpQ9NPkIbQyH0AtNQwo5kdaacC3vi8AjQ8NCV57wYG1uDBBMnH7BXziLnnpYjgz0UG7vfq+HX6lJ+ZEIppcgj/vxrXy6+uo0Mg180fN71H9vkujeziYZp7rDi5JAvaLdOIkQK91kKUD12/xljimH4yK9y6n9b9Rux8hJTXqGv8R3YfGvegpbiDjbNSIoSj4E/Adt03tInRgrLviDFtBHyAWtEBO0gP5EYcIppS1B00n9O8ip3qQ1eiYUHqxOGqShORPfdOZWJnbzAYDw1hAud6GY+tQ0DxHF2htcH8GNMEG0w== 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=YakBYYIaRHaNo0Ur/lHPHbk4CquA685Yhmid0RE6Ddw=; b=K2Mp6xru6y4SoXVJgL+NZsgRZAKRLtn491Rx9IjSuq1rv5DSQEL6DyqghP8GQMPeE1jOK/3gnU5HDAsgY4DeL/xEwdsuAWeyIT6tf4SLqX/O95XVjjhKHZe0uAWU18o0c0CcBSD2aItBYDpITBnm4UBgFeh60fMd/2t7oJ7DQ8kxWUaqjHbjqG9MgC1xiXA1cTgOPMevdsfdjJCi6ARlzO+jSRbKAKPbyzVRdV3ISt0XRf2HNl0KvRpsF6mB2gUZ+KrOfD4eWbJt7GCpl0FCP4U2MlcNdm4kTtS5IgDMWb6j+RcdT4zWNA1O481JDb/hASTl29F+glaSYFdZa6O5pg== Received: from BN7PR06CA0043.namprd06.prod.outlook.com (2603:10b6:408:34::20) by DM5PR1201MB0265.namprd12.prod.outlook.com (2603:10b6:4:58::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Sun, 14 Mar 2021 09:54:54 +0000 Received: from BN8NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:408:34:cafe::3e) by BN7PR06CA0043.outlook.office365.com (2603:10b6:408:34::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.31 via Frontend Transport; Sun, 14 Mar 2021 09:54:54 +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 BN8NAM11FT056.mail.protection.outlook.com (10.13.177.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3933.31 via Frontend Transport; Sun, 14 Mar 2021 09:54:54 +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; Sun, 14 Mar 2021 09:54:52 +0000 From: Wisam Jaddo To: , , , , Date: Sun, 14 Mar 2021 11:54:26 +0200 Message-ID: <20210314095427.10101-7-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210314095427.10101-1-wisamm@nvidia.com> References: <20210310135546.8680-2-wisamm@nvidia.com> <20210314095427.10101-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: 24ba4a74-9325-4a30-b9b3-08d8e6cf37ed X-MS-TrafficTypeDiagnostic: DM5PR1201MB0265: 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: MzHOBuxQRo1lXOh1IXvhvJbIib+8UM6aW/wbzAO2R6zyk48cca0JB0xC7wHHTZCuTzacgxP7NMeWAQYvl9dJNMlJvaWsVpTqPu8YQpejWH51vzgNICose4I5Sep8OZqtQkEsz3tyN9BHjtLwWWOlrZznWweHmMgNLd79uKaJXs8zFxcaslYYdNdAymxk64iRWcZLsFKLR+e11XEWRe2w/tE0FyuAsyvGHkEc44xqOhA5mxPNn5l9wcEQwoLaVqsYO6cO+5a27sC/gCqZqd8p0BmbX133/O3JyHZFErGhniTyHI6USYo9GBVDlcg/y30DK7gVbMT59zI0ytmIQGuHDlZDUoRS/SVhhBZ9bK+kucFsWxheBYC6J+XtLxhItEhs7OYxZT7zTnro09nKd3aK+equYA8lSmIM8S4qVcXVVUQqdrjrylHUgjc5m4CDLCB1+IW7cFTJbcNLG2PXPSQCqYCHlxErmBL5WrxKiLi5ktVLNoBa8lmMTTBuFTo/pLteSu760I1t5l4qrDCGgLJT0F9+Hs2GkK4HuhQLVndHhIl/JRQ951XXV3w0UvnP3cODVONXDcGiXY1+S+UDkiy+7o5avuBvVwJloSPb59GT8G5+caId2OCiU2EJ1Zd9f5qyDpNeKaqbuJ9j7x5W82Cr+eLXpFNtC/XpHZMuwAJ0m1DQIHJ1hG/P9J8xqv42NUg4 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)(396003)(376002)(136003)(39860400002)(46966006)(36840700001)(8676002)(6286002)(16526019)(186003)(26005)(426003)(336012)(7696005)(83380400001)(70586007)(55016002)(86362001)(2906002)(70206006)(8936002)(34020700004)(82310400003)(1076003)(7636003)(316002)(478600001)(356005)(47076005)(6666004)(36906005)(36860700001)(82740400003)(110136005)(36756003)(2616005)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2021 09:54:54.2321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24ba4a74-9325-4a30-b9b3-08d8e6cf37ed 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: BN8NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0265 Subject: [dpdk-dev] [PATCH v4 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 Acked-by: Alexander Kozyrev --- app/test-flow-perf/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index e32714131c..d33b00a89e 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,16 @@ 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); + first_flow_latency /= 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