Skip to contentSkip to conversation

net/mlx5: support ESP item in Verbs interface

PATCH In review Maayan Kashani 2 participants 3 messages Jan 4, 2023 – Jan 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: support ESP item in Verbs interface

ESP item is not currently supported in Verbs interface.

Validate/translate ESP item in Verbs interface.

---
 doc/guides/nics/mlx5.rst                |  3 ++
 drivers/common/mlx5/linux/meson.build   |  2 +
 drivers/net/mlx5/mlx5_flow_verbs.c      | 57 +++++++++++++++++++++++++
 drivers/net/mlx5/windows/mlx5_flow_os.c |  9 +++-
 4 files changed, 69 insertions(+), 2 deletions(-)
doc/guides/nics/mlx5.rst +3 -0
index 51f51259e3..f137f156f9 100644
@@ -599,6 +599,9 @@ Limitations
 
 - The NIC egress flow rules on representor port are not supported.
 
+- When using DV/verbs flow engine (``dv_flow_en`` = 1/0 respectively), Match on SPI field
+  in ESP header for group 0 needs MLNX_OFED 5.6+.
+
 
 Statistics
 ----------
drivers/common/mlx5/linux/meson.build +2 -0
index 7e1575efc8..96a6c6c9be 100644
@@ -81,6 +81,8 @@ has_member_args = [
 # [ "MACRO to define if found", "header for the search",
 #   "symbol to search" ]
 has_sym_args = [
+        [ 'HAVE_IBV_FLOW_SPEC_ESP', 'infiniband/verbs.h',
+            'IBV_FLOW_SPEC_ESP' ],
         [ 'HAVE_IBV_RX_HASH_IPSEC_SPI', 'infiniband/verbs.h',
             'IBV_RX_HASH_IPSEC_SPI' ],
         [ 'HAVE_IBV_RELAXED_ORDERING', 'infiniband/verbs.h',
drivers/net/mlx5/mlx5_flow_verbs.c +57 -0

81 lines not on this page · raw message

drivers/net/mlx5/windows/mlx5_flow_os.c +7 -2
index 5013e9f012..b9c767ee14 100644
@@ -419,8 +419,8 @@ mlx5_flow_os_set_specific_workspace(struct mlx5_flow_workspace *data)
 
 int
 mlx5_flow_os_validate_item_esp(const struct rte_flow_item *item,
-			    uint64_t item_flags,
-			    uint8_t target_protocol,
+			    uint64_t item_flags __rte_unused,
+			    uint8_t target_protocol __rte_unused,
 			    struct rte_flow_error *error)
 {
 	const struct rte_flow_item_esp *mask = item->mask;
@@ -432,6 +432,11 @@ mlx5_flow_os_validate_item_esp(const struct rte_flow_item *item,
 				      MLX5_FLOW_LAYER_OUTER_L4;
 	int ret;
 
+#ifndef HAVE_IBV_FLOW_SPEC_ESP
+	return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "ESP item not supported");
+#endif
 	if (!(item_flags & l3m))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
Signature · 1 line
2.21.0
#1 lore raw

Hi,

Quoted 9 lines

-----Original Message-----
From: Maayan Kashani <[email protected]>
Sent: Wednesday, January 4, 2023 1:59 PM
To: [email protected]
Cc: Maayan Kashani <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: [PATCH] net/mlx5: support ESP item in Verbs interface

Quoted 6 lines

ESP item is not currently supported in Verbs interface.

Validate/translate ESP item in Verbs interface.

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

#2 lore raw

Got it, thanks!

Regards,
Maayan Kashani

Quoted 30 lines

-----Original Message-----
From: Raslan Darawsheh <[email protected]>
Sent: Wednesday, 11 January 2023 9:32
To: Maayan Kashani <[email protected]>; [email protected]
Cc: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: RE: [PATCH] net/mlx5: support ESP item in Verbs interface

Hi,

Quoted 9 lines

-----Original Message-----
From: Maayan Kashani <[email protected]>
Sent: Wednesday, January 4, 2023 1:59 PM
To: [email protected]
Cc: Maayan Kashani <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: [PATCH] net/mlx5: support ESP item in Verbs interface

Quoted 6 lines

ESP item is not currently supported in Verbs interface.

Validate/translate ESP item in Verbs interface.

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh