[dpdk-stable] patch 'net/mlx5: fix metadata item endianness conversion' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:48 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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/13/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 cbc1f8d1408a58b1b1fc89ba82c7e2bbc94ab9a9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
Date: Fri, 17 Jan 2020 14:59:32 +0000
Subject: [PATCH] net/mlx5: fix metadata item endianness conversion

[ upstream commit 39c09c22e5b5c46cf8f44826a1c759e036f3af3a ]

The mlx5 datapath does not implement any endianness conversions
for the metadata being sent and received to provide the better
performance (because these conversions would be performed for
each packet). These metadata are also involved into flow processing
(there might be some flows matching on metadata patterns or setting
the new metadata values) inside the NIC. It order to configure
hardware in correct way all necessary endianness conversions are
done by rte_flow handling code (only once on flow creation). This
patch fixes one of these conversions for the little-endian hosts
in case if META/MARK items are less than 32 bits.

Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index c9bb76a8fc..8f77909419 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5909,8 +5909,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
 			struct mlx5_priv *priv = dev->data->dev_private;
 			uint32_t msk_c0 = priv->sh->dv_regc0_mask;
 			uint32_t shl_c0 = rte_bsf32(msk_c0);
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+			uint32_t shr_c0 = __builtin_clz(priv->sh->dv_meta_mask);
 
-			msk_c0 = rte_cpu_to_be_32(msk_c0);
+			value >>= shr_c0;
+			mask >>= shr_c0;
+#endif
 			value <<= shl_c0;
 			mask <<= shl_c0;
 			assert(msk_c0);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:42.406568083 +0000
+++ 0102-net-mlx5-fix-metadata-item-endianness-conversion.patch	2020-02-11 11:17:38.572004563 +0000
@@ -1,8 +1,10 @@
-From 39c09c22e5b5c46cf8f44826a1c759e036f3af3a Mon Sep 17 00:00:00 2001
+From cbc1f8d1408a58b1b1fc89ba82c7e2bbc94ab9a9 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
 Date: Fri, 17 Jan 2020 14:59:32 +0000
 Subject: [PATCH] net/mlx5: fix metadata item endianness conversion
 
+[ upstream commit 39c09c22e5b5c46cf8f44826a1c759e036f3af3a ]
+
 The mlx5 datapath does not implement any endianness conversions
 for the metadata being sent and received to provide the better
 performance (because these conversions would be performed for
@@ -15,7 +17,6 @@
 in case if META/MARK items are less than 32 bits.
 
 Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")
-Cc: stable at dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -24,10 +25,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index da988f9dd7..c02517aaf3 100644
+index c9bb76a8fc..8f77909419 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -6081,8 +6081,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
+@@ -5909,8 +5909,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
  			struct mlx5_priv *priv = dev->data->dev_private;
  			uint32_t msk_c0 = priv->sh->dv_regc0_mask;
  			uint32_t shl_c0 = rte_bsf32(msk_c0);


More information about the stable mailing list