[dpdk-stable] patch 'net/mlx5: fix VF MAC address set over BlueField' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Aug 6 11:53:46 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/08/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 95eb85e2f49bfd05feff56ff9ab18bfbbe48ff49 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland at mellanox.com>
Date: Wed, 22 Jul 2020 12:07:55 +0300
Subject: [PATCH] net/mlx5: fix VF MAC address set over BlueField

[ upstream commit 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 ]

When trying to set MAC address of an ethernet device and if it was
a representor, PMD sets the MAC over the corresponding VF instead.

For the case of HPF (Host PF representor on BlueField), PMD shouldn't
attempt to set it, since it doesn't have any corresponding VF and fails.

This will fix the issue by setting the MAC on the dev directly.

Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host")

Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
---
 drivers/net/mlx5/mlx5_mac.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
index 7bdaa2a39..94f102d8a 100644
--- a/drivers/net/mlx5/mlx5_mac.c
+++ b/drivers/net/mlx5/mlx5_mac.c
@@ -200,8 +200,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	uint16_t port_id;
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	/* Configuring the VF instead of its representor. */
-	if (priv->representor) {
+	/*
+	 * Configuring the VF instead of its representor,
+	 * need to skip the special case of HPF on Bluefield.
+	 */
+	if (priv->representor && priv->representor_id >= 0) {
 		DRV_LOG(DEBUG, "VF represented by port %u setting primary MAC address",
 			dev->data->port_id);
 		RTE_ETH_FOREACH_DEV_SIBLING(port_id, dev->data->port_id) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.500060756 +0100
+++ 0018-net-mlx5-fix-VF-MAC-address-set-over-BlueField.patch	2020-08-06 10:53:15.764596689 +0100
@@ -1,8 +1,10 @@
-From 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 Mon Sep 17 00:00:00 2001
+From 95eb85e2f49bfd05feff56ff9ab18bfbbe48ff49 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland at mellanox.com>
 Date: Wed, 22 Jul 2020 12:07:55 +0300
 Subject: [PATCH] net/mlx5: fix VF MAC address set over BlueField
 
+[ upstream commit 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 ]
+
 When trying to set MAC address of an ethernet device and if it was
 a representor, PMD sets the MAC over the corresponding VF instead.
 
@@ -12,7 +14,6 @@
 This will fix the issue by setting the MAC on the dev directly.
 
 Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host")
-Cc: stable at dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
@@ -21,10 +22,10 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
-index 2d808d629..88c52b29f 100644
+index 7bdaa2a39..94f102d8a 100644
 --- a/drivers/net/mlx5/mlx5_mac.c
 +++ b/drivers/net/mlx5/mlx5_mac.c
-@@ -157,8 +157,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
+@@ -200,8 +200,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
  	uint16_t port_id;
  	struct mlx5_priv *priv = dev->data->dev_private;
  


More information about the stable mailing list