[v2,1/1] ethdev: add IPv6 FL and TC field identifiers

Message ID 20240207155128.1581670-2-michaelba@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series ethdev: add IPv6 field identifiers |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation warning apply patch failure
ci/Intel-compilation warning apply issues
ci/iol-testing warning apply patch failure

Commit Message

Michael Baum Feb. 7, 2024, 3:51 p.m. UTC
  Add new "rte_flow_field_id" enumeration values to describe both IPv6
traffic class and IPv6 flow label fields.

The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
"ipv6_traffic_class" in testpmd command.
The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
"ipv6_flow_label" in testpmd command.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 app/test-pmd/cmdline_flow.c            | 1 +
 doc/guides/rel_notes/release_24_03.rst | 2 ++
 lib/ethdev/rte_flow.h                  | 4 +++-
 3 files changed, 6 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit Feb. 8, 2024, 10:37 p.m. UTC | #1
On 2/7/2024 3:51 PM, Michael Baum wrote:
> Add new "rte_flow_field_id" enumeration values to describe both IPv6
> traffic class and IPv6 flow label fields.
> 
> The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
> "ipv6_traffic_class" in testpmd command.
> The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
> "ipv6_flow_label" in testpmd command.
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> ---
>  app/test-pmd/cmdline_flow.c            | 1 +
>  doc/guides/rel_notes/release_24_03.rst | 2 ++
>  lib/ethdev/rte_flow.h                  | 4 +++-
>  3 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 102b4d67c9..ab8bece28e 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -992,6 +992,7 @@ static const char *const flow_field_ids[] = {
>  	"random",
>  	"ipv4_proto",
>  	"esp_spi", "esp_seq_num", "esp_proto",
> +	"ipv6_flow_label", "ipv6_traffic_class",
>  	NULL
>  };
>  
> diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst
> index 0909a2245d..f548eacc5e 100644
> --- a/doc/guides/rel_notes/release_24_03.rst
> +++ b/doc/guides/rel_notes/release_24_03.rst
> @@ -68,6 +68,8 @@ New Features
>    * Added ``RTE_FLOW_FIELD_ESP_SPI`` to represent it in field ID struct.
>    * Added ``RTE_FLOW_FIELD_ESP_SEQ_NUM`` to represent it in field ID struct.
>    * Added ``RTE_FLOW_FIELD_ESP_PROTO`` to represent it in field ID struct.
> +  * Added ``RTE_FLOW_FIELD_IPV6_FLOW_LABEL`` to represent it in field ID struct.
> +  * Added ``RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS`` to represent it in field ID struct.
>  

On which tree is this patch based on, I don't see above notes.
Can you please rebase on latest next-net?

>  * ** Support for getting the number of used descriptors of a Tx queue. **
>  
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index b8fc16b819..8b32a69d8d 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -2425,7 +2425,9 @@ enum rte_flow_field_id {
>  	RTE_FLOW_FIELD_IPV4_PROTO,	/**< IPv4 next protocol. */
>  	RTE_FLOW_FIELD_ESP_SPI,		/**< ESP SPI. */
>  	RTE_FLOW_FIELD_ESP_SEQ_NUM,	/**< ESP Sequence Number. */
> -	RTE_FLOW_FIELD_ESP_PROTO	/**< ESP next protocol value. */
> +	RTE_FLOW_FIELD_ESP_PROTO,	/**< ESP next protocol value. */
> +	RTE_FLOW_FIELD_IPV6_FLOW_LABEL,	/**< IPv6 flow label. */
> +	RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS/**< IPv6 traffic class. */
>  };
>  
>  /**
  
Michael Baum Feb. 11, 2024, 8:05 a.m. UTC | #2
On 2/9/2024 3:51 PM, Ferruh Yigit wrote:
> 
> On 2/8/2024 22:38 PM, Michael Baum wrote:
> > Add new "rte_flow_field_id" enumeration values to describe both IPv6
> > traffic class and IPv6 flow label fields.
> >
> > The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
> > "ipv6_traffic_class" in testpmd command.
> > The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
> > "ipv6_flow_label" in testpmd command.
> >
> > Signed-off-by: Michael Baum <michaelba@nvidia.com>
> > Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> > ---
> >  app/test-pmd/cmdline_flow.c            | 1 +
> >  doc/guides/rel_notes/release_24_03.rst | 2 ++
> >  lib/ethdev/rte_flow.h                  | 4 +++-
> >  3 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > index 102b4d67c9..ab8bece28e 100644
> > --- a/app/test-pmd/cmdline_flow.c
> > +++ b/app/test-pmd/cmdline_flow.c
> > @@ -992,6 +992,7 @@ static const char *const flow_field_ids[] = {
> >       "random",
> >       "ipv4_proto",
> >       "esp_spi", "esp_seq_num", "esp_proto",
> > +     "ipv6_flow_label", "ipv6_traffic_class",
> >       NULL
> >  };
> >
> > diff --git a/doc/guides/rel_notes/release_24_03.rst
> > b/doc/guides/rel_notes/release_24_03.rst
> > index 0909a2245d..f548eacc5e 100644
> > --- a/doc/guides/rel_notes/release_24_03.rst
> > +++ b/doc/guides/rel_notes/release_24_03.rst
> > @@ -68,6 +68,8 @@ New Features
> >    * Added ``RTE_FLOW_FIELD_ESP_SPI`` to represent it in field ID struct.
> >    * Added ``RTE_FLOW_FIELD_ESP_SEQ_NUM`` to represent it in field ID
> struct.
> >    * Added ``RTE_FLOW_FIELD_ESP_PROTO`` to represent it in field ID struct.
> > +  * Added ``RTE_FLOW_FIELD_IPV6_FLOW_LABEL`` to represent it in field ID
> struct.
> > +  * Added ``RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS`` to represent it in field
> ID struct.
> >
> 
> On which tree is this patch based on, I don't see above notes.

I added in the cover letter this dependency:
Depends-on: series-31008 ("ethdev: add modify IPv4 next protocol field")
But it has new version now:
https://patchwork.dpdk.org/project/dpdk/list/?series=31037

> Can you please rebase on latest next-net?

Do you prefer me to send a new version without dependency?

> 
> >  * ** Support for getting the number of used descriptors of a Tx
> > queue. **
> >
> > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index
> > b8fc16b819..8b32a69d8d 100644
> > --- a/lib/ethdev/rte_flow.h
> > +++ b/lib/ethdev/rte_flow.h
> > @@ -2425,7 +2425,9 @@ enum rte_flow_field_id {
> >       RTE_FLOW_FIELD_IPV4_PROTO,      /**< IPv4 next protocol. */
> >       RTE_FLOW_FIELD_ESP_SPI,         /**< ESP SPI. */
> >       RTE_FLOW_FIELD_ESP_SEQ_NUM,     /**< ESP Sequence Number. */
> > -     RTE_FLOW_FIELD_ESP_PROTO        /**< ESP next protocol value. */
> > +     RTE_FLOW_FIELD_ESP_PROTO,       /**< ESP next protocol value. */
> > +     RTE_FLOW_FIELD_IPV6_FLOW_LABEL, /**< IPv6 flow label. */
> > +     RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS/**< IPv6 traffic class. */
> >  };
> >
> >  /**
  
Ferruh Yigit Feb. 12, 2024, 5:22 p.m. UTC | #3
On 2/11/2024 8:05 AM, Michael Baum wrote:
> On 2/9/2024 3:51 PM, Ferruh Yigit wrote:
>>
>> On 2/8/2024 22:38 PM, Michael Baum wrote:
>>> Add new "rte_flow_field_id" enumeration values to describe both IPv6
>>> traffic class and IPv6 flow label fields.
>>>
>>> The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
>>> "ipv6_traffic_class" in testpmd command.
>>> The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
>>> "ipv6_flow_label" in testpmd command.
>>>
>>> Signed-off-by: Michael Baum <michaelba@nvidia.com>
>>> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
>>> ---
>>>  app/test-pmd/cmdline_flow.c            | 1 +
>>>  doc/guides/rel_notes/release_24_03.rst | 2 ++
>>>  lib/ethdev/rte_flow.h                  | 4 +++-
>>>  3 files changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
>>> index 102b4d67c9..ab8bece28e 100644
>>> --- a/app/test-pmd/cmdline_flow.c
>>> +++ b/app/test-pmd/cmdline_flow.c
>>> @@ -992,6 +992,7 @@ static const char *const flow_field_ids[] = {
>>>       "random",
>>>       "ipv4_proto",
>>>       "esp_spi", "esp_seq_num", "esp_proto",
>>> +     "ipv6_flow_label", "ipv6_traffic_class",
>>>       NULL
>>>  };
>>>
>>> diff --git a/doc/guides/rel_notes/release_24_03.rst
>>> b/doc/guides/rel_notes/release_24_03.rst
>>> index 0909a2245d..f548eacc5e 100644
>>> --- a/doc/guides/rel_notes/release_24_03.rst
>>> +++ b/doc/guides/rel_notes/release_24_03.rst
>>> @@ -68,6 +68,8 @@ New Features
>>>    * Added ``RTE_FLOW_FIELD_ESP_SPI`` to represent it in field ID struct.
>>>    * Added ``RTE_FLOW_FIELD_ESP_SEQ_NUM`` to represent it in field ID
>> struct.
>>>    * Added ``RTE_FLOW_FIELD_ESP_PROTO`` to represent it in field ID struct.
>>> +  * Added ``RTE_FLOW_FIELD_IPV6_FLOW_LABEL`` to represent it in field ID
>> struct.
>>> +  * Added ``RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS`` to represent it in field
>> ID struct.
>>>
>>
>> On which tree is this patch based on, I don't see above notes.
> 
> I added in the cover letter this dependency:
> Depends-on: series-31008 ("ethdev: add modify IPv4 next protocol field")
> But it has new version now:
> https://patchwork.dpdk.org/project/dpdk/list/?series=31037
> 
>> Can you please rebase on latest next-net?
> 
> Do you prefer me to send a new version without dependency?
> 

Right, I missed the depends-on tag.

Dependent patch is delegated to Raslan, and this patch is straightforward.

Let me ack the patch and assign it to Raslan, assuming he is OK, he can
get this one after he merged the dependent patch.


@Raslan, please let me know if I am missing something.
  
Ferruh Yigit Feb. 12, 2024, 5:23 p.m. UTC | #4
On 2/7/2024 3:51 PM, Michael Baum wrote:
> Add new "rte_flow_field_id" enumeration values to describe both IPv6
> traffic class and IPv6 flow label fields.
> 
> The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
> "ipv6_traffic_class" in testpmd command.
> The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
> "ipv6_flow_label" in testpmd command.
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  
Raslan Darawsheh Feb. 14, 2024, 4:08 a.m. UTC | #5
HI,


> Add new "rte_flow_field_id" enumeration values to describe both IPv6
>traffic class and IPv6 flow label fields.
>
>The TC value is "RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS" in flow API and
>"ipv6_traffic_class" in testpmd command.
>The FL value is "RTE_FLOW_FIELD_IPV6_FLOW_LABEL" in flow API and
>"ipv6_flow_label" in testpmd command.

>Signed-off-by: Michael Baum <michaelba@nvidia.com>
>Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Patch applied to next-net-mlx,


Kindest regards,

Raslan Darawsheh
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 102b4d67c9..ab8bece28e 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -992,6 +992,7 @@  static const char *const flow_field_ids[] = {
 	"random",
 	"ipv4_proto",
 	"esp_spi", "esp_seq_num", "esp_proto",
+	"ipv6_flow_label", "ipv6_traffic_class",
 	NULL
 };
 
diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst
index 0909a2245d..f548eacc5e 100644
--- a/doc/guides/rel_notes/release_24_03.rst
+++ b/doc/guides/rel_notes/release_24_03.rst
@@ -68,6 +68,8 @@  New Features
   * Added ``RTE_FLOW_FIELD_ESP_SPI`` to represent it in field ID struct.
   * Added ``RTE_FLOW_FIELD_ESP_SEQ_NUM`` to represent it in field ID struct.
   * Added ``RTE_FLOW_FIELD_ESP_PROTO`` to represent it in field ID struct.
+  * Added ``RTE_FLOW_FIELD_IPV6_FLOW_LABEL`` to represent it in field ID struct.
+  * Added ``RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS`` to represent it in field ID struct.
 
 * ** Support for getting the number of used descriptors of a Tx queue. **
 
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b8fc16b819..8b32a69d8d 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2425,7 +2425,9 @@  enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_PROTO,	/**< IPv4 next protocol. */
 	RTE_FLOW_FIELD_ESP_SPI,		/**< ESP SPI. */
 	RTE_FLOW_FIELD_ESP_SEQ_NUM,	/**< ESP Sequence Number. */
-	RTE_FLOW_FIELD_ESP_PROTO	/**< ESP next protocol value. */
+	RTE_FLOW_FIELD_ESP_PROTO,	/**< ESP next protocol value. */
+	RTE_FLOW_FIELD_IPV6_FLOW_LABEL,	/**< IPv6 flow label. */
+	RTE_FLOW_FIELD_IPV6_TRAFFIC_CLASS/**< IPv6 traffic class. */
 };
 
 /**