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 064C4A0524; Tue, 13 Apr 2021 02:14:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBF2F1608FA; Tue, 13 Apr 2021 02:14:37 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 07B0D1608F8 for ; Tue, 13 Apr 2021 02:14:36 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from lizh@nvidia.com) with SMTP; 13 Apr 2021 03:14:31 +0300 Received: from nvidia.com (c-235-17-1-009.mtl.labs.mlnx [10.235.17.9]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 13D0EVH7024378; Tue, 13 Apr 2021 03:14:31 +0300 From: Li Zhang To: dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com, shahafs@nvidia.com, cristian.dumitrescu@intel.com, lironh@marvell.com Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com Date: Tue, 13 Apr 2021 03:14:26 +0300 Message-Id: <20210413001428.1999959-1-lizh@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210318085815.804896-1-lizh@nvidia.com> References: <20210318085815.804896-1-lizh@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 0/2] Support meter policy API 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" Currently, the flow meter policy does not support multiple actions per color; also the allowed action types per color are very limited. In addition, the policy cannot be pre-defined. Due to the growing in flow actions offload abilities there is a potential for the user to use variety of actions per color differently. This new meter policy API comes to allow this potential in the most ethdev common way using rte_flow action definition. A list of rte_flow actions will be provided by the user per color in order to create a meter policy. In addition, the API forces to pre-define the policy before the meters creation in order to allow sharing of single policy with multiple meters efficiently. meter_policy_id is added into struct rte_mtr_params. So that it can get the policy during the meters creation. RFC ("ethdev: add pre-defined meter policy API") https://patchwork.dpdk.org/project/dpdk/patch/20210318085815.804896-1-lizh@nvidia.com/ Depends-on: series=16300 ("Add ASO meter support in MLX5 PMD ") https://patchwork.dpdk.org/project/dpdk/list/?series=16300 V2: Delete default policy and change relation doc files. V3: Fix coding style issues. Haifei Luo (1): app/testpmd: support policy actions per color Li Zhang (1): ethdev: add pre-defined meter policy API app/test-flow-perf/main.c | 7 - app/test-pmd/cmdline.c | 14 +- app/test-pmd/cmdline_flow.c | 118 ++++- app/test-pmd/cmdline_mtr.c | 257 +++------- app/test-pmd/cmdline_mtr.h | 4 +- app/test-pmd/config.c | 32 ++ app/test-pmd/testpmd.h | 2 + doc/guides/prog_guide/rte_flow.rst | 21 + .../traffic_metering_and_policing.rst | 16 +- doc/guides/rel_notes/release_21_05.rst | 22 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 48 +- drivers/net/mlx5/mlx5.h | 24 +- drivers/net/mlx5/mlx5_flow.c | 46 -- drivers/net/mlx5/mlx5_flow.h | 18 +- drivers/net/mlx5/mlx5_flow_aso.c | 8 +- drivers/net/mlx5/mlx5_flow_dv.c | 461 +----------------- drivers/net/mlx5/mlx5_flow_meter.c | 369 +------------- drivers/net/softnic/rte_eth_softnic_flow.c | 19 +- .../net/softnic/rte_eth_softnic_internals.h | 18 +- drivers/net/softnic/rte_eth_softnic_meter.c | 264 +++++++--- lib/librte_ethdev/rte_flow.h | 22 + lib/librte_ethdev/rte_mtr.c | 55 ++- lib/librte_ethdev/rte_mtr.h | 215 ++++++-- lib/librte_ethdev/rte_mtr_driver.h | 44 +- lib/librte_ethdev/version.map | 5 +- 25 files changed, 837 insertions(+), 1272 deletions(-) -- 2.27.0