Skip to contentSkip to conversation

Patch "IB/opa_vnic: Properly return the total MACs in UC MAC list" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 20, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/opa_vnic: Properly return the total MACs in UC MAC list

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-opa_vnic-properly-return-the-total-macs-in-uc-mac-list.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 20 18:17:52 CET 2017

From: Niranjana Vishwanathapura <[email protected]>
Date: Tue, 26 Sep 2017 06:44:07 -0700
Subject: IB/opa_vnic: Properly return the total MACs in UC MAC list

From: Niranjana Vishwanathapura <[email protected]>

[ Upstream commit b77eb45e0d9c324245d165656ab3b38b6f386436 ]

Do not include EM specified MAC address in total MACs of the UC MAC list.

---
 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c +5 -3
@@ -348,7 +348,7 @@ void opa_vnic_query_mcast_macs(struct op
 void opa_vnic_query_ucast_macs(struct opa_vnic_adapter *adapter,
 			       struct opa_veswport_iface_macs *macs)
 {
-	u16 start_idx, tot_macs, num_macs, idx = 0, count = 0;
+	u16 start_idx, tot_macs, num_macs, idx = 0, count = 0, em_macs = 0;
 	struct netdev_hw_addr *ha;
 
 	start_idx = be16_to_cpu(macs->start_idx);
@@ -359,8 +359,10 @@ void opa_vnic_query_ucast_macs(struct op
 
 		/* Do not include EM specified MAC address */
 		if (!memcmp(adapter->info.vport.base_mac_addr, ha->addr,
-			    ARRAY_SIZE(adapter->info.vport.base_mac_addr)))
+			    ARRAY_SIZE(adapter->info.vport.base_mac_addr))) {
+			em_macs++;
 			continue;
+		}
 
 		if (start_idx > idx++)
 			continue;
@@ -383,7 +385,7 @@ void opa_vnic_query_ucast_macs(struct op
 	}
 
 	tot_macs = netdev_hw_addr_list_count(&adapter->netdev->dev_addrs) +
-		   netdev_uc_count(adapter->netdev);
+		   netdev_uc_count(adapter->netdev) - em_macs;
 	macs->tot_macs_in_lst = cpu_to_be16(tot_macs);
 	macs->num_macs_in_msg = cpu_to_be16(count);
 	macs->gen_count = cpu_to_be16(adapter->info.vport.uc_macs_gen_count);

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/ib-opa_vnic-properly-clear-mac-table-digest.patch queue-4.14/ib-opa_vnic-properly-return-the-total-macs-in-uc-mac-list.patch