patch 'net/nfp: remove duplicated check when setting MAC address' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:34:29 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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/26/22. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/23c2f685984482646e7abead5ea13ba099eec814

Thanks.

Kevin

---
>From 23c2f685984482646e7abead5ea13ba099eec814 Mon Sep 17 00:00:00 2001
From: Maxime Gouin <maxime.gouin at 6wind.com>
Date: Wed, 5 Jan 2022 11:32:02 +0100
Subject: [PATCH] net/nfp: remove duplicated check when setting MAC address

[ upstream commit 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf ]

Reported by code analysis tool C++test (version 10.4):

> /build/dpdk-20.11/drivers/net/nfp/nfp_net.c
> 546   Conditions "(hw->ctrl &NFP_NET_CFG_CTRL_ENABLE) &&
        !! (hw->cap &NFP_NET_CFG_C" is always evaluated to false
> 547   Condition "! (hw->cap &NFP_NET_CFG_C" is always evaluated to false

The previous "if" checks exactly the same condition. Removal of duplicate
code.

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

Signed-off-by: Maxime Gouin <maxime.gouin at 6wind.com>
Reviewed-by: Olivier Matz <olivier.matz at 6wind.com>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/nfp/nfp_common.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index f8978e803a..b26770dbfb 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -281,8 +281,4 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	}
 
-	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
-	    !(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
-		return -EBUSY;
-
 	/* Writing new MAC to the specific port BAR address */
 	nfp_net_write_mac(hw, (uint8_t *)mac_addr);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:46.378974795 +0000
+++ 0080-net-nfp-remove-duplicated-check-when-setting-MAC-add.patch	2022-02-21 15:22:44.172704308 +0000
@@ -1 +1 @@
-From 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf Mon Sep 17 00:00:00 2001
+From 23c2f685984482646e7abead5ea13ba099eec814 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list