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 131F5A0542; Sat, 24 Sep 2022 11:34:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A97DB400D5; Sat, 24 Sep 2022 11:34:40 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 33589400D4 for ; Sat, 24 Sep 2022 11:34:39 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 8FBCC32005BC; Sat, 24 Sep 2022 05:34:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 24 Sep 2022 05:34:37 -0400 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=fm2; t=1664012077; x= 1664098477; bh=TPgHr5rP1gYEfpiiNT+uflF1kPM/ByqRHjQHQOOz51w=; b=X hgO8ochAQLTvJ1MR+7bd3Kk2MD/67MlcO8ulXIs6dA55j/6fI18d7oYYP/TIjp0D 4ZFegaDB9DNpPh5vqQtNUHFrSK+m60eChswTtnh6CK3tFxWDmpV2IGdY8rkDaGiq NUJF96UTE/rc7OMpv8oH7DE6512iCo/DV1KL0OfCOE8pHSqYX0tfc6vzk1pPRi5K qu9r0/YqteVnM6NOcdsVmbMMss7D5RcQmHO3yiG4w3QpzeL7GzoWkbZP4pBN2gUU cB7n45cdD41vxJxOi7xTCDQiJJ0FwqEECWbaCtym8+f63L2k6vx7dKQ0kjr1UyvZ otExXexRNQuXFD7eTc7Vg== 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=fm2; t=1664012077; x= 1664098477; bh=TPgHr5rP1gYEfpiiNT+uflF1kPM/ByqRHjQHQOOz51w=; b=e QXT8UM40jOFgOrrFVPVQbVSMe6jNDRoT/3dld5poWhedYKolZle0yoGKhLvvk4g/ XYFuaZOg6b7L5JCFIr7R8i0tpbP6crVq6yAPv2z8yVL9mNAiFjfSQaxhCH0XhPvY cwf/WNfALW3XJlXCHS4J5dUQVfVCLkvVQA+07N+WnvCWJIfbQkPvMiGk10JIUens 4PBVE5QCmiJDhWZ9trmPKc6aM1b2F1f3UlXwiYjqqXKk/c6PxbV/IdakyMF/NZpz EKxw4Ssq1ceMwxLlmKvEuoQtPxvbHmBW/TXGBj+5vXwMHr31vR7HjmiqIoowPMlq sGw1I08sFpxmvxACfVapw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefkedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeekhfejheffveehvdeufeetjeehieehgfdvjeefueefteejffeu teegieelgeeiueenucffohhmrghinhepphegrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdr nhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 24 Sep 2022 05:34:36 -0400 (EDT) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org Subject: Re: [PATCH V3 0/7] pipeline: support direct registers and meters Date: Sat, 24 Sep 2022 11:34:33 +0200 Message-ID: <5839965.alqRGMn8q6@thomas> In-Reply-To: <20220830185811.1843109-1-cristian.dumitrescu@intel.com> References: <20220826103605.1579589-1-cristian.dumitrescu@intel.com> <20220830185811.1843109-1-cristian.dumitrescu@intel.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 30/08/2022 20:58, Cristian Dumitrescu: > This patch introduces support for direct registers and meters. The > difference between indirect (indexed) and direct registers and meters > is explained below [1][2][3]. > > 1. Indirect (indexed) registers and meters. > > The index into an array of registers or meters used on the data path > is typically read from the action data identified by a table lookup > operation. > > This means that the control plane manages the mapping of the mapping > of array entries to table entries and sets up this index explicitly > into the table entry action data. > > These are called indirect or indexed registers and meters, and they > allow multiple table entries to share the same register/meter, as well > as a 1:1 mapping of table entries to register/meter array entries. > > 2. Direct registers and meters. > In the case of 1:1 mapping of table entries to register/meter array > elements, it is sometimes desired to avoid the explicit allocation of > register/meter array index to each table entry by the control plane. > > One way this can be done is by implementing a mechanism to associate > a unique ID to each table entry, including the default table entry as > well; once the entry ID is retrieved as result of the table lookup > operation, it is saved by the pipeline and used later on as the > index into the register/meter array. > > These are called direct registers and meters, and have the advantage > that the index is auto-generated, which simplifies the controller > implementation; the disadvantage is that they do not allow multiple > table entries to share the same register or meter. > > References: > > [1] Indirect and direct counters: > https://p4.org/p4-spec/docs/PSA.html#sec-counters > > [2] Indirect and direct registers: > https://p4.org/p4-spec/docs/PSA.html#sec-registers > > [3] Indirect and direct meters: > https://p4.org/p4-spec/docs/PSA.html#sec-meters > > Depends-on: series-24366 ("pipeline: make the hash function configurable per table") > > Change log: > > V3: > -Fixed issues related to CLI parsing > -Fixed issue related to the key offset > > V2: > -Fixed minor style issues flagged by CI/CD > > Cristian Dumitrescu (7): > table: add entry ID for regular tables > table: add entry ID for learner tables > pipeline: add table entry ID read instruction > pipeline: support direct registers on the control path > pipeline: support direct meters on the control path > examples/pipeline: add CLI commands for direct registers > examples/pipeline: add CLI commands for direct meters Applied, thanks.