Skip to contentSkip to conversation

iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test

PATCH In review Corinna Vinschen 5 participants 8 messages Apr 21 – May 11

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")
---
 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +5 -7
index a52c100dcbc5..9b8e7e4376c2 100644
@@ -2579,13 +2579,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
 	case VIRTCHNL_OP_ADD_ETH_ADDR:
 		if (!v_retval)
 			iavf_mac_add_ok(adapter);
-		if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr))
-			if (!ether_addr_equal(netdev->dev_addr,
-					      adapter->hw.mac.addr)) {
-				netif_addr_lock_bh(netdev);
-				eth_hw_addr_set(netdev, adapter->hw.mac.addr);
-				netif_addr_unlock_bh(netdev);
-			}
+		if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) {
+			netif_addr_lock_bh(netdev);
+			eth_hw_addr_set(netdev, adapter->hw.mac.addr);
+			netif_addr_unlock_bh(netdev);
+		}
 		wake_up(&adapter->vc_waitqueue);
 		break;
 	case VIRTCHNL_OP_GET_STATS: {
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Corinna Vinschen
Sent: Tuesday, April 21, 2026 12:00 PM
To: [email protected]; [email protected]
Cc: Vinschen, Corinna <[email protected]>; Jose Ignacio Tornos Martinez <[email protected]>
Subject: [Intel-wired-lan] [PATCH net] iavf: iavf_virtchnl_completion:
drop duplicate ether_addr_equal() test

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Quoted 7 lines

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b
("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set

mac")

I think Cc: [email protected] should be added.

Quoted 34 lines
---
 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +1 -7
index a52c100dcbc5..9b8e7e4376c2 100644
@@ -2579,13 +2579,11 @@ void iavf_virtchnl_completion(struct
 iavf_adapter *adapter,
 	case VIRTCHNL_OP_ADD_ETH_ADDR:
 		if (!v_retval)
 			iavf_mac_add_ok(adapter);
-		if (!ether_addr_equal(netdev->dev_addr, adapter-
 >hw.mac.addr))
-			if (!ether_addr_equal(netdev->dev_addr,
-					      adapter->hw.mac.addr)) {
-				netif_addr_lock_bh(netdev);
-				eth_hw_addr_set(netdev, adapter-
 >hw.mac.addr);
-				netif_addr_unlock_bh(netdev);
-			}
+		if (!ether_addr_equal(netdev->dev_addr, adapter-
Quoted 1 line

hw.mac.addr)) {

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +4 -1
+			netif_addr_lock_bh(netdev);
+			eth_hw_addr_set(netdev, adapter->hw.mac.addr);
+			netif_addr_unlock_bh(netdev);
+		}
 		wake_up(&adapter->vc_waitqueue);
 		break;
 	case VIRTCHNL_OP_GET_STATS: {
--

2.53.0

#2 lore raw

PATCH 1/1 iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")

---
Added CC: [email protected]

 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +5 -7
index a52c100dcbc5..9b8e7e4376c2 100644
@@ -2579,13 +2579,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
 	case VIRTCHNL_OP_ADD_ETH_ADDR:
 		if (!v_retval)
 			iavf_mac_add_ok(adapter);
-		if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr))
-			if (!ether_addr_equal(netdev->dev_addr,
-					      adapter->hw.mac.addr)) {
-				netif_addr_lock_bh(netdev);
-				eth_hw_addr_set(netdev, adapter->hw.mac.addr);
-				netif_addr_unlock_bh(netdev);
-			}
+		if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) {
+			netif_addr_lock_bh(netdev);
+			eth_hw_addr_set(netdev, adapter->hw.mac.addr);
+			netif_addr_unlock_bh(netdev);
+		}
 		wake_up(&adapter->vc_waitqueue);
 		break;
 	case VIRTCHNL_OP_GET_STATS: {
Signature · 1 line
2.53.0
reviewer
#3 lore raw
Quoted 5 lines · Corinna Vinschen

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Quoted 8 lines

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")

---
Added CC: [email protected]

Hi,

This feels more like a cleanup for net-next (without a Fixes tag) than a fix for net. I'm missing where the bug is here.

#4 lore raw
Quoted 15 lines · Simon Horman
Quoted 5 lines · Corinna Vinschen

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Quoted 8 lines

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")

---
Added CC: [email protected]

Quoted 4 lines

Hi,

This feels more like a cleanup for net-next (without a Fixes tag) than a fix for net. I'm missing where the bug is here.

Yeah, it's not a bug, the "Fixes" tag was just supposed to point out the patch introducing the duplicate test.

Shall I create a v3 or is it ok as is and just goes to net-next instead of net?

Thanks,
Corinna

#5 lore raw
Quoted 24 lines · Corinna Vinschen
Quoted 15 lines · Simon Horman
Quoted 5 lines · Corinna Vinschen

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Quoted 8 lines

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")

---
Added CC: [email protected]

Quoted 4 lines

Hi,

This feels more like a cleanup for net-next (without a Fixes tag) than a fix for net. I'm missing where the bug is here.

Yeah, it's not a bug, the "Fixes" tag was just supposed to point out the patch introducing the duplicate test.

Quoted 7 lines

Shall I create a v3 or is it ok as is and just goes to net-next instead of net?

Thanks,
Corinna

I can make a note for later and either myself or Tony can forward it net-next as part of an Intel Wired LAN update when the merge window re-opens and any testing has completed. (Not that there is much needing to be tested in this patches case)

Thanks,
Jake

#6 lore raw
Quoted 29 lines · Jacob Keller
Quoted 28 lines · Corinna Vinschen
Quoted 15 lines · Simon Horman
Quoted 5 lines · Corinna Vinschen

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Quoted 8 lines

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")

Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in set mac")

---
Added CC: [email protected]

Quoted 4 lines

Hi,

This feels more like a cleanup for net-next (without a Fixes tag) than a fix for net. I'm missing where the bug is here.

Yeah, it's not a bug, the "Fixes" tag was just supposed to point out the patch introducing the duplicate test.

Shall I create a v3 or is it ok as is and just goes to net-next instead of net?

Quoted 8 lines
Quoted 3 lines

Thanks,
Corinna

I can make a note for later and either myself or Tony can forward it net-next as part of an Intel Wired LAN update when the merge window re-opens and any testing has completed. (Not that there is much needing to be tested in this patches case)

That's nice, thank you!

Corinna

#7 lore raw
Quoted 53 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Corinna Vinschen
Sent: Monday, April 27, 2026 5:58 PM
To: Keller, Jacob E <[email protected]>
Cc: Simon Horman <[email protected]>; [email protected]; [email protected]; Jose Ignacio Tornos Martinez <[email protected]>; [email protected]; Vinschen, Corinna <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH net] iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test

Quoted 32 lines · Jacob Keller
Quoted 31 lines · Corinna Vinschen
Quoted 18 lines · Simon Horman
Quoted 10 lines · Corinna Vinschen

This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf:
Add waiting for response from PF in set mac") introduced a duplicate
ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC.

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b
("iavf: fix MAC address setting for VFs when filter is rejected")

Quoted 6 lines
Fixes 35a2443d0910f ("iavf: Add waiting for response from PF in

set mac")

---
Added CC: [email protected]

Quoted 4 lines

Hi,

This feels more like a cleanup for net-next (without a Fixes tag) than a fix for net. I'm missing where the bug is here.

Yeah, it's not a bug, the "Fixes" tag was just supposed to point out the patch introducing the duplicate test.

Shall I create a v3 or is it ok as is and just goes to net-next instead of net?

Quoted 8 lines
Quoted 3 lines

Thanks,
Corinna

I can make a note for later and either myself or Tony can forward it net-next as part of an Intel Wired LAN update when the merge window re-opens and any testing has completed. (Not that there is much needing to be tested in this patches case)

Quoted 4 lines

That's nice, thank you!

Corinna