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 9F711A0C4D; Wed, 21 Jul 2021 09:06:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6ECB04111A; Wed, 21 Jul 2021 09:06:08 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by mails.dpdk.org (Postfix) with ESMTP id 2AC24410DA for ; Wed, 21 Jul 2021 09:06:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eodaajF3BoItSj9Ml8gQjscv0nqxTuByARxtVLHfhdqqPozXb7QZqEViE+4xDfJDKBYxqPr3FNQGQrXMP+daejqWKRxCFww35d21PeZo9qXwsXkLIKPRvhf9wJ/A9+Ki3TaoiF/5lJ91Zii66DdfkOzc6f+fggs67PVU5JpN/wsf5UsverPEpgWvzhgjUsT+1x6+dkAffcfla0hhm/C/JU6NLIp5vVWJy1ApCrgzAXQyD0NGbIQwuOiyGktVqQnJ8Zy12k8WZ3iPwZ0B8kIyDtq1JBJIpTqAveTR47z0inWd9lCBA0AlVcYI3LEGJr8zvi4lWSKohG6s2pkHRwuWBA== 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=AMOgn0GxpKrauTjYWRLc8HWEeKIS6sPu/6fZNN7vVPk=; b=nwHKs+9G8bHVL2qmm0u3todDYHUyxcsk9cTkZeukJ2wbZ74989JuwPLbEsWJbJG6t3NnysGhmf+v13T1gluZDuKWKg1k3CDtRjzsyA2yAMSZ2qazMXylYUML3RrbQW83cdRpdbzPJsEoXMYrjks4s2Nme08uZ8DLOI5cIfYuIQE9nIL1p3uvfkA5QCjusRJgpFaMzhT/pJwwYDWJQ3Pco6ejY9C1GAavH4gUmHq7JgIJ2wCcg0pHpNmAWg/Mc+O9mna+4jFciH4OQsawbXkb+wNregqWu3+Ui/6NhvN1Fv7vlxtFgcMB5NupLYoPaTleY7xsI/klNarWqvBf2zWHpw== 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=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=AMOgn0GxpKrauTjYWRLc8HWEeKIS6sPu/6fZNN7vVPk=; b=UZfvwGeQeeP6bfml2jWxLqbX/WVyCcMO8GIcTGLD+Uez4A0p6DM/k0VdiGqX9pEaElyqKVtag7e64wKT7zzG3Evx7uSBrkjy7LAFi1Ii+UoyJ8FoFnXymb+BnjddXg6OFIAVlQoq4uYVsNy4TS/JglDcUZ32hwCQ2Q3etzCBfEPk913VdI/vUQ2V9/JiWlDjQpz4i6wy8lH84GOf6LPi1b96YUVEOQ1QrI1api+UCRDB7nAdR+EB6YoICoZj6Aim15lOINr8C4fWS5jYXGl0sS+OAybdlA63D4HPQcS9XMGpgplF1CjbOe/cq214jRSf9r0Ndo2mcycvAexV3SlXpQ== Received: from BN6PR22CA0047.namprd22.prod.outlook.com (2603:10b6:404:37::33) by MWHPR1201MB0271.namprd12.prod.outlook.com (2603:10b6:301:57::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Wed, 21 Jul 2021 07:06:03 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:404:37:cafe::30) by BN6PR22CA0047.outlook.office365.com (2603:10b6:404:37::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 21 Jul 2021 07:06:03 +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 BN8NAM11FT034.mail.protection.outlook.com (10.13.176.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4352.24 via Frontend Transport; Wed, 21 Jul 2021 07:06:02 +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.2; Wed, 21 Jul 2021 07:05:58 +0000 From: Rongwei Liu To: , , , , Wisam Jaddo CC: , , Jiawei Wang Date: Wed, 21 Jul 2021 10:05:42 +0300 Message-ID: <20210721070542.1153843-4-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210721070542.1153843-1-rongweil@nvidia.com> References: <1617691848-94564-1-git-send-email-haifeil@nvidia.com> <20210721070542.1153843-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: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3075a419-1af9-4e8c-d388-08d94c160077 X-MS-TrafficTypeDiagnostic: MWHPR1201MB0271: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D05LngqrjulKCMj96GfjqvdkiCMgg3Mg9084JbdnRs9SdYw1wVktarhzwNGw80mE4O6Vf74lAts5pns1vATuzLfUjUPWmiTTJZRwxCdJROugRayhXlBIUb22exkjcFvVEgJhEo9RL0CToH2c+FDDjOvskRLbgXUizCwRvKLjRpG6eMo5gcRLjMQnuvkFWqAjLxClZyYkeM3Lf37udM4cAM6o5GYvH/kbVw0QfnJ69/eX0FJESaihBPioiU3rl+4b0nucCvjVwqNz8hD1T81UYnOWHo/m9jYtjEvSFesrWS0pzhEl79jMIUIAKAyYYiHEW6wWfyaDjifRZHU00gEh2QL9qn9EXinWT+0+HJxernL7CM/1ma5yOEPslZLEpsTsqFik9iv4Zo2ha1mibG/5ZedI3ZuKlqFs2cuYgtQA80m8MHhhsiLaSI2AwmfqLTOs3pJmUjx/8lg0d/0HvT/lDP+Zvjy1YdW1RWnPcYnvn5ToXrQ3XDgbdmSSX7/60L0ftN1UjLsnzwsy7X7XmoETek+SoGjcw3M7qz1YmfB5wc4hyzvKje3dwsOkKG1rExufx0ZZiIDwvKOD2SDxm3uCzrq4CopU3zVc6IFDKwACbHRogzfAbxNb2H21Pc2Xme1lOyUSmFR64k3iWTtjVDWx1NgcQk7yvdkNK3E99bvd0+WGADGBHhtPMGyncbncznW09LSXSuOOrdU8ly+b6CkvLg== 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)(136003)(346002)(39860400002)(396003)(376002)(46966006)(36840700001)(316002)(55016002)(110136005)(6666004)(54906003)(70206006)(36756003)(8676002)(36906005)(7696005)(26005)(82740400003)(36860700001)(86362001)(1076003)(107886003)(2616005)(4326008)(478600001)(16526019)(82310400003)(186003)(356005)(336012)(2906002)(70586007)(7636003)(5660300002)(6286002)(47076005)(8936002)(426003)(6636002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 07:06:02.8811 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3075a419-1af9-4e8c-d388-08d94c160077 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: BN8NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0271 Subject: [dpdk-dev] [PATCH v2 3/3] app/flow-perf: add the supports for meter PPS 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 do 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: Jiawei Wang Signed-off-by: Rongwei Liu --- 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 dd0aac8b06..d2003108cc 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -66,6 +66,7 @@ static bool dump_socket_mem_flag; static bool enable_fwd; static bool unique_data; static bool policy_mtr; +static bool packet_mode; static struct rte_mempool *mbuf_mp; static uint32_t nb_lcores; @@ -143,6 +144,7 @@ usage(char *progname) printf(" --policy-g_actions: To set meter policy green color actions\n"); printf(" --meter-cir=N: to set committed information rate(CIR)" " parameter in meter profile, default is %d\n", METER_CIR); + 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"); @@ -585,6 +587,7 @@ args_parse(int argc, char **argv) { "policy-mtr", 0, 0, 0 }, { "policy-g_actions", 1, 0, 0 }, { "meter-cir", 1, 0, 0 }, + { "packet-mode", 0, 0, 0 }, /* Attributes */ { "ingress", 0, 0, 0 }, { "egress", 0, 0, 0 }, @@ -820,6 +823,8 @@ args_parse(int argc, char **argv) n = atoi(optarg); meter_cir = (uint64_t) n; } + if (strcmp(lgopts[opt_idx].name, "packet-mode") == 0) + packet_mode = true; if (strcmp(lgopts[opt_idx].name, "policy-g_actions") == 0) { token = strtok(optarg, ","); @@ -1165,6 +1170,7 @@ create_meter_profile(void) mp.srtcm_rfc2697.cir = meter_cir; mp.srtcm_rfc2697.cbs = meter_cir / 8; mp.srtcm_rfc2697.ebs = 0; + 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 113e078eb5..1ec0d5d408 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -108,6 +108,9 @@ The command line options are: * ``--meter-cir=N`` Set the committed information rate(CIR) parameter, default count is 1250000. +* ``--packet-mode`` + Enable packets mode for meter profile. + Attributes: * ``--ingress`` -- 2.27.0