hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/net/bonding.h
....@@ -216,6 +216,7 @@
216216 struct bond_up_slave __rcu *usable_slaves;
217217 struct bond_up_slave __rcu *all_slaves;
218218 bool force_primary;
219
+ bool notifier_ctx;
219220 s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
220221 int (*recv_probe)(const struct sk_buff *, struct bonding *,
221222 struct slave *);
....@@ -697,37 +698,14 @@
697698 }
698699
699700 /* Caller must hold rcu_read_lock() for read */
700
-static inline struct slave *bond_slave_has_mac_rcu(struct bonding *bond,
701
- const u8 *mac)
701
+static inline bool bond_slave_has_mac_rcu(struct bonding *bond, const u8 *mac)
702702 {
703703 struct list_head *iter;
704704 struct slave *tmp;
705705
706706 bond_for_each_slave_rcu(bond, tmp, iter)
707707 if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
708
- return tmp;
709
-
710
- return NULL;
711
-}
712
-
713
-/* Caller must hold rcu_read_lock() for read */
714
-static inline bool bond_slave_has_mac_rx(struct bonding *bond, const u8 *mac)
715
-{
716
- struct list_head *iter;
717
- struct slave *tmp;
718
- struct netdev_hw_addr *ha;
719
-
720
- bond_for_each_slave_rcu(bond, tmp, iter)
721
- if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
722708 return true;
723
-
724
- if (netdev_uc_empty(bond->dev))
725
- return false;
726
-
727
- netdev_for_each_uc_addr(ha, bond->dev)
728
- if (ether_addr_equal_64bits(mac, ha->addr))
729
- return true;
730
-
731709 return false;
732710 }
733711