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 2F3FDA0562; Wed, 14 Apr 2021 11:04:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 009831618A9; Wed, 14 Apr 2021 11:04:08 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by mails.dpdk.org (Postfix) with ESMTP id 862D916186E for ; Wed, 14 Apr 2021 11:04:07 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 31CBA5805DD; Wed, 14 Apr 2021 05:04:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 14 Apr 2021 05:04:07 -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= 3Jawr98kN35nSe63iqypD1RWn7pjOZfa+yNFgaJELZI=; b=zLfPC3tXQz6Q9y9X Bsz+PAqub4Yur4Y+i7Mym0BqwyZsIVWwg/klmLBld17Au2HZw57s3+7celHNvRbe hmMP5Qe5YSsOfOmW8k3t8HB1zH4qozyd/qI4xI+oflK9HW7VxVNtMzQ2WGXqO1/m QDbOkgsyzihkersexZIgXaCNEOZMD27Mv0llwL8yE/+4bi0fICIN387+J3tp+86D ovGKs9tVxC91ZbARQUqbd7LxST1wjDOghK7Viwn+aozLxZZ/oUgr56lxD70wbV/M WHLM9c67+xP7Kpd2LIx8pax5XcspFF+oRzl0+bxDnE4qLYNe414JSO4j+PweJu+G QyBFHQ== 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=3Jawr98kN35nSe63iqypD1RWn7pjOZfa+yNFgaJEL ZI=; b=r93rXUeKu3sYZkRmxCjnQxSnbiefcutRlesFzNxseLZU3SCR8HLUm0ez9 IsdlozSWUVQGMK0a4kSF1GsW1sSFvSW4R2763JNh4UaOlfX71GDnyFPiSXEumEzi lwwTYQGGrfMSARMo4qYR8D/WAzRkrXHRAWj7ghaMXhP8CumESvygvMQabDupWns+ tyKy2K1iQh5ilW0YKYzoQLVwZ4hYBzjPnG133YSQpc9JPA7ad1U9SggSNKdSxL19 3urUGsi4pFhtB4hy0KYx8BvZMzl8Z83Hb+oez0mE9uf79t2VCIalWGf3VXDrV930 HZ9gdJfOemD4UWudjLxwmaf6Eeq7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeluddguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 32D0024005B; Wed, 14 Apr 2021 05:04:04 -0400 (EDT) From: Thomas Monjalon To: "Dumitrescu, Cristian" , Li Zhang , Asaf Penso 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 11:04:03 +0200 Message-ID: <2578247.5h4o7p2rvM@thomas> In-Reply-To: References: <20210318085815.804896-1-lizh@nvidia.com> <24522212.gn4sJpSb88@thomas> 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" 14/04/2021 10:47, Asaf Penso: > From: Thomas Monjalon > >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. > > > > > We want, as a rule of thumb, to provide more code snippets and not necessarily full-blown example applications. > Where do you suggest having that? In the examples directory, adding small functions.