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 45CBAA0567; Wed, 10 Mar 2021 14:55:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2766422A6A9; Wed, 10 Mar 2021 14:54:25 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2063.outbound.protection.outlook.com [40.107.92.63]) by mails.dpdk.org (Postfix) with ESMTP id E517622A699 for ; Wed, 10 Mar 2021 14:54:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UTd6//WMpJogOuQ+iYMvLCR1MY73kBznyI3Ml3s95r/bulsXVGEG6DkXg9sWLfZO3GUVovMXjQUkRCTOoyLzsmvC0C0koNVSJ6ky039JNSwGU/yhZPqm56y+Hn56h7vvzmS+V+YMXjT8sjhzb9AQF2PgT4sig2ushBnw8VjFt7zyN8mI66mBJMt2+qdLwoje5j4i07R2c7FHCdH1oxuctFh9aJ1SMQ3Ook5w2k5l2118fNgIcyXq3g0anv1ulf/BIJlr1Ssns02xoEovbnBHWm+sCmHkIZfi4Fvmg0mJZZ6FzzwWLWumaDQYxTfYIEDQu5JU52zc98534jdt1YQMYw== 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=m17KMJqPb+DDst1q+6nYBOjKheDKJOx3C2iWPq44NU4VuZYhmK8cQa3kONV18bNSW+RlWQ3uBn3bjPBWY3DnrLvZg09ISwTJI30PzW51RFbDB4VQsMARL077pIQ9i1hM6umGOXkyLi3wmw9QHvQwROUhdJfgPEdCVh23W+Jc3rEzTvmQ8oR4LetNyBHR0tu5M6rjYJJg0Qo4OHEHMYdCCv+mEVIyYa433M1q4uSiUOpk5o7Wx2dQ8VRKutyBdALAW3KsyIswQoh+4cK1CrHbJcS3wLQ3x1VopPfx16DtcNJ70rgACGv2EYbCK5YP3fg6AvXj2OhakPOCKMy396NATA== 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=iUtOZZETAUpKjw2MzAVH0bNPyGjd6NlkU4LMIGENmAduNsmfYxl4xPO9nK9EUBuDdCrQPnSkMSJ0/6YNqQYjSvC4SakvUxRIwq5hfSo3a5Yudb8XL0YOcPVXNb2AY9fkTPE/7FUnl8/H9wHO8tEKxHuxdDL06T2XMPgrXQJoaBf3mMEDF1sTsqClk/wQnQW2M+ac/fI9M97GymgKPcObOYA0Gc0n9qeRed50XwP3St9vBif+1Ga04pkzWfodrXoeBEwL7tenJpoASfQNQG5AZRlWC5iecqd7uRaK8sE+K+rdH630moCVpmIHZ2Fpq9QZCmXKIoVbi66sxK7FNavgOg== Received: from BN8PR15CA0018.namprd15.prod.outlook.com (2603:10b6:408:c0::31) by MWHPR12MB1583.namprd12.prod.outlook.com (2603:10b6:301:11::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Wed, 10 Mar 2021 13:54:22 +0000 Received: from BN8NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:408:c0:cafe::ea) by BN8PR15CA0018.outlook.office365.com (2603:10b6:408:c0::31) 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:54:21 +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 BN8NAM11FT043.mail.protection.outlook.com (10.13.177.218) 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:54:21 +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:54:19 +0000 From: Wisam Jaddo To: , , , , Date: Wed, 10 Mar 2021 15:53:52 +0200 Message-ID: <20210310135353.8429-7-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310135353.8429-1-wisamm@nvidia.com> References: <20210310134858.8104-2-wisamm@nvidia.com> <20210310135353.8429-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: 3640f8a5-8d4e-4f1a-f9e7-08d8e3cc01f1 X-MS-TrafficTypeDiagnostic: MWHPR12MB1583: 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: VIkcXWwqfWNbxD57VYhuLlJY3Ie3HqUu5FzpG7G+3nWCU9zFKFWzWgJ6JB4xiy9CH4tQmxGNrTofxw3Pas9cbdgTKdSFaK+ndYttwgHps8+jB85xf6syucWFF/9mJQ0CmY8TzYgUjcY50GTe3rKjLvkrmHY3wkqoy86H20zdGViFyPuvVy3qyFcu5JcPgid/O1RcbUoAn9hK98G8xbkbdqGYA6WZGoU4JtxWCcx3gs29UmDN4XOJ/xCK9xw7/VNfKY5EwYk17VNnsBW0lHxYCf5iOLIU0cHKlHigiCVT+g7Wqkg4AC5ZseqkjinAiFdNNz6amS1ToLGuf5UgIE/HZ35Sdrx+FL3Zn0Ec1Vxq8X4RoRpfYaqsfAUCjqzOniOAQbnSWGJL0KV8sFYFv2XbBm/mOu7UIBZAZ64v/n3OMOlQkwua0l5NViwLWJasHfbRl1B73Q8UUaPhD3Fwwr9MgVshASkbNxcyHP8nRhGPPaqtoZbeumIQEmn3H2H+gNGOfIsp+jVtxVP6U2903LJd050d6ah6FfdJQk7w/Rf2EfQOlKaQllcnHvnPYEdYAsxl6rNlNoc9sq376b1GLtOOZmf73HSJBB9NEqXUvqetoEMOUBp5K0a3FOPgHy3iMo04lZc/d7MzHWKxQ2/J0JruPwGU3yZchHpDZ5lp5CbZmIAgNSZGG4KhqPSiTzg8MsV7 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)(376002)(396003)(39860400002)(136003)(346002)(46966006)(36840700001)(47076005)(316002)(70206006)(82740400003)(82310400003)(478600001)(1076003)(6666004)(83380400001)(55016002)(86362001)(34020700004)(70586007)(356005)(336012)(26005)(2616005)(186003)(36860700001)(5660300002)(36756003)(426003)(16526019)(8936002)(6286002)(7696005)(8676002)(110136005)(2906002)(36906005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:54:21.6854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3640f8a5-8d4e-4f1a-f9e7-08d8e3cc01f1 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: BN8NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1583 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