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 B7931A0C47; Thu, 28 Oct 2021 05:26:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 313F64111A; Thu, 28 Oct 2021 05:26:29 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2075.outbound.protection.outlook.com [40.107.92.75]) by mails.dpdk.org (Postfix) with ESMTP id 7198441104 for ; Thu, 28 Oct 2021 05:26:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYX54c+paNRGNQcwNXV/O0cJpmoyjEqSugrNrnbh0pCohPFwz0BcLwbtu2h6j1ePvQPTOQRaCOGPxtisbMWXw2Q90JTh3MG02NUzpFga/l0WR5qw9tp7iKMd4Ez3bI8UO037vvEeB0mqdAoXe7kc5FE5//KjKtL6w1hLBFukaj5AYMb93BuvWArQCnbrImDc9dOFg0CJ4sIzuVCY/oYSPDER0riA/tu9rgyZsnZgUR8lK3bH2FvXlmrzY8iq4TZv+QpYIILEI13SmiKZw4JObhL0Q/eRwQao4p8MwVOGdayPMgDj9qygv5r/uTXwcPGfMQTbh0EF52nPUwITf14e3w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xamXEqzTsR7MaEK3wx8WsILYMb+xB5ZCsg16TbC886U=; b=J1iuTMBZB+Xw7E6GOTifW41sBvf9PBHRsU4JKi1uVQUXa8SDfhXxZE3z9xJJm7n9jPIZJJIGprXc+K9iCiMYpzHsQWik+PQ7TnON/2q9LglnWgd/V3b7SngVhtdwlTLvjl0PUAakanna5AvcWl9h056BW0Uc5YCiW2Oy1bH2CRb9eRce7Wya9eambpBHqpPb40apYl+rLI8sdCWZ/j6nUVNIP7uDZA1RX2OBMQJrS07BCQk72ALzcc8Rc7C3P4T4DH2JiKs4F4x0rcnGNIXFpuGup1tZGCx9ZSnqk0aTsSVBEsUN818zND/O02sAH5TxzKPo6PPdMjng7gZPA4P5ZQ== 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=quarantine sp=quarantine 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=xamXEqzTsR7MaEK3wx8WsILYMb+xB5ZCsg16TbC886U=; b=qj33ZjEmiQSYpmICQXzEYglBmw5f3KuyNTQtf6nZufaZEaMFy+Ct4cFug0qJdeqZkFkSJawTVVdiZGO7kX4/xHb35l+ul8rE6Rxql7jFbhGtgFGLRAnrsN+RkphokuI7ko1VGuF8cpItU4xl5Rn75mxkxgQ+92a7768kPdUfk0XYW0IPAWHk+CEk8Z44LkIWbGIRiS0HgPCXek0OtGFUt2513h74Cof8qfgt5A9PzIzJMB1Hrpi8pcsqnin1qoka9V6Ny3StDejblyaZpIAc384HhUzyoEqCGJRiISJ7CvRBEa7Fc68jx6xlKuk9gmwkmaQFLtLrko9WZMKr5RPVgQ== Received: from DM6PR03CA0058.namprd03.prod.outlook.com (2603:10b6:5:100::35) by DM5PR12MB1691.namprd12.prod.outlook.com (2603:10b6:4:8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Thu, 28 Oct 2021 03:26:24 +0000 Received: from DM6NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:5:100:cafe::f) by DM6PR03CA0058.outlook.office365.com (2603:10b6:5:100::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 03:26:24 +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 DM6NAM11FT060.mail.protection.outlook.com (10.13.173.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 03:26:23 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 28 Oct 2021 03:26:21 +0000 From: Rongwei Liu To: , , , , Wisam Jaddo CC: , Date: Thu, 28 Oct 2021 06:26:00 +0300 Message-ID: <20211028032600.638212-4-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211028032600.638212-1-rongweil@nvidia.com> References: <20211028032600.638212-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae41d78f-ca08-47cf-da33-08d999c2b808 X-MS-TrafficTypeDiagnostic: DM5PR12MB1691: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: awechIvh6gSaTMaE5s4J7nmqBFMFZzC7rt9Lqx8U/5xJ2b5NuCweIl96TfDip6EnZLcNlN/kFgCBnxFNpUj8AVQqe29GFB1gKb9UMEqy3Ne1ZmnROy044xRhfn9VpRkZImYbMbNrCrtsMQBtPWD4yrImi0XlGZsX7GjXlBwlAOs/AHnW1ZXpdhTbhPRRYv9OMmwiXAY3LzpYZsWJK0ZLQzsM1joML4AYJ7iff2gTA0kH0CuyJBFDNrDfJqQEZ8+dLsoeiGMRRf+1LNLHmX7Nzl182cT7rYAQcR2xrB1vJlO9cvIQaAnoVWUgeK6afID32Y+alFzOlh4W5YUvoGg1YGD2ZsyDSKcs9wn6UtswakhyTJyK1uYGZRqeBYG0L44JfTxU7CracNKzZel1FYn7nuFk8WLilTXTOff/LFv2wYiwyrUqsTc6cddIxBGlIMg3rVamYfI7iOXFdJ43Z0rE8RnSERim+C9XFTNxRfZt9ysCjkFETOtwaXD38/JktPe6xXiuU6i7IanWTe9wWAhwHnrDAflaBXsurPjv79h06DSP7oQ6XuRJY7wLJoa5dv/jIFP6G7haPWdIlTnD1SixJB0blzeh4CVSZD3XBlDQd5udyRqZxhSKD2aqFCiuhl4n+NXyTHZBBHDPpuC40st+sbJciNcFrk8Dq1chSn16lgqKqk2zg/4nvXmD6b9rmyEzcaTB2nliODoqa8fjxEX4PA== 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)(46966006)(36840700001)(36860700001)(54906003)(336012)(82310400003)(86362001)(107886003)(7696005)(5660300002)(316002)(6286002)(356005)(70206006)(6666004)(2906002)(7636003)(36756003)(186003)(55016002)(47076005)(2616005)(4326008)(8676002)(1076003)(16526019)(70586007)(508600001)(26005)(6636002)(110136005)(8936002)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 03:26:23.8609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae41d78f-ca08-47cf-da33-08d999c2b808 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: DM6NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1691 Subject: [dpdk-dev] [PATCH v3 3/3] app/flow-perf: add packet mode metering mode 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" The flow perf application used the srtcm_rfc2697 as meter profile while doing the meter testing. This patch adds the support new configuration parameter '--packet-mode' to generate the meter flows with the packet mode. Signed-off-by: Rongwei Liu Acked-by: Wisam Monther --- app/test-flow-perf/main.c | 6 ++++++ doc/guides/tools/flow-perf.rst | 3 +++ 2 files changed, 9 insertions(+) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index 8b8fc0fea3..d63328ef11 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -67,6 +67,7 @@ static bool dump_socket_mem_flag; static bool enable_fwd; static bool unique_data; static bool policy_mtr; +static bool packet_mode; static uint8_t rx_queues_count; static uint8_t tx_queues_count; @@ -152,6 +153,7 @@ usage(char *progname) "color actions\n"); printf(" --meter-profile=cir,cbs,ebs: set CIR CBS EBS parameters in meter" " profile, default is %d,%d,%d\n", METER_CIR, METER_CIR / 8, 0); + printf(" --packet-mode: To enable packet mode for meter profile\n"); printf("To set flow attributes:\n"); printf(" --ingress: set ingress attribute in flows\n"); @@ -665,6 +667,7 @@ args_parse(int argc, char **argv) { "vxlan-decap", 0, 0, 0 }, { "policy-mtr", 1, 0, 0 }, { "meter-profile", 1, 0, 0 }, + { "packet-mode", 0, 0, 0 }, }; RTE_ETH_FOREACH_DEV(i) @@ -879,6 +882,8 @@ args_parse(int argc, char **argv) token = strsep(&arg, ",\0"); } } + if (strcmp(lgopts[opt_idx].name, "packet-mode") == 0) + packet_mode = true; if (strcmp(lgopts[opt_idx].name, "policy-mtr") == 0) { j = 0; k = 0; @@ -1243,6 +1248,7 @@ create_meter_profile(void) mp.srtcm_rfc2697.cbs = meter_profile_values[1] ? meter_profile_values[1] : METER_CIR / 8; mp.srtcm_rfc2697.ebs = meter_profile_values[2]; + mp.packet_mode = packet_mode; ret = rte_mtr_meter_profile_add (port_id, DEFAULT_METER_PROF_ID, &mp, &error); if (ret != 0) { diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst index a38dda2fb7..e942a4400b 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -133,6 +133,9 @@ The command line options are: * ``--meter-profile=N1,N2,N3`` Set the CIR, CBS and EBS parameter, default value is 1250000, 156250 and 0. +* ``--packet-mode`` + Enable packets mode for meter profile. + * ``--ingress`` Set Ingress attribute to all flows attributes. -- 2.27.0