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 A1BDFA0C4B; Mon, 8 Nov 2021 09:54:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DE2F41136; Mon, 8 Nov 2021 09:54:18 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by mails.dpdk.org (Postfix) with ESMTP id 4597041135 for ; Mon, 8 Nov 2021 09:54:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+8vkwO39J65t57XiZ1JImJdt4WUK8ljcB/CxwSwpUkuFeUQD6kOrPYNqL3eZN1rJOUusPMlgLG1oWP2oXeujgg0DNP2TXxbu9PXvlxCAdhQaTIdUmKgc4WLKDimiBGWo9wU8HRmGh1Rt0eqtEGtcaHtW23BP6jRMBM6bOyC9/Xx06Z/f/LGRJ+lCm7f+6HVOVu/Pv8G29eAq2ln0m/usIwE/837IbrLgeXh6z1XjdPKr90SzPfZKkmEMVQF3f27UluHMhszAEpfbUHMoYCeY7kALLG4TUa02+ntuGOpRPI0XyZHrwOVQkOuXwbaPl/Ak3v7ZMmmCwDQvdpz+6rbpA== 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=43JYYrXw0iUD0KSCTrdFWsR0Mr1vaQEq23eII+Ovl8Y=; b=goKcCBE9OLTLSBGTWktcCUtt0JslHPq7H8xa72wJma749cxzU8bBWub1kMGK/9J1FlsDTMcARMPft4oc84mPjxl1JNwzaTD0L+Qc0qT+R0LxsYmR8yUpUQ2O2Rt4LIs3OIrkMGTsfl/QUZnj4FyfN0KJolpLSN2/SFdPlGQVje4ZdC3i4TO293THXfxs6PBq+9tn+xMhoOHkVEW6o6/yhX+C8okjulDyx2axedcrxiLlYt0Oq2DDVsltb4mW3n9trqXjUUYgY4fZy8a2EpIU0GDr4v8z2GoUIyMRRv1pIQcq73+Ix6ZbeFd55/D9xqqrpu/tQHZxJEQcwcu6wtMtsA== 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=43JYYrXw0iUD0KSCTrdFWsR0Mr1vaQEq23eII+Ovl8Y=; b=T1jSawy3I+E8t0RQ7SVRK4ld1vt1eVSz9iVci/iOcB7PWMFa3lSl37sDSULIJIqtotXLtcwq8iR8izzXFDC9+s246kcKfcu8J8Qu3G2uyU7Czu7slkybKlQN/R0zP9mPG5ph+/uRMuojechvDnlSj+ZAKg9yBaqL8HQFGJfSeVEtb/BHW7N+R9UR9WKsk6D/10KEDHnj2ZruiIbMaTmeVkemculXkGPFB7rwgHWHyLqUPc1psaz30xCarlw2iVvtG554D7dnuoxu/3sSPKQBmbYhkdV6r+5lBeVK20k2hpWBxV1VTqWNj/7evMfo99n4TexityI534fAKEyq8nLu5A== Received: from MW4PR03CA0292.namprd03.prod.outlook.com (2603:10b6:303:b5::27) by SJ0PR12MB5503.namprd12.prod.outlook.com (2603:10b6:a03:37f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Mon, 8 Nov 2021 08:54:14 +0000 Received: from CO1NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::66) by MW4PR03CA0292.outlook.office365.com (2603:10b6:303:b5::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16 via Frontend Transport; Mon, 8 Nov 2021 08:54:14 +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 CO1NAM11FT061.mail.protection.outlook.com (10.13.175.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 08:54:14 +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; Mon, 8 Nov 2021 08:54:11 +0000 From: Rongwei Liu To: , , , , Wisam Jaddo CC: , Date: Mon, 8 Nov 2021 10:53:52 +0200 Message-ID: <20211108085352.1728466-4-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211108085352.1728466-1-rongweil@nvidia.com> References: <6106963.jHQkdsGB6Q@thomas> <20211108085352.1728466-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: 492a3689-d740-49df-8f6c-08d9a29556e4 X-MS-TrafficTypeDiagnostic: SJ0PR12MB5503: 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: 3cjCO8UxWKTIDoJMs3694bhTsM3Gw9fZHMositTPaSLG4TENzZKoa54HGQmInsYkh0ZTRlU2GYHuQ1NyHQkC+Fgit//mgq5QBLGewgeP+qXaP3G9uPB32rG4pEPzG4yil5bkppGOr6TXLTapeuGAAwyi6NPBtB+NBdLKNnVeqM6VIMSZTwqwk159B+jyFHPqspChPT+ywVLuX+jU6leHOgpbRwBuf0/wEM2cBkhfU8eTjEVqfaV1uq66eLltnIuQHDX5iIQT2q5ROmdZMD3vJioAt95rcUMZMj5265X33gg2/FGJDazf35SE3mM4c14TcBBaAVsSbSXLSWyevML3C3W8eHHxlujVkNR59VYtPXu6y/YqNXltuVXYtxgFMejZmvVOnE45dDhqc3H6ISwzOyPob27FVab3xMiw/GmHIe/tUXg24X7XUQf5z0hgJ/KpHARErqcYtBJ5iVYf84Dh4vEYfcd6+/aGWaNqtrLeXlYlPfdu50xn3ECnA0STEagi7Zj386x6uML/2heeLttE3fKnOIKLWZJxIfbNCyIyieoqzWZRUycPhIO1mwKRVvdxBv9uzsiMXsMsJ6jNBmhVhigX+iMV/TerCOr1ymNNdCgSljBUBQqCfbTrp2HKiPjIQ7Uwp95scaG3caIpswSTJG+qSwLzXutiMd/4gJ+oWh13h6fZtKAaI0Co3HLJIPQ6JkYTkruMv2cdwjK7U8tXmw== 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)(36840700001)(46966006)(55016002)(186003)(16526019)(5660300002)(86362001)(36756003)(1076003)(336012)(7696005)(356005)(8936002)(6666004)(47076005)(6286002)(26005)(107886003)(4326008)(8676002)(36860700001)(54906003)(7636003)(82310400003)(316002)(110136005)(508600001)(70206006)(426003)(6636002)(2906002)(2616005)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2021 08:54:14.0252 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 492a3689-d740-49df-8f6c-08d9a29556e4 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: CO1NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5503 Subject: [dpdk-dev] [PATCH v4 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 23ee5d2431..374eeba3e3 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -68,6 +68,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; @@ -484,6 +485,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"); @@ -704,6 +706,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) @@ -932,6 +935,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) handle_meter_policy(argv[0], optarg); break; @@ -1258,6 +1263,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 641600aaf9..d77046433c 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