From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [PATCH V3 0/7] pipeline: support direct registers and meters
Date: Tue, 30 Aug 2022 18:58:04 +0000 [thread overview]
Message-ID: <20220830185811.1843109-1-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <20220826103605.1579589-1-cristian.dumitrescu@intel.com>
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
examples/pipeline/cli.c | 654 +++++++++++++++++------
examples/pipeline/examples/meter.cli | 2 +-
lib/pipeline/rte_swx_ctl.h | 133 +++++
lib/pipeline/rte_swx_pipeline.c | 390 ++++++++++++++
lib/pipeline/rte_swx_pipeline_internal.h | 21 +
lib/pipeline/version.map | 5 +
lib/table/rte_swx_table.h | 13 +
lib/table/rte_swx_table_em.c | 5 +
lib/table/rte_swx_table_learner.c | 13 +-
lib/table/rte_swx_table_learner.h | 12 +
lib/table/rte_swx_table_wm.c | 2 +
11 files changed, 1097 insertions(+), 153 deletions(-)
--
2.34.1
next prev parent reply other threads:[~2022-08-30 18:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 10:35 [PATCH " Cristian Dumitrescu
2022-08-26 10:35 ` [PATCH 1/7] table: add entry ID for regular tables Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 2/7] table: add entry ID for learner tables Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 3/7] pipeline: add table entry ID read instruction Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 4/7] pipeline: support direct registers on the control path Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 5/7] pipeline: support direct meters " Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 6/7] examples/pipeline: add CLI commands for direct registers Cristian Dumitrescu
2022-08-26 10:36 ` [PATCH 7/7] examples/pipeline: add CLI commands for direct meters Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 0/7] pipeline: support direct registers and meters Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 1/7] table: add entry ID for regular tables Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 2/7] table: add entry ID for learner tables Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 3/7] pipeline: add table entry ID read instruction Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 4/7] pipeline: support direct registers on the control path Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 5/7] pipeline: support direct meters " Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 6/7] examples/pipeline: add CLI commands for direct registers Cristian Dumitrescu
2022-08-26 11:21 ` [PATCH V2 7/7] examples/pipeline: add CLI commands for direct meters Cristian Dumitrescu
2022-08-30 18:58 ` Cristian Dumitrescu [this message]
2022-08-30 18:58 ` [PATCH V3 1/7] table: add entry ID for regular tables Cristian Dumitrescu
2022-08-30 18:58 ` [PATCH V3 2/7] table: add entry ID for learner tables Cristian Dumitrescu
2022-09-24 8:25 ` Thomas Monjalon
2022-09-26 9:19 ` Dumitrescu, Cristian
2022-09-26 13:45 ` Thomas Monjalon
2022-08-30 18:58 ` [PATCH V3 3/7] pipeline: add table entry ID read instruction Cristian Dumitrescu
2022-08-30 18:58 ` [PATCH V3 4/7] pipeline: support direct registers on the control path Cristian Dumitrescu
2022-08-30 18:58 ` [PATCH V3 5/7] pipeline: support direct meters " Cristian Dumitrescu
2022-08-30 18:58 ` [PATCH V3 6/7] examples/pipeline: add CLI commands for direct registers Cristian Dumitrescu
2022-08-30 18:58 ` [PATCH V3 7/7] examples/pipeline: add CLI commands for direct meters Cristian Dumitrescu
2022-09-24 9:34 ` [PATCH V3 0/7] pipeline: support direct registers and meters Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220830185811.1843109-1-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).