[dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Tue Apr 16 16:36:25 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

Kevin Traynor

---
>From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon at netronome.com>
Date: Fri, 8 Mar 2019 15:40:47 +0000
Subject: [PATCH] net/nfp: fix setting MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]

Some firmwares, mostly for VFs, do not advertise the feature /
capability of changing the MAC address while the interface is up. With
such firmware a request to change the MAC address that at the same
time also tries to enable the not available feature will be denied by
the firmware resulting in an error message like:

nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800

Fix set_mac_addr by not trying to enable a feature if it is not
advertised by the firmware.

Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")

Signed-off-by: Pablo Cascón <pablo.cascon at netronome.com>
Acked-by: Alejandro Lucero <alejandro.lucero at netronome.com>
---
 drivers/net/nfp/nfp_net.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 54c6da924..278e154cd 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 	/* Signal the NIC about the change */
 	update = NFP_NET_CFG_UPDATE_MACADDR;
-	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
+	ctrl = hw->ctrl;
+	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
+	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
+		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
 	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
 		PMD_INIT_LOG(INFO, "MAC address update failed");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.521984688 +0100
+++ 0007-net-nfp-fix-setting-MAC-address.patch	2019-04-16 15:34:25.112181459 +0100
@@ -1,4 +1,4 @@
-From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
+From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon at netronome.com>
 Date: Fri, 8 Mar 2019 15:40:47 +0000
 Subject: [PATCH] net/nfp: fix setting MAC address
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
+
 Some firmwares, mostly for VFs, do not advertise the feature /
 capability of changing the MAC address while the interface is up. With
 such firmware a request to change the MAC address that at the same
@@ -18,7 +20,6 @@
 advertised by the firmware.
 
 Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
-Cc: stable at dpdk.org
 
 Signed-off-by: Pablo Cascón <pablo.cascon at netronome.com>
 Acked-by: Alejandro Lucero <alejandro.lucero at netronome.com>
@@ -27,10 +28,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index a791e95e2..1b7b6c2fd 100644
+index 54c6da924..278e154cd 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
-@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
  	/* Signal the NIC about the change */
  	update = NFP_NET_CFG_UPDATE_MACADDR;
 -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;


More information about the stable mailing list