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 54343A0567; Wed, 10 Mar 2021 14:47:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36FA422A664; Wed, 10 Mar 2021 14:46:28 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2053.outbound.protection.outlook.com [40.107.94.53]) by mails.dpdk.org (Postfix) with ESMTP id 9723522A664 for ; Wed, 10 Mar 2021 14:46:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hdi8WSPxOPwCKJ4QgP5UL0fzZpmZAUmHySKx2AA3UYKdIL0P+8dNMNKwP0IgIsDutaQNOq83UfuzN7CmeMoLJvhOUKxwUflKKBiafS386gZXiFMeFG9W0dcZft3CeqMUmrwXwKPouH66Y0t03XHhdKaRQxii+QnSpVWIKV4KOEqtCPbfk5XmtFXPDm6Hw3R/inZu+Twix6b+1MGoYQQ841RjL8Hcx5cY8ihbLoTNmlN2aVoZyT9njW/iaMsL5AM3AjzdhWJVe5+q4vQUefc94b+dQ8cRxi7HHBwpvyCI3Oy/Sr0xiciOjYRLM2fKelt1rGWEQzsKKMQwABpkyUlYkA== 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=DFr1vtqVypiFpTEj6WhEHfsQn/JE0aPhLwmDXBo9QZAf6DXOKMFHzLtoj4vCWiZZtjp176StSuhZDncx84UbmH6AO36zMJY+njT5g7XWPKe9mnud5Cvz7rmFdY/Fluhy+UbwfmF5Bfyq3lEOpdH2MX9aY5du/JKVB9GGVj7Fm/B1rVqklHSTJfgHgTOwDlzrrKMTqkfuNpfne9U5ixE7r983s8oo4vXRHMg4mEEHtRXIXcWY5ugWF4KE5bV5/2gSKCjOu3qf1LOZmnl4xNjhziZ/vc+moM01nvPCAuBV4nYRW9IjwwIPcpwBHyfpeiHlJMHdx/HMpBi8xMP+9DJUgw== 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=gud3GYSpjmy8DZpaukhmT+LYG5n/JQAg7mRpomU8URTqidC4d7kjJNDs7mCD8AHflCM4V80UaRHKgNB+sMD9Lyr1HDp31a4/TZl2wfviANwGZcm11ys6KIlmDzXJR4zyhxOPX/Z8nKWXEH9xrZmCy/ASOy/kARZI1xOgtKU/Wc1KICK1ERBxjg4IZpmfoVGmfef/SGQVKWd6F501BDS7X54MfKry8KTk15YzjXe7PjZPDA48kYlT6QmMvup9OoMIrKjXWgqbE7l9zESu2wKMqd9Ao+p41yChTbUeX1fEBTOv+S4w8io4WfWldaFND2YIp+OdW/7GUIjhvnVz509s8w== Received: from DM5PR06CA0033.namprd06.prod.outlook.com (2603:10b6:3:5d::19) by MN2PR12MB4583.namprd12.prod.outlook.com (2603:10b6:208:26e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.27; Wed, 10 Mar 2021 13:46:23 +0000 Received: from DM6NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:3:5d:cafe::cf) by DM5PR06CA0033.outlook.office365.com (2603:10b6:3:5d::19) 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:23 +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 DM6NAM11FT055.mail.protection.outlook.com (10.13.173.103) 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:23 +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:21 +0000 From: Wisam Jaddo To: , , , , Date: Wed, 10 Mar 2021 15:45:53 +0200 Message-ID: <20210310134554.7948-7-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: 965a089a-ed9a-4843-b03c-08d8e3cae4c4 X-MS-TrafficTypeDiagnostic: MN2PR12MB4583: 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: lneuUmELgYcMjJquv0qnRN4j/ms4dFQR9CWt6d6fGfQdHD3iS7g+CKjdnvmd41z0df3mmNXvvvuTfdbNqF1yYXr8u1ywZecm2IX5MJUM4/TaYEcTpsJZgbHM//59C5dI8i3b/ueTUGaJY8bhLiIe6T+TRklWGRQar0DgX6cRakad7yLob0YOY7Pqj/kVcWjHY4B7GyfTwUEvx/A8Ue4pUNnmJD40Yt9P5ok1jGW4icIay7UvGECxrcP7fKIlGScVqcZEhPiODfaZvw4HnKVz5L/FQ63J/dF+a5noNkCK9dLmpJcD08HRq3GkD5BHcBjvCHouM08//x6reEj8s4vLe1XIIbwGng42qZQHnl+jalnw0Zfl8F6q2DT5tXOHEqzN+qs8R4aYLc6c05yJWh+xPxpjPccnfnDfz9O4ruog7TouZFi9Ww40mdZ7Hb84m1s6kbiSolm2JinmxgAEAyWW9m2GPJFw4bMErMvbnDpECeaUJc6Km3rJfXxJvrB1ODcHvpQwEqIt8egHPOEMeTlGRyfPYAfal9K+Psyyg3v+g9B7Ag+Fh6uE0UQr/O6AB9swCnDU/dZj+99Et9TWocZrcSudrF3w/WbO0d8Egq/ITdFxrSsc/qGSsrYmUnCO1WbLEFd/Mz1PXDCG568atssBsDawKxywlhxYpzxO3tACad3pxaOs3z9mO1Sb9h6GJU1t 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)(39860400002)(346002)(136003)(396003)(36840700001)(46966006)(8936002)(47076005)(1076003)(36756003)(186003)(26005)(70206006)(7696005)(5660300002)(86362001)(16526019)(316002)(110136005)(8676002)(55016002)(6286002)(70586007)(336012)(6666004)(82310400003)(2616005)(2906002)(426003)(34020700004)(82740400003)(7636003)(36860700001)(83380400001)(478600001)(356005)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:46:23.2880 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 965a089a-ed9a-4843-b03c-08d8e3cae4c4 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: DM6NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4583 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