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 C1B97A0C4D; Wed, 21 Jul 2021 09:06:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 460CD410F6; Wed, 21 Jul 2021 09:06:05 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2058.outbound.protection.outlook.com [40.107.220.58]) by mails.dpdk.org (Postfix) with ESMTP id 2DC8C410DA for ; Wed, 21 Jul 2021 09:06:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ukn17k/9BLkzauKq0/EEFbe9gmXQVrVIL8TzY7zgrLz/DIus+CKeKx0OWlh3aFOZH3yqXNZT9wxZCcyOam1GZmLqCdSvWbYrN96vLBPYImxi1yy/Y0V8q3J0/PoMELd2HsAcrMZJCC7KqHLLwZHmoWd3iFpNu2qQuVgavCGbIN3n1oju70RmKGQ0dIxHzZ1+z+papdKMyopY8DLx/tH73cvZXXhS3TVmEpe4XHZTWcma0/jdII5Uvws6kYEDqNA1LWBIsIYjIHPbm44VXV/45bJpsCMGQctz48raDO0BUUzXvyTRlwRcOvHBe7XuJKRUNDiPcbX9N1XbySy8DyKCbg== 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=lB65tASD60HiAmqr+d3zmN0vMEKMyLjnzwOaVBg2M5w=; b=Ns4cky8AD7EoWrkkUBWJE92RJOsv81Kzdvn7xvws0liuDPf97K2Y/jXf4Yrf+bnJXv5d2C19lcj25M8ct38U/clOQ7Pa7fYfCggENaJWSdr3QPHFfvD9/zIiVOW44myCRRYNMhMlprRou2s7ViWfBSwtpnfKWStAvCXE7QSF2Bk86Avfmk5QdkuDXMyH8rIMGgu45Jv3Ed1wosBj0O0xYDzCCuCVvk95g+lNokNQd5RFwnF1PzXfVlJlT4DplvSoMIcns+4ktttkcNQqClivNWoRju/VgSqO0rn0UT7FMPey64LwODBlQLUgwetDOmMcJyt453YhRMOZ2KOJ/5P++g== 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=lB65tASD60HiAmqr+d3zmN0vMEKMyLjnzwOaVBg2M5w=; b=ZCwcrTrEY2M+wchlgb1cZ/Sab0dLdOS+r6bGo5k0/ffWrKo8hMfHALEN8UPBy345oD+Bq4x/LAFNzdUczPNJ9ar8zwdyKxbNwDheT+553I9wlkdMHEA/FfG13KWZcqPbCl1VfQMtW9BljrZFlx4lzsDt5EKviQZNntwLnilzdHGj1tA9VH3/aQXHtH8//U53nsYbRm9BsywKBVKO0oQYtEn2GaSk+4aKZtBvfruoH3hursem/cn/QCWtHdT80/ZFg+QbUuN7FQtHHKdlag9sHFO27TU438dPYArx7ZDNFdKddzqkBwajcxeFbRPAqU71n6PcW+XtivR75hQIcjGhuA== Received: from BN6PR22CA0036.namprd22.prod.outlook.com (2603:10b6:404:37::22) by BY5PR12MB4643.namprd12.prod.outlook.com (2603:10b6:a03:1ff::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22; Wed, 21 Jul 2021 07:06:02 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:404:37:cafe::80) by BN6PR22CA0036.outlook.office365.com (2603:10b6:404:37::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22 via Frontend Transport; Wed, 21 Jul 2021 07:06:02 +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:55 +0000 From: Rongwei Liu To: , , , , Wisam Jaddo CC: , , Jiawei Wang Date: Wed, 21 Jul 2021 10:05:41 +0300 Message-ID: <20210721070542.1153843-3-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: bc0de9c7-1ac1-4578-54df-08d94c16000a X-MS-TrafficTypeDiagnostic: BY5PR12MB4643: 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: jBq/rBxEBWrxISGM7FDS4l823oMGEBXD3P+JfrCG/VsYxRnGtqOOaSee8JaH2FMTyAMpvitdqpgfoTr6+QaS0305rOPOtYBXMTa3VkE4/Gr7CuLLpSLWE+YtqOh3z+3q4VIfr2xKrasJs0EfhAMmLuDgZatoBbNwZJUc0xSpwdFEIgkw0V3dxx5GYuj2dmMhbEg8F+mh+0a0EyKu/2qTZhkFtVu9AOVhzN/A2eK9qMHN9LZdpaeRRjE39WAJVAukWTlpy+s5qDh9I7MqkYe8kqv8YcwE1vn6nLqqjF2YyGGxAeglDJIlqaX336T9tOn4BdJQcP5YnDnZrtfiW21B+IKVaPwaCOgqJjPfX/hJBZzKnfmy4tKx1+jFy+2+BLp1riwOJXqkIurCFGSpMvCH2Ihz3ENJiAr1O3TzUKVc+LsJFKJJtuUb+SM3oaXSuBjNYwiXyeZF/SK7V1xQ17K5LhVeNRbZloJtp/33RL3Cm5Pk9MNUt1iPc5cX3GMdJ+j2s6PzB8iaiCNEsXs8Jjmg3lIL7Rvx1oLwRDXxbuiKVEhx00k09Zeo9k/wlZk9mlKNw1tmqtsx+ktMeGR40jMFStGcju1IpUmY1kC0ajur65CU+xArMAR8zI0ZwHBIYOj0zToYpymlJm2/P9OiTfBQYFsLaZXwfiJRcklpGHuY21ITfdHmvRVzSF+mcAdh+E8t/NCijzg1uyEBvEa/yg3NbQ== 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)(6666004)(70206006)(5660300002)(36756003)(55016002)(1076003)(70586007)(83380400001)(356005)(6286002)(82310400003)(107886003)(7636003)(86362001)(2906002)(110136005)(8676002)(6636002)(16526019)(186003)(508600001)(7696005)(54906003)(26005)(36906005)(316002)(36860700001)(426003)(336012)(2616005)(4326008)(47076005)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 07:06:02.1575 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc0de9c7-1ac1-4578-54df-08d94c16000a 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: BY5PR12MB4643 Subject: [dpdk-dev] [PATCH v2 2/3] app/flow-perf: add new meter CIR Configuration 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" Add the new meter CIR configuration parameter, user can set the different value for committed information rate(CIR) parameter. The usage as below: --meter-cir=N, default count is 1250000. Signed-off-by: Jiawei Wang Signed-off-by: Rongwei Liu --- app/test-flow-perf/main.c | 8 +++++++- doc/guides/tools/flow-perf.rst | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index e0d94f943a..dd0aac8b06 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -141,6 +141,8 @@ usage(char *progname) " actions that support data, such as header modify and encap actions\n"); printf(" --policy-mtr: To create meter with policy\n"); 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("To set flow attributes:\n"); printf(" --ingress: set ingress attribute in flows\n"); @@ -582,7 +584,7 @@ args_parse(int argc, char **argv) { "cores", 1, 0, 0 }, { "policy-mtr", 0, 0, 0 }, { "policy-g_actions", 1, 0, 0 }, - { "meter-profile-alg", 1, 0, 0 }, + { "meter-cir", 1, 0, 0 }, /* Attributes */ { "ingress", 0, 0, 0 }, { "egress", 0, 0, 0 }, @@ -814,6 +816,10 @@ args_parse(int argc, char **argv) } if (strcmp(lgopts[opt_idx].name, "policy-mtr") == 0) policy_mtr = true; + if (strcmp(lgopts[opt_idx].name, "meter-cir") == 0) { + n = atoi(optarg); + meter_cir = (uint64_t) n; + } if (strcmp(lgopts[opt_idx].name, "policy-g_actions") == 0) { token = strtok(optarg, ","); diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst index 90b6934537..113e078eb5 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -105,6 +105,9 @@ The command line options are: Such as header modify and encap actions. Default is using fixed data for any action that support data for all flows. +* ``--meter-cir=N`` + Set the committed information rate(CIR) parameter, default count is 1250000. + Attributes: * ``--ingress`` -- 2.27.0