From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96BD7C433B4 for ; Tue, 13 Apr 2021 16:25:24 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id DF64C6124B for ; Tue, 13 Apr 2021 16:25:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF64C6124B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ashroe.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADE9016117A; Tue, 13 Apr 2021 18:25:20 +0200 (CEST) Received: from dal3relay247.mxroute.com (dal3relay247.mxroute.com [64.40.27.247]) by mails.dpdk.org (Postfix) with ESMTP id 05342161177 for ; Tue, 13 Apr 2021 18:25:18 +0200 (CEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by dal3relay247.mxroute.com (ZoneMTA) with ESMTPSA id 178cc0d1a37000770d.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Tue, 13 Apr 2021 16:25:14 +0000 X-Zone-Loop: e0243c8777f9bd382f7b494fe2c4b331084bd2a129b0 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=yqEMz9J9wW2fq0ZtJqmKqsrUy4jAx4x2hAD6I5f2STU=; b=OaBImX2OlspGQzUhgJjKCC6Y5B TPRPswyDJCa034RO5UJ+EZAaHUWrXd4Osy/9Q/e6lFWwElhL39isrqwkag8AcbERCWYds3KwkuoI5 62wgabYKoVoNQp/eFOQ+yPwdx5uq7OQvkiOXU5pOi+/c9WUaQSoTn9ZM3NKR8w/QRRbcn0nhPUsF4 lRGo2oW72MIHbMv6ms+Y/Mj2D6aM3eHXttGUyWR8qhWB6xWwfsu7my08NkJtf7q4yxLxienS0dLH3 Nscm7lghvvJ44kgjSdeQBl5iamdUOstqk3DrbTk8CLkJyxs69zavjmUTlrlLLSsH98fNDH3xFL80v 3vxn5rXQ==; To: Li Zhang , dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com, shahafs@nvidia.com, cristian.dumitrescu@intel.com, lironh@marvell.com, Wisam Jaddo , Xiaoyun Li , Jasvinder Singh , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Neil Horman Cc: dev@dpdk.org, rasland@nvidia.com, roniba@nvidia.com, Haifei Luo , Jiawei Wang References: <20210318085815.804896-1-lizh@nvidia.com> <20210413001428.1999959-1-lizh@nvidia.com> <20210413001428.1999959-2-lizh@nvidia.com> From: "Kinsella, Ray" Message-ID: Date: Tue, 13 Apr 2021 17:25:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210413001428.1999959-2-lizh@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined 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" On 13/04/2021 01:14, Li Zhang wrote: > 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. > > Allow coloring the packet using a new rte_flow_action_color > as could be done by the old policy API. > > The next API function were added: > - rte_mtr_meter_policy_create > - rte_mtr_meter_policy_delete > - rte_mtr_meter_policy_update > - rte_mtr_meter_policy_validate > The next struct was changed: > - rte_mtr_params > - rte_mtr_capabilities > The next API was deleted: > - rte_mtr_policer_actions_update > > To support this API the following app were changed: > app/test-flow-perf: clean meter policer > app/testpmd: clean meter policer > > To support this API the following drivers were changed: > net/softnic: support meter policy API > 1. cleans meter rte_mtr_policer_action. > 2. Support policy API to get color action as policer action did. > The color action will be mapped into rte_table_action_policer. > > net/mlx5: clean meter creation management > Cleans and breaks part of the current meter management > in order to allow better design with policy API. > > Signed-off-by: Li Zhang > Signed-off-by: Haifei Luo > Signed-off-by: Jiawei Wang > Acked-by: Matan Azrad > --- > app/test-flow-perf/main.c | 7 - > app/test-pmd/cmdline.c | 1 - > app/test-pmd/cmdline_mtr.c | 172 ------- > app/test-pmd/cmdline_mtr.h | 1 - > 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 | 18 - > 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 +- > 22 files changed, 568 insertions(+), 1258 deletions(-) > Acked-by: Ray Kinsella