* [PATCH] net/mlx5: fix ESP item validation in Verbs interface
@ 2023-02-05 15:39 Maayan Kashani
2023-02-26 11:08 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Maayan Kashani @ 2023-02-05 15:39 UTC (permalink / raw)
To: dev; +Cc: mkashani, matan, rasland, stable, Viacheslav Ovsiienko
while added ESP item support in Verbs interface,
mlx5_flow_os_validate_item_esp routine in windows/mlx5_flow_os.c was
changed. all changes should be in mlx5_flow_verbs.c only.
If ESP is not supported in verbs, return default "Item not supported
error" during item validation stage.
Also, updated mlx5.rst file regarding ESP SPI match support following
further debug.
Fixes: c1d039e ("net/mlx5: support ESP item in Verbs interface")
Cc: stable@dpdk.org
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
doc/guides/nics/mlx5.rst | 4 ++--
drivers/net/mlx5/mlx5_flow_verbs.c | 2 ++
drivers/net/mlx5/windows/mlx5_flow_os.c | 9 ++-------
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index f137f156f9..772dfa58ef 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -599,8 +599,8 @@ 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+.
+- When using DV/verbs flow engine (``dv_flow_en`` = 1/0 respectively),
+ Match on SPI field in ESP header for group 0 is supported from connectX-7.
Statistics
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 46a6c8e16f..99c60c2096 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1330,6 +1330,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
int ret = 0;
switch (items->type) {
+#ifdef HAVE_IBV_FLOW_SPEC_ESP
case RTE_FLOW_ITEM_TYPE_ESP:
ret = mlx5_flow_os_validate_item_esp(items, item_flags,
next_protocol,
@@ -1338,6 +1339,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
return ret;
last_item = MLX5_FLOW_ITEM_ESP;
break;
+#endif
case RTE_FLOW_ITEM_TYPE_VOID:
break;
case RTE_FLOW_ITEM_TYPE_ETH:
diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.c b/drivers/net/mlx5/windows/mlx5_flow_os.c
index b9c767ee14..5013e9f012 100644
--- a/drivers/net/mlx5/windows/mlx5_flow_os.c
+++ b/drivers/net/mlx5/windows/mlx5_flow_os.c
@@ -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 __rte_unused,
- uint8_t target_protocol __rte_unused,
+ uint64_t item_flags,
+ uint8_t target_protocol,
struct rte_flow_error *error)
{
const struct rte_flow_item_esp *mask = item->mask;
@@ -432,11 +432,6 @@ 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,
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] net/mlx5: fix ESP item validation in Verbs interface
2023-02-05 15:39 [PATCH] net/mlx5: fix ESP item validation in Verbs interface Maayan Kashani
@ 2023-02-26 11:08 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2023-02-26 11:08 UTC (permalink / raw)
To: Maayan Kashani, dev; +Cc: Matan Azrad, stable, Slava Ovsiienko
Hi,
> -----Original Message-----
> From: Maayan Kashani <mkashani@nvidia.com>
> Sent: Sunday, February 5, 2023 5:40 PM
> To: dev@dpdk.org
> Cc: Maayan Kashani <mkashani@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] net/mlx5: fix ESP item validation in Verbs interface
>
> while added ESP item support in Verbs interface,
> mlx5_flow_os_validate_item_esp routine in windows/mlx5_flow_os.c was
> changed. all changes should be in mlx5_flow_verbs.c only.
>
> If ESP is not supported in verbs, return default "Item not supported
> error" during item validation stage.
> Also, updated mlx5.rst file regarding ESP SPI match support following
> further debug.
>
> Fixes: c1d039e ("net/mlx5: support ESP item in Verbs interface")
> Cc: stable@dpdk.org
>
> Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-26 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05 15:39 [PATCH] net/mlx5: fix ESP item validation in Verbs interface Maayan Kashani
2023-02-26 11:08 ` Raslan Darawsheh
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).