DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix HWS support for item NSH
@ 2024-05-09 12:44 Gavin Li
  2024-05-13 13:02 ` Dariusz Sosnowski
  2024-05-20 10:53 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Gavin Li @ 2024-05-09 12:44 UTC (permalink / raw)
  To: matan, viacheslavo, orika, thomas, Dariusz Sosnowski,
	Suanming Mou, Itamar Gozlan
  Cc: dev, rasland, Bing Zhao

Allow item NSH in HWS and set item_flags.

Fixes: f6164649a8 ("net/mlx5/hws: support VXLAN-GPE matching")
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c |  3 +++
 drivers/net/mlx5/mlx5_flow_hw.c       | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index a0f95c6923..867393e282 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -3198,6 +3198,9 @@ mlx5dr_definer_conv_items_to_hl(struct mlx5dr_context *ctx,
 			item_flags |= MLX5_FLOW_ITEM_COMPARE;
 			matcher->flags |= MLX5DR_MATCHER_FLAGS_COMPARE;
 			break;
+		case RTE_FLOW_ITEM_TYPE_NSH:
+			item_flags |= MLX5_FLOW_ITEM_NSH;
+			break;
 		case RTE_FLOW_ITEM_TYPE_VOID:
 			break;
 		default:
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 9ebbe664d1..4587d04cb6 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7475,6 +7475,14 @@ flow_hw_validate_item_compare(const struct rte_flow_item *item,
 	return 0;
 }
 
+static inline int
+mlx5_hw_validate_item_nsh(struct rte_eth_dev *dev,
+			  const struct rte_flow_item *item,
+			  struct rte_flow_error *error)
+{
+	return mlx5_flow_validate_item_nsh(dev, item, error);
+}
+
 static int
 flow_hw_pattern_validate(struct rte_eth_dev *dev,
 			 const struct rte_flow_pattern_template_attr *attr,
@@ -7671,6 +7679,11 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
 			 * template and item spec in flow rule.
 			 */
 			break;
+		case RTE_FLOW_ITEM_TYPE_NSH:
+			ret = mlx5_hw_validate_item_nsh(dev, &items[i], error);
+			if (ret < 0)
+				return ret;
+			break;
 		case RTE_FLOW_ITEM_TYPE_END:
 			items_end = true;
 			break;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] net/mlx5: fix HWS support for item NSH
  2024-05-09 12:44 [PATCH] net/mlx5: fix HWS support for item NSH Gavin Li
@ 2024-05-13 13:02 ` Dariusz Sosnowski
  2024-05-20 10:53 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Dariusz Sosnowski @ 2024-05-13 13:02 UTC (permalink / raw)
  To: Minggang(Gavin) Li, Matan Azrad, Slava Ovsiienko, Ori Kam,
	NBU-Contact-Thomas Monjalon (EXTERNAL),
	Suanming Mou, Itamar Gozlan
  Cc: dev, Raslan Darawsheh, Bing Zhao

> -----Original Message-----
> From: Minggang(Gavin) Li <gavinl@nvidia.com>
> Sent: Thursday, May 9, 2024 14:45
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>;
> Itamar Gozlan <igozlan@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>; Bing Zhao
> <bingz@nvidia.com>
> Subject: [PATCH] net/mlx5: fix HWS support for item NSH
> 
> Allow item NSH in HWS and set item_flags.
> 
> Fixes: f6164649a8 ("net/mlx5/hws: support VXLAN-GPE matching")
> Signed-off-by: Gavin Li <gavinl@nvidia.com>
> Reviewed-by: Bing Zhao <bingz@nvidia.com>

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Best regards,
Dariusz Sosnowski

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5: fix HWS support for item NSH
  2024-05-09 12:44 [PATCH] net/mlx5: fix HWS support for item NSH Gavin Li
  2024-05-13 13:02 ` Dariusz Sosnowski
@ 2024-05-20 10:53 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2024-05-20 10:53 UTC (permalink / raw)
  To: Minggang(Gavin) Li, Matan Azrad, Slava Ovsiienko, Ori Kam,
	NBU-Contact-Thomas Monjalon (EXTERNAL),
	Dariusz Sosnowski, Suanming Mou, Itamar Gozlan
  Cc: dev, Bing Zhao

Hi,

From: Minggang(Gavin) Li <gavinl@nvidia.com>
Sent: Thursday, May 9, 2024 3:44 PM
To: Matan Azrad; Slava Ovsiienko; Ori Kam; NBU-Contact-Thomas Monjalon (EXTERNAL); Dariusz Sosnowski; Suanming Mou; Itamar Gozlan
Cc: dev@dpdk.org; Raslan Darawsheh; Bing Zhao
Subject: [PATCH] net/mlx5: fix HWS support for item NSH

Allow item NSH in HWS and set item_flags.

Fixes: f6164649a8 ("net/mlx5/hws: support VXLAN-GPE matching")
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
---

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-20 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 12:44 [PATCH] net/mlx5: fix HWS support for item NSH Gavin Li
2024-05-13 13:02 ` Dariusz Sosnowski
2024-05-20 10:53 ` 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).