[v3,4/6] ethdev: add modify action support for IPsec fields

Message ID 20240207122908.20646-4-viacheslavo@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series [v3,1/6] ethdev: add modify IPv4 next protocol field |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Slava Ovsiienko Feb. 7, 2024, 12:29 p.m. UTC
  The following IPsec related field definitions added:

 - RTE_FLOW_FIELD_ESP_SPI - SPI value in IPsec header
 - RTE_FLOW_FIELD_ESP_SEQ_NUM - sequence number in header
 - RTE_FLOW_FIELD_ESP_PROTO - next protocol value in trailer

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 doc/guides/rel_notes/release_24_03.rst | 3 +++
 lib/ethdev/rte_flow.h                  | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
  

Comments

Ori Kam Feb. 8, 2024, 4:07 p.m. UTC | #1
Hi Slava

> -----Original Message-----
> From: Slava Ovsiienko <viacheslavo@nvidia.com>
> Sent: Wednesday, February 7, 2024 2:29 PM
> 
> The following IPsec related field definitions added:
> 
>  - RTE_FLOW_FIELD_ESP_SPI - SPI value in IPsec header
>  - RTE_FLOW_FIELD_ESP_SEQ_NUM - sequence number in header
>  - RTE_FLOW_FIELD_ESP_PROTO - next protocol value in trailer
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> ---
>  doc/guides/rel_notes/release_24_03.rst | 3 +++
>  lib/ethdev/rte_flow.h                  | 5 ++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/rel_notes/release_24_03.rst
> b/doc/guides/rel_notes/release_24_03.rst
> index c9a4809254..d0c3389287 100644
> --- a/doc/guides/rel_notes/release_24_03.rst
> +++ b/doc/guides/rel_notes/release_24_03.rst
> @@ -68,6 +68,9 @@ New Features
>  * **Added new field IDs in the experimental ``enum rte_flow_field_id``:
> 
>    * Added ``RTE_FLOW_FIELD_IPV4_PROTO`` to represent it in field ID struct.
> +  * 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.
> 
>  * ** 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 9e76e53905..627a856537 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -2422,7 +2422,10 @@ enum rte_flow_field_id {
>  	RTE_FLOW_FIELD_IPV4_TOTAL_LEN,  /**< IPv4 total length. */
>  	RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN,/**< IPv6 payload length. */
>  	RTE_FLOW_FIELD_RANDOM,          /**< Random value. */
> -	RTE_FLOW_FIELD_IPV4_PROTO	/**< IPv4 next protocol. */
> +	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. */
>  };
> 
>  /**
> --
> 2.18.1

Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
  
Ferruh Yigit Feb. 12, 2024, 5:17 p.m. UTC | #2
On 2/7/2024 12:29 PM, Viacheslav Ovsiienko wrote:
> The following IPsec related field definitions added:
> 
>  - RTE_FLOW_FIELD_ESP_SPI - SPI value in IPsec header
>  - RTE_FLOW_FIELD_ESP_SEQ_NUM - sequence number in header
>  - RTE_FLOW_FIELD_ESP_PROTO - next protocol value in trailer
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  

Patch

diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst
index c9a4809254..d0c3389287 100644
--- a/doc/guides/rel_notes/release_24_03.rst
+++ b/doc/guides/rel_notes/release_24_03.rst
@@ -68,6 +68,9 @@  New Features
 * **Added new field IDs in the experimental ``enum rte_flow_field_id``:
 
   * Added ``RTE_FLOW_FIELD_IPV4_PROTO`` to represent it in field ID struct.
+  * 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.
 
 * ** 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 9e76e53905..627a856537 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -2422,7 +2422,10 @@  enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TOTAL_LEN,  /**< IPv4 total length. */
 	RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN,/**< IPv6 payload length. */
 	RTE_FLOW_FIELD_RANDOM,          /**< Random value. */
-	RTE_FLOW_FIELD_IPV4_PROTO	/**< IPv4 next protocol. */
+	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. */
 };
 
 /**