[dpdk-stable] patch 'net/mlx5: fix shared RSS capability check' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 9 11:35:23 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/11/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39c65c5cb1567c287e46492ff4f978f401d63c54

Thanks.

Luca Boccassi

---
>From 39c65c5cb1567c287e46492ff4f978f401d63c54 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at nvidia.com>
Date: Wed, 3 Feb 2021 12:08:42 +0200
Subject: [PATCH] net/mlx5: fix shared RSS capability check

[ upstream commit ae8fdc8067c77496bc07680d42f8aa7f6be34a5b ]

Existing code to create shared RSS action doesn't fully check
driver capabilities.
Using older driver, if DevX capabilities are insufficient,
the IBV operations are used.
In this case the ind_table_modify operation is not supported, and
shared RSS action can't be modified after creation.

This patch adds check of driver capability, and fails the validation
for shared RSS action in case it is insufficient.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

Signed-off-by: Dekel Peled <dekelp at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 481a3a7498..3fdc3ffe16 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11772,6 +11772,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "invalid shared action to update");
+	if (priv->obj_ops.ind_table_modify == NULL)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "cannot modify indirection table");
 	queue = mlx5_malloc(MLX5_MEM_ZERO,
 			    RTE_ALIGN_CEIL(queue_size, sizeof(void *)),
 			    0, SOCKET_ID_ANY);
@@ -12654,6 +12658,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
 	RTE_SET_USED(conf);
 	switch (action->type) {
 	case RTE_FLOW_ACTION_TYPE_RSS:
+		/*
+		 * priv->obj_ops is set according to driver capabilities.
+		 * When DevX capabilities are
+		 * sufficient, it is set to devx_obj_ops.
+		 * Otherwise, it is set to ibv_obj_ops.
+		 * ibv_obj_ops doesn't support ind_table_modify operation.
+		 * In this case the shared RSS action can't be used.
+		 */
+		if (priv->obj_ops.ind_table_modify == NULL)
+			return rte_flow_error_set
+					(err, ENOTSUP,
+					 RTE_FLOW_ERROR_TYPE_ACTION,
+					 NULL,
+					 "shared RSS action not supported");
 		return mlx5_validate_action_rss(dev, action, err);
 	case RTE_FLOW_ACTION_TYPE_AGE:
 		if (!priv->sh->aso_age_mng)
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-09 10:34:58.928002018 +0000
+++ 0025-net-mlx5-fix-shared-RSS-capability-check.patch	2021-02-09 10:34:57.938584546 +0000
@@ -1 +1 @@
-From ae8fdc8067c77496bc07680d42f8aa7f6be34a5b Mon Sep 17 00:00:00 2001
+From 39c65c5cb1567c287e46492ff4f978f401d63c54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae8fdc8067c77496bc07680d42f8aa7f6be34a5b ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index d162cf0999..76696b7b62 100644
+index 481a3a7498..3fdc3ffe16 100644
@@ -29 +30 @@
-@@ -13000,6 +13000,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11772,6 +11772,10 @@ __flow_dv_action_rss_update(struct rte_eth_dev *dev, uint32_t idx,
@@ -40 +41 @@
-@@ -13882,6 +13886,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,
+@@ -12654,6 +12658,20 @@ flow_dv_action_validate(struct rte_eth_dev *dev,


More information about the stable mailing list