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 739AC41CE0; Sun, 19 Feb 2023 18:04:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1014042D1A; Sun, 19 Feb 2023 18:04:27 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id BAEC840698 for ; Sun, 19 Feb 2023 18:04:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 00AC15C0127; Sun, 19 Feb 2023 12:04:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 19 Feb 2023 12:04:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1676826264; x= 1676912664; bh=xyyDl0CLCNUx4ck7p6ME3j8UxCJAmn4acFcQo7rrioE=; b=Y QXd4Hb86X/z2zA8KUPc4SWrgbjmttyb67GsKTx/OmfTFaKN58tYW4yvIZI52rdiI QfeTMV/Ea4Ka7+xcd1Zk7Zeu+ELJY16K/c+8t+CaAfOA3Zk1YIMjG3z3iLaOy9aw LaoFn8xPhoKuylUVwOL0UenaozME1mJJR6HsxHkuhp2NrS0CRn2tIUMcYQqGBK7h fIdQntSHoY3ZBGmR6RMAnogRyTQXY8aHKgX4iKiW+Blv9+jj+uajGab1Zsiu+Qzw qbTcCdh7kyubjdKqN5hS6j0o1T0xhcrZzBCvsxhkDijFEA5n9yB/+lj4cPVYTxHm lym9X89fiB5pexWEJlrYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1676826264; x= 1676912664; bh=xyyDl0CLCNUx4ck7p6ME3j8UxCJAmn4acFcQo7rrioE=; b=A xTdbj4wfxJG2Z2QCJuiVNPP9biA9IK24p+JyWLUyQVSy3cBmlwGGoOpIv3DImSlj eVLVkVCX4zhuopDm+S5zzi9gYywB7GZvqa+VJLXQoCSGcnREHEFBnWZzyuQEk2fK Cp5qB0xhu2CC/jZlZUxuJdOfj4MaAQmALHTlTxjzJvjH4je4vM+5dYfEaZC7lFMN WVQ+bM9XEy5hgSFaY//kr3UVsZHClz+bhBMDBoOEw4IdBCKJ6py1TjZetNSkiHgz o/RHRrzcltlGvpIvp3OLwcrJ4nBPZq/vFO81RRne4WB8AHdMS4THHELt2e16LNH0 zn2w8bfuIOaN9L6y+ELdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejfedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Feb 2023 12:04:23 -0500 (EST) From: Thomas Monjalon To: Ori Kam , Gregory Etelson Cc: dev@dpdk.org, matan@nvidia.com, rasland@nvidia.com, Aman Singh , Yuying Zhang , Ferruh Yigit , Andrew Rybchenko Subject: Re: [PATCH v10 2/2] ethdev: add quota flow action and item Date: Sun, 19 Feb 2023 18:04:20 +0100 Message-ID: <2252697.IFkqi6BYcA@thomas> In-Reply-To: <20230202134750.10418-2-getelson@nvidia.com> References: <20221221073547.988-1-getelson@nvidia.com> <20230202134750.10418-1-getelson@nvidia.com> <20230202134750.10418-2-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 02/02/2023 14:47, Gregory Etelson: > Quota action limits traffic according to pre-defined configuration. > Quota reflects overall traffic usage regardless bandwidth. > Quota flow action initialized with signed tokens number value. > Quota flow action updates tokens number according to > these rules: > 1. if quota was configured to count packet length, for each packet > of size S, tokens number reduced by S. > 2. If quota was configured to count packets, each packet decrements > tokens number. > quota action sets packet metadata according to a number of remaining > tokens number: > PASS - remaining tokens number is non-negative. > BLOCK - remaining tokens number is negative. > > Quota flow item matches on that data > > Application updates tokens number in quota flow action > with SET or ADD calls: > SET(QUOTA, val) - arm quota with new tokens number set to val > ADD(QUOTA, val) - increase existing quota tokens number by val > > Both SET and ADD return to application number of tokens stored in port > before update. > > If quota state was BLOCK (negative action tokens number) > application can change it to PASS after providing enough tokens to > raise action tokens number to 0 or above. > > Application must create a rule with quota action to mark flow and > match on the mark with quota item in following flow rule. > > Signed-off-by: Gregory Etelson > Acked-by: Ori Kam I feel this kind of explanation would have been better in rte_flow.rst instead of a "doxygen-like" documentation. Greogory, Ori, feels lucky, you've just got promoted as the rewriters of the whole rte_flow.rst :)