[dpdk-stable] patch 'net/mlx5: fix hairpin dependency on destination DevX TIR' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:19 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. 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.

Thanks.

Luca Boccassi

---
>From d2204df770ea31cff576e14adc811f5affc58452 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at nvidia.com>
Date: Sun, 13 Sep 2020 19:05:22 +0000
Subject: [PATCH] net/mlx5: fix hairpin dependency on destination DevX TIR

[ upstream commit b00f760354db0fd09f58bf6fb59972d50e772676 ]

The PMD supports hairpin only if DevX is supported and DV flow is
enabled.

When destination DevX TIR is not supported, the PMD tries to create TIR
action, and fails.

Avoid supporting hairpin when destination DevX TIR is not supported.

Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities")

Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 3b1f18b3f3..92773dca28 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1946,12 +1946,13 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
  * @return
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
-int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
-			 struct rte_eth_hairpin_cap *cap)
+int
+mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_dev_config *config = &priv->config;
 
-	if (priv->sh->devx == 0) {
+	if (!priv->sh->devx || !config->dest_tir || !config->dv_flow_en) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.042119654 +0000
+++ 0040-net-mlx5-fix-hairpin-dependency-on-destination-DevX-.patch	2020-10-28 10:35:11.496829906 +0000
@@ -1,8 +1,10 @@
-From b00f760354db0fd09f58bf6fb59972d50e772676 Mon Sep 17 00:00:00 2001
+From d2204df770ea31cff576e14adc811f5affc58452 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba at nvidia.com>
 Date: Sun, 13 Sep 2020 19:05:22 +0000
 Subject: [PATCH] net/mlx5: fix hairpin dependency on destination DevX TIR
 
+[ upstream commit b00f760354db0fd09f58bf6fb59972d50e772676 ]
+
 The PMD supports hairpin only if DevX is supported and DV flow is
 enabled.
 
@@ -12,24 +14,24 @@
 Avoid supporting hairpin when destination DevX TIR is not supported.
 
 Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities")
-Cc: stable at dpdk.org
 
 Signed-off-by: Michael Baum <michaelba at nvidia.com>
 Acked-by: Matan Azrad <matan at nvidia.com>
 ---
- drivers/net/mlx5/mlx5_ethdev.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/mlx5/mlx5_ethdev.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
-index cefb45064e..a7924b103c 100644
+index 3b1f18b3f3..92773dca28 100644
 --- a/drivers/net/mlx5/mlx5_ethdev.c
 +++ b/drivers/net/mlx5/mlx5_ethdev.c
-@@ -569,12 +569,12 @@ mlx5_dev_to_eswitch_info(struct rte_eth_dev *dev)
+@@ -1946,12 +1946,13 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+  * @return
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
- int
--mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
+-int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
 -			 struct rte_eth_hairpin_cap *cap)
++int
 +mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
  {
  	struct mlx5_priv *priv = dev->data->dev_private;


More information about the stable mailing list