From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3B621A00E6 for ; Tue, 16 Apr 2019 16:37:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32DE61B4DF; Tue, 16 Apr 2019 16:37:46 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id CB7121B4DF for ; Tue, 16 Apr 2019 16:37:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4029E307D857; Tue, 16 Apr 2019 14:37:44 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57AC71001E95; Tue, 16 Apr 2019 14:37:43 +0000 (UTC) From: Kevin Traynor To: =?UTF-8?q?Pablo=20Casc=C3=B3n?= Cc: Alejandro Lucero , dpdk stable Date: Tue, 16 Apr 2019 15:36:25 +0100 Message-Id: <20190416143719.21601-7-ktraynor@redhat.com> In-Reply-To: <20190416143719.21601-1-ktraynor@redhat.com> References: <20190416143719.21601-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 16 Apr 2019 14:37:44 +0000 (UTC) Subject: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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?= 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 Acked-by: Alejandro Lucero --- 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?= 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@dpdk.org Signed-off-by: Pablo Cascón Acked-by: Alejandro Lucero @@ -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;