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 ACC59A034F; Thu, 1 Apr 2021 10:16:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98F7040142; Thu, 1 Apr 2021 10:16:33 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 61B0C40141 for ; Thu, 1 Apr 2021 10:16:31 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from lizh@nvidia.com) with SMTP; 1 Apr 2021 11:16:28 +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 1318GSDN010715; Thu, 1 Apr 2021 11:16:28 +0300 From: Li Zhang To: dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com, shahafs@nvidia.com Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com Date: Thu, 1 Apr 2021 11:16:20 +0300 Message-Id: <20210401081624.1482490-1-lizh@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/4] net/mlx5: support meter policy operations 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" MLX5 PMD checks the validation of actions in policy while add a new meter policy, if pass the validation, allocates the new policy object from the meter policy indexed memory pool. It is common to use the same policy for multiple meters. MLX5 PMD supports two types of policy: termination policy and no-termination policy. The termination policy must have a fate action as in the policy actions, it can support QUEUE, RSS, PORT_ID, DROP, JUMP, MARK and SET_TAG actions if policy color is GREEN, also supports DROP action if policy color is RED. The no-termination policy uses policy ID 0 as default policy, it is created internal and cannot be changed by API. The default policy red action is drop, green action is jump to suffix table. Create this policy by policy API with green/yellow no action, red with drop action. One example in testpmd command: add port meter policy 0 g_actions end y_actions end r_actions drop / end Depends-on: series=15998 ("Add ASO meter support in MLX5 PMD ") https://patchwork.dpdk.org/project/dpdk/list/?series=15998 Depends-on: series=16037 ("Support meter policy API ") https://patchwork.dpdk.org/project/dpdk/list/?series=16037 Li Zhang (3): net/mlx5: support meter policy operations net/mlx5: support meter creation with policy net/mlx5: prepare sub-policy for a flow with meter Shun Hao (1): net/mlx5: connect meter policy to created flows doc/guides/nics/mlx5.rst | 12 + drivers/net/mlx5/linux/mlx5_os.c | 13 +- drivers/net/mlx5/mlx5.c | 76 +- drivers/net/mlx5/mlx5.h | 197 ++- drivers/net/mlx5/mlx5_flow.c | 614 +++++++++- drivers/net/mlx5/mlx5_flow.h | 120 +- drivers/net/mlx5/mlx5_flow_aso.c | 10 +- drivers/net/mlx5/mlx5_flow_dv.c | 1842 ++++++++++++++++++++++++++-- drivers/net/mlx5/mlx5_flow_meter.c | 738 ++++++++++- 9 files changed, 3288 insertions(+), 334 deletions(-) -- 2.27.0