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 34B35A0524; Wed, 14 Apr 2021 10:02:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB7EE1617CB; Wed, 14 Apr 2021 10:02:20 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by mails.dpdk.org (Postfix) with ESMTP id ED2EF1617C3 for ; Wed, 14 Apr 2021 10:02:18 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 6D5865803F2; Wed, 14 Apr 2021 04:02:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 14 Apr 2021 04:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= oGHgBSKkTbQrfbmCPZfxCunOp+PBd4G8e8C1E11adyg=; b=RUfbTxNVJhFBaIAp HzDAgoaRayXCQCm7fgdXp3GjQt0PAJRrRJuGP4zSjTB9KY505rjdo1SE3kGNOxYq wTKcHxjDwpL1v8VyYEYLBto8CuZbpyxb68WPesoykvcD/BI08OQ0B57RL5mrYhWX CJuiitadIjsNI1Mw4JN0yj4Zur34CaTB7xrmYcCo4Rs2QOBI5lQWlDGPYFBxSZzq qstG2lG0TCHb6L42Cl0gWnNP7aY9XKS8lHhXshf9Wqka8KvihNZp569+10OXOcqR M3o7qSWxIyp7aUd/bOWd0JLd+d4EADKKNu2Z4ovjF0cWQDo7oX+e9d4VgKGfnNZj k7dgqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=oGHgBSKkTbQrfbmCPZfxCunOp+PBd4G8e8C1E11ad yg=; b=JH1hBAuxGBaSoHsjLOzeo1rces+aMNYkQjUdfKamtvSH05lQ2wolJrVhR wNndWHtuOObkIXPbFsQTVTkJkhC0E91GH7tiNaC7y48Ex91DZxKiVYKdghHKuuNM hzT7eV2uL/Z0+kiRDhApTXYs2ekLOLGMCoqeF7kflrRQvn20yxCBR5kqp+kQ7UOU /Hw/sQgubZCsCGg+ulyCCMcHBCfPk8mnvnNVbJev1Nr+RYvlG01LXvJzJAX9CV8X APtdVCxn/rujTeZmOQlxVA2OH1Ja8UvBFsjAUrPPUZi0mNKcMAcrsGZUO91/iBxy ozhl39r7g/oN+4JnzfZk/yyQ0ZBHg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeltddguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7082B108005F; Wed, 14 Apr 2021 04:02:15 -0400 (EDT) From: Thomas Monjalon To: "Dumitrescu, Cristian" , Li Zhang Cc: Ori Kam , Slava Ovsiienko , Matan Azrad , "lironh@marvell.com" , Wisam Monther , "Li, Xiaoyun" , "Singh, Jasvinder" , "Yigit, Ferruh" , Andrew Rybchenko , Ray Kinsella , Jerin Jacob , Hemant Agrawal , "dev@dpdk.org" , Raslan Darawsheh , Roni Bar Yanai , Haifei Luo , "Jiawei(Jonny) Wang" Date: Wed, 14 Apr 2021 10:02:13 +0200 Message-ID: <24522212.gn4sJpSb88@thomas> In-Reply-To: References: <20210318085815.804896-1-lizh@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" Cristian, Li, please remove useless context when replying. 14/04/2021 06:55, Li Zhang: > > > + * Example #2: GREEN - Do nothing, YELLOW - Do nothing, RED - DROP > > > + * struct rte_mtr_meter_policy_params policy_1 = > > > + * (struct > > > rte_mtr_meter_policy_params) { > > > + * .actions[RTE_COLOR_GREEN] = NULL, > > > + * .actions[RTE_COLOR_YELLOW] = NULL, > > > + * .actions[RTE_COLOR_RED] = (struct rte_flow_action[]) { > > > + * { > > > + * .type = RTE_FLOW_ACTION_TYPE_DROP, > > > + * }, > > > + * { > > > + * .type = RTE_FLOW_ACTION_TYPE_END, > > > + * }, > > > + * }, > > > + * }; > > > + * > > > > These two example policies should be available to be used straight away, > > please make them real data structures, not comments. Wait, you are giving code examples as part of doxygen? It's really too long, we don't do that. > > I suggest their names as: pass_color_policy_params and > > drop_red_policy_params. > > > Thanks. Will change the names. But it can not be real data structures, since it just one example define and no use code. > It will bring build as below: > error: 'drop_red_policy_params' defined but not used. > User can copy these example to his .c file when it using rte_mtr_meter_policy_add(). If you need to provide an example, we use the directory examples. I see rte_mtr is not implemented in any example, so it could be a later addition.