* [PATCH] ethdev: add TCP/IP modify field IDs
@ 2023-08-08 8:37 Suanming Mou
2023-09-08 3:49 ` [PATCH v2] " Suanming Mou
2023-10-11 11:30 ` [PATCH v3 1/2] doc: add modify_field action description Suanming Mou
0 siblings, 2 replies; 8+ messages in thread
From: Suanming Mou @ 2023-08-08 8:37 UTC (permalink / raw)
To: Ori Kam, Aman Singh, Yuying Zhang, Thomas Monjalon, Ferruh Yigit,
Andrew Rybchenko
Cc: dev
Currently, get TCP/IP header or data length information from traffic
is missing in the modify field IDs. This commit adds the missing
TCP data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed
IDs. This allows users be able to manager more TCP/IP fields.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 1 +
lib/ethdev/rte_flow.h | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 94827bcc4a..3fe9bafbec 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -937,6 +937,7 @@ static const char *const modify_field_ids[] = {
"flex_item",
"hash_result",
"geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls",
+ "tcp_date_off", "ipv4_ihl", "ipv4_total_len", "ipv6_payload_len",
NULL
};
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 86ed98c562..919556d95b 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3883,6 +3883,10 @@ enum rte_flow_field_id {
RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */
RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data. */
RTE_FLOW_FIELD_MPLS, /**< MPLS header. */
+ RTE_FLOW_FIELD_TCP_DATA_OFFSET, /**< TCP data offset. */
+ RTE_FLOW_FIELD_IPV4_IHL, /**< IPv4 IHL. */
+ RTE_FLOW_FIELD_IPV4_TOTAL_LEN, /**< IPv4 total length. */
+ RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN /**< IPv6 payload length. */
};
/**
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] ethdev: add TCP/IP modify field IDs
2023-08-08 8:37 [PATCH] ethdev: add TCP/IP modify field IDs Suanming Mou
@ 2023-09-08 3:49 ` Suanming Mou
2023-10-10 10:24 ` Ferruh Yigit
2023-10-11 11:30 ` [PATCH v3 1/2] doc: add modify_field action description Suanming Mou
1 sibling, 1 reply; 8+ messages in thread
From: Suanming Mou @ 2023-09-08 3:49 UTC (permalink / raw)
To: Ori Kam, Aman Singh, Yuying Zhang, Thomas Monjalon, Ferruh Yigit,
Andrew Rybchenko
Cc: dev
Currently, get TCP/IP header or data length information from traffic
is missing in the modify field IDs. This commit adds the missing
TCP data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed
IDs. This allows users be able to manager more TCP/IP fields.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
v2: fix typo tcp_date_off -> tcp_data_off
---
app/test-pmd/cmdline_flow.c | 1 +
lib/ethdev/rte_flow.h | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 94827bcc4a..310068ce88 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -937,6 +937,7 @@ static const char *const modify_field_ids[] = {
"flex_item",
"hash_result",
"geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls",
+ "tcp_data_off", "ipv4_ihl", "ipv4_total_len", "ipv6_payload_len",
NULL
};
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 2ebb76dbc0..43ba51da6e 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3875,6 +3875,10 @@ enum rte_flow_field_id {
RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */
RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data. */
RTE_FLOW_FIELD_MPLS, /**< MPLS header. */
+ RTE_FLOW_FIELD_TCP_DATA_OFFSET, /**< TCP data offset. */
+ RTE_FLOW_FIELD_IPV4_IHL, /**< IPv4 IHL. */
+ RTE_FLOW_FIELD_IPV4_TOTAL_LEN, /**< IPv4 total length. */
+ RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN /**< IPv6 payload length. */
};
/**
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ethdev: add TCP/IP modify field IDs
2023-09-08 3:49 ` [PATCH v2] " Suanming Mou
@ 2023-10-10 10:24 ` Ferruh Yigit
2023-10-11 0:11 ` Suanming Mou
0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2023-10-10 10:24 UTC (permalink / raw)
To: Suanming Mou, Ori Kam, Aman Singh, Yuying Zhang, Thomas Monjalon,
Andrew Rybchenko
Cc: dev
On 9/8/2023 4:49 AM, Suanming Mou wrote:
> Currently, get TCP/IP header or data length information from traffic
> is missing in the modify field IDs. This commit adds the missing
> TCP data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed
> IDs. This allows users be able to manager more TCP/IP fields.
>
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> ---
>
> v2: fix typo tcp_date_off -> tcp_data_off
>
> ---
> app/test-pmd/cmdline_flow.c | 1 +
> lib/ethdev/rte_flow.h | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 94827bcc4a..310068ce88 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -937,6 +937,7 @@ static const char *const modify_field_ids[] = {
> "flex_item",
> "hash_result",
> "geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls",
> + "tcp_data_off", "ipv4_ihl", "ipv4_total_len", "ipv6_payload_len",
> NULL
> };
>
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index 2ebb76dbc0..43ba51da6e 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -3875,6 +3875,10 @@ enum rte_flow_field_id {
> RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */
> RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data. */
> RTE_FLOW_FIELD_MPLS, /**< MPLS header. */
> + RTE_FLOW_FIELD_TCP_DATA_OFFSET, /**< TCP data offset. */
> + RTE_FLOW_FIELD_IPV4_IHL, /**< IPv4 IHL. */
> + RTE_FLOW_FIELD_IPV4_TOTAL_LEN, /**< IPv4 total length. */
> + RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN /**< IPv6 payload length. */
> };
>
> /**
Hi Suanming,
Patch looks good. But, testpmd modify flow action support seems not
documented at all, can you please first add it [1], later update that
document with this patch?
Also can you please check if `rte_flow.rst` also needs to be updated or not?
[1]: `doc/guides/testpmd_app_ug/testpmd_funcs.rst`, `Flow rules
management` section
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2] ethdev: add TCP/IP modify field IDs
2023-10-10 10:24 ` Ferruh Yigit
@ 2023-10-11 0:11 ` Suanming Mou
2023-10-11 8:58 ` Suanming Mou
0 siblings, 1 reply; 8+ messages in thread
From: Suanming Mou @ 2023-10-11 0:11 UTC (permalink / raw)
To: Ferruh Yigit, Ori Kam, Aman Singh, Yuying Zhang,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Andrew Rybchenko
Cc: dev
Hi,
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: Tuesday, October 10, 2023 6:24 PM
> To: Suanming Mou <suanmingm@nvidia.com>; Ori Kam <orika@nvidia.com>;
> Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang
> <yuying.zhang@intel.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas@monjalon.net>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2] ethdev: add TCP/IP modify field IDs
>
> On 9/8/2023 4:49 AM, Suanming Mou wrote:
> > Currently, get TCP/IP header or data length information from traffic
> > is missing in the modify field IDs. This commit adds the missing TCP
> > data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed IDs.
> > This allows users be able to manager more TCP/IP fields.
> >
> > Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> > ---
> >
> > v2: fix typo tcp_date_off -> tcp_data_off
> >
> > ---
> > app/test-pmd/cmdline_flow.c | 1 +
> > lib/ethdev/rte_flow.h | 4 ++++
> > 2 files changed, 5 insertions(+)
> >
>
> Hi Suanming,
>
> Patch looks good. But, testpmd modify flow action support seems not
> documented at all, can you please first add it [1], later update that document with
> this patch?
>
> Also can you please check if `rte_flow.rst` also needs to be updated or not?
Sure, will check and update.
Thanks
>
>
> [1]: `doc/guides/testpmd_app_ug/testpmd_funcs.rst`, `Flow rules management`
> section
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2] ethdev: add TCP/IP modify field IDs
2023-10-11 0:11 ` Suanming Mou
@ 2023-10-11 8:58 ` Suanming Mou
0 siblings, 0 replies; 8+ messages in thread
From: Suanming Mou @ 2023-10-11 8:58 UTC (permalink / raw)
To: Ferruh Yigit, Ori Kam, Aman Singh, Yuying Zhang,
NBU-Contact-Thomas Monjalon (EXTERNAL),
Andrew Rybchenko
Cc: dev
Hi,
> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Sent: Wednesday, October 11, 2023 8:11 AM
> To: Ferruh Yigit <ferruh.yigit@amd.com>; Ori Kam <orika@nvidia.com>; Aman
> Singh <aman.deep.singh@intel.com>; Yuying Zhang <yuying.zhang@intel.com>;
> NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; Andrew
> Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v2] ethdev: add TCP/IP modify field IDs
>
> Hi,
>
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@amd.com>
> > Sent: Tuesday, October 10, 2023 6:24 PM
> > To: Suanming Mou <suanmingm@nvidia.com>; Ori Kam <orika@nvidia.com>;
> > Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang
> > <yuying.zhang@intel.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> > <thomas@monjalon.net>; Andrew Rybchenko
> > <andrew.rybchenko@oktetlabs.ru>
> > Cc: dev@dpdk.org
> > Subject: Re: [PATCH v2] ethdev: add TCP/IP modify field IDs
> >
> > On 9/8/2023 4:49 AM, Suanming Mou wrote:
> > > Currently, get TCP/IP header or data length information from traffic
> > > is missing in the modify field IDs. This commit adds the missing TCP
> > > data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed IDs.
> > > This allows users be able to manager more TCP/IP fields.
> > >
> > > Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> > > ---
> > >
> > > v2: fix typo tcp_date_off -> tcp_data_off
> > >
> > > ---
> > > app/test-pmd/cmdline_flow.c | 1 +
> > > lib/ethdev/rte_flow.h | 4 ++++
> > > 2 files changed, 5 insertions(+)
> > >
> >
> > Hi Suanming,
> >
> > Patch looks good. But, testpmd modify flow action support seems not
> > documented at all, can you please first add it [1], later update that
> > document with this patch?
> >
> > Also can you please check if `rte_flow.rst` also needs to be updated or not?
>
> Sure, will check and update.
`rte_flow.rst` has the modify_field action description in `Action: ``MODIFY_FIELD``` section.
Will update only the ` testpmd_funcs.rst`.
> Thanks
> >
> >
> > [1]: `doc/guides/testpmd_app_ug/testpmd_funcs.rst`, `Flow rules
> > management` section
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/2] doc: add modify_field action description
2023-08-08 8:37 [PATCH] ethdev: add TCP/IP modify field IDs Suanming Mou
2023-09-08 3:49 ` [PATCH v2] " Suanming Mou
@ 2023-10-11 11:30 ` Suanming Mou
2023-10-11 11:30 ` [PATCH v3 2/2] ethdev: add TCP/IP modify field IDs Suanming Mou
2023-10-12 14:17 ` [PATCH v3 1/2] doc: add modify_field action description Ferruh Yigit
1 sibling, 2 replies; 8+ messages in thread
From: Suanming Mou @ 2023-10-11 11:30 UTC (permalink / raw)
To: ferruh.yigit, Aman Singh, Yuying Zhang; +Cc: dev
This commit adds the missing modify_field action description to
`testpmd_funcs.rst`.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
v3: add modify_field description.
---
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 67968ecb7f..04c502798a 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -4108,6 +4108,27 @@ This section lists supported actions and their attributes, if any.
- ``mtr_init_color {value}``: initial color value (green/yellow/red)
- ``mtr_state {unsigned}``: meter state (disabled/enabled)
+- ``modify_field``: Modify packet field
+
+ - ``op``: modify operation (set/add/sub)
+ - ``dst_type``: the destination field to be modified, the supported fields as
+ ``enum rte_flow_field_id`` listed.
+ - ``dst_level``: destination field level.
+ - ``dst_tag_index``: destination field tag array.
+ - ``dst_type_id``: destination field type ID.
+ - ``dst_class``: destination field class ID.
+ - ``dst_offset``: destination field bit offset.
+ - ``src_type``: the modify source field, the supported fields as
+ ``enum rte_flow_field_id`` listed.
+ - ``src_level``: source field level.
+ - ``src_tag_index``: source field tag array.
+ - ``src_type_id``: source field type ID.
+ - ``src_class``: source field class ID.
+ - ``src_offset``: source field bit offset.
+ - ``src_value``: source immediate value.
+ - ``src_ptr``: pointer to source immediate value.
+ - ``width``: number of bits to copy.
+
Destroying flow rules
~~~~~~~~~~~~~~~~~~~~~
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] ethdev: add TCP/IP modify field IDs
2023-10-11 11:30 ` [PATCH v3 1/2] doc: add modify_field action description Suanming Mou
@ 2023-10-11 11:30 ` Suanming Mou
2023-10-12 14:17 ` [PATCH v3 1/2] doc: add modify_field action description Ferruh Yigit
1 sibling, 0 replies; 8+ messages in thread
From: Suanming Mou @ 2023-10-11 11:30 UTC (permalink / raw)
To: ferruh.yigit, Ori Kam, Aman Singh, Yuying Zhang, Thomas Monjalon,
Andrew Rybchenko
Cc: dev
Currently, get TCP/IP header or data length information from traffic
is missing in the modify field IDs. This commit adds the missing
TCP data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed
IDs. This allows users be able to manager more TCP/IP fields.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
v3: add modify_field description.
v2: fix typo tcp_date_off -> tcp_data_off
---
app/test-pmd/cmdline_flow.c | 1 +
lib/ethdev/rte_flow.h | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 10b9b25a3c..cf757d4c96 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -950,6 +950,7 @@ static const char *const modify_field_ids[] = {
"flex_item",
"hash_result",
"geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls",
+ "tcp_data_off", "ipv4_ihl", "ipv4_total_len", "ipv6_payload_len",
NULL
};
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b79bb9968b..3b0485fcde 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3921,6 +3921,10 @@ enum rte_flow_field_id {
RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */
RTE_FLOW_FIELD_GENEVE_OPT_DATA, /**< GENEVE option data. */
RTE_FLOW_FIELD_MPLS, /**< MPLS header. */
+ RTE_FLOW_FIELD_TCP_DATA_OFFSET, /**< TCP data offset. */
+ RTE_FLOW_FIELD_IPV4_IHL, /**< IPv4 IHL. */
+ RTE_FLOW_FIELD_IPV4_TOTAL_LEN, /**< IPv4 total length. */
+ RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN /**< IPv6 payload length. */
};
/**
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/2] doc: add modify_field action description
2023-10-11 11:30 ` [PATCH v3 1/2] doc: add modify_field action description Suanming Mou
2023-10-11 11:30 ` [PATCH v3 2/2] ethdev: add TCP/IP modify field IDs Suanming Mou
@ 2023-10-12 14:17 ` Ferruh Yigit
1 sibling, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2023-10-12 14:17 UTC (permalink / raw)
To: Suanming Mou, Aman Singh, Yuying Zhang; +Cc: dev
On 10/11/2023 12:30 PM, Suanming Mou wrote:
> This commit adds the missing modify_field action description to
> `testpmd_funcs.rst`.
>
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
>
For series,
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-12 14:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08 8:37 [PATCH] ethdev: add TCP/IP modify field IDs Suanming Mou
2023-09-08 3:49 ` [PATCH v2] " Suanming Mou
2023-10-10 10:24 ` Ferruh Yigit
2023-10-11 0:11 ` Suanming Mou
2023-10-11 8:58 ` Suanming Mou
2023-10-11 11:30 ` [PATCH v3 1/2] doc: add modify_field action description Suanming Mou
2023-10-11 11:30 ` [PATCH v3 2/2] ethdev: add TCP/IP modify field IDs Suanming Mou
2023-10-12 14:17 ` [PATCH v3 1/2] doc: add modify_field action description Ferruh Yigit
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).