From: Rongwei Liu <rongweil@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
<thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>
Subject: [RFC 1/9] ethdev: add flex item modify field support
Date: Wed, 21 Dec 2022 10:39:52 +0200 [thread overview]
Message-ID: <20221221084000.3680015-2-rongweil@nvidia.com> (raw)
In-Reply-To: <20221221084000.3680015-1-rongweil@nvidia.com>
Add flex item as modify field destination.
Add "struct rte_flow_item_flex_handle *flex_handle" into
"struct rte_flow_action_modify_data" as union with existed
"level" member. This new member is dedicated for modifying
flex item.
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
---
doc/guides/prog_guide/rte_flow.rst | 36 ++++++++++++++------------
doc/guides/rel_notes/release_22_03.rst | 4 +++
lib/ethdev/rte_flow.h | 8 ++++--
3 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 3e6242803d..ea20145224 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -2952,23 +2952,25 @@ value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}.
.. table:: destination/source field definition
- +---------------+----------------------------------------------------------+
- | Field | Value |
- +===============+==========================================================+
- | ``field`` | ID: packet field, mark, meta, tag, immediate, pointer |
- +---------------+----------------------------------------------------------+
- | ``level`` | encapsulation level of a packet field or tag array index |
- +---------------+----------------------------------------------------------+
- | ``offset`` | number of bits to skip at the beginning |
- +---------------+----------------------------------------------------------+
- | ``value`` | immediate value buffer (source field only, not |
- | | applicable to destination) for RTE_FLOW_FIELD_VALUE |
- | | field type |
- +---------------+----------------------------------------------------------+
- | ``pvalue`` | pointer to immediate value data (source field only, not |
- | | applicable to destination) for RTE_FLOW_FIELD_POINTER |
- | | field type |
- +---------------+----------------------------------------------------------+
+ +-----------------+----------------------------------------------------------+
+ | Field | Value |
+ +=================+==========================================================+
+ | ``field`` | ID: packet field, mark, meta, tag, immediate, pointer |
+ +-----------------+----------------------------------------------------------+
+ | ``level`` | encapsulation level of a packet field or tag array index |
+ +-----------------+----------------------------------------------------------+
+ | ``flex_handle`` | flex item handle of a packet field |
+ +-----------------+----------------------------------------------------------+
+ | ``offset`` | number of bits to skip at the beginning |
+ +-----------------+----------------------------------------------------------+
+ | ``value`` | immediate value buffer (source field only, not |
+ | | applicable to destination) for RTE_FLOW_FIELD_VALUE |
+ | | field type |
+ +-----------------+----------------------------------------------------------+
+ | ``pvalue`` | pointer to immediate value data (source field only, not |
+ | | applicable to destination) for RTE_FLOW_FIELD_POINTER |
+ | | field type |
+ +-----------------+----------------------------------------------------------+
Action: ``CONNTRACK``
^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst
index 0923707cb8..5fc5aff8a4 100644
--- a/doc/guides/rel_notes/release_22_03.rst
+++ b/doc/guides/rel_notes/release_22_03.rst
@@ -207,6 +207,10 @@ API Changes
* ethdev: Old public macros and enumeration constants without ``RTE_ETH_`` prefix,
which are kept for backward compatibility, are marked as deprecated.
+* ethdev: added a new field:
+
+ - modify flex item: ``rte_flow_action_modify_data.flex_handle``
+
* cryptodev: The asymmetric session handling was modified to use a single
mempool object. An API ``rte_cryptodev_asym_session_pool_create`` was added
to create a mempool with element size big enough to hold the generic asymmetric
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b60987db4b..d535722773 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3528,6 +3528,7 @@ enum rte_flow_field_id {
RTE_FLOW_FIELD_IPV6_ECN, /**< IPv6 ECN. */
RTE_FLOW_FIELD_GTP_PSC_QFI, /**< GTP QFI. */
RTE_FLOW_FIELD_METER_COLOR, /**< Meter color marker. */
+ RTE_FLOW_FIELD_FLEX_ITEM, /**< Flex item. */
};
/**
@@ -3541,8 +3542,11 @@ struct rte_flow_action_modify_data {
RTE_STD_C11
union {
struct {
- /** Encapsulation level or tag index. */
- uint32_t level;
+ /**< Encapsulation level or tag index or flex item handle. */
+ union {
+ uint32_t level;
+ struct rte_flow_item_flex_handle *flex_handle;
+ };
/** Number of bits to skip from a field. */
uint32_t offset;
};
--
2.27.0
next prev parent reply other threads:[~2022-12-21 8:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 8:39 [RFC 0/9] support flex item matching and modify field Rongwei Liu
2022-12-21 8:39 ` Rongwei Liu [this message]
2023-01-11 16:34 ` [RFC 1/9] ethdev: add flex item modify field support Ori Kam
2023-01-19 4:58 ` [PATCH v2 00/11] add flex item support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-01-20 9:07 ` Andrew Rybchenko
2023-01-30 4:29 ` Rongwei Liu
2023-01-30 4:35 ` Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 00/11] add flex item support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-30 4:52 ` [PATCH v3 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-30 4:53 ` [PATCH v3 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 00/11] add flex item support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 01/11] ethdev: add flex item modify field support Rongwei Liu
2023-02-02 2:59 ` Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 0/4] add flex item support Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 1/4] ethdev: add flex item modify field support Rongwei Liu
2023-02-09 15:55 ` Ferruh Yigit
2023-02-06 3:39 ` [PATCH v4 2/4] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 3/4] app/testpmd: raw encap with flex item support Rongwei Liu
2023-02-06 3:39 ` [PATCH v4 4/4] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-02-09 14:49 ` [PATCH v4 0/4] add flex item support Ferruh Yigit
2023-01-30 13:19 ` [PATCH v3 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-30 13:19 ` [PATCH v3 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-30 13:20 ` [PATCH v3 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2023-02-03 11:00 ` Singh, Aman Deep
2023-01-19 4:58 ` [PATCH v2 02/11] app/testpmd: pass flex handle into matching mask Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 03/11] net/mlx5: enable hws flex item create Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 04/11] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 05/11] net/mlx5: adopt new flex item prm definition Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 06/11] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 07/11] net/mlx5: add flex item modify field implementation Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 08/11] net/mlx5: return error for sws modify field Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 09/11] app/testpmd: raw encap with flex item support Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 10/11] doc/mlx5: update mlx5 doc Rongwei Liu
2023-01-19 4:58 ` [PATCH v2 11/11] app/testpmd: adjust cleanup sequence when quitting Rongwei Liu
2022-12-21 8:39 ` [RFC 2/9] app/testpmd: add flex item modify field cmdline support Rongwei Liu
2022-12-21 8:39 ` [RFC 3/9] app/testpmd: pass flex handle into matching mask Rongwei Liu
2022-12-21 8:39 ` [RFC 4/9] net/mlx5: enable hws flex item create Rongwei Liu
2022-12-21 8:39 ` [RFC 5/9] net/mlx5: add IPv6 protocol as flex item input Rongwei Liu
2022-12-21 8:39 ` [RFC 6/9] net/mlx5/hws: add hws flex item matching support Rongwei Liu
2022-12-21 8:39 ` [RFC 7/9] net/mlx5/hws: add flex item modify field implementation Rongwei Liu
2022-12-21 8:39 ` [RFC 8/9] net/mlx5: return error for sws modify field Rongwei Liu
2022-12-21 8:40 ` [RFC 9/9] app/testpmd: raw encap with flex item support Rongwei Liu
-- strict thread matches above, loose matches on Subject: below --
2022-12-21 7:39 [RFC 0/9] add hws flex item matching and modify field Rongwei Liu
2022-12-21 7:39 ` [RFC 1/9] ethdev: add flex item modify field support Rongwei Liu
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=20221221084000.3680015-2-rongweil@nvidia.com \
--to=rongweil@nvidia.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/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).