| .. | .. |
|---|
| 216 | 216 | struct bond_up_slave __rcu *usable_slaves; |
|---|
| 217 | 217 | struct bond_up_slave __rcu *all_slaves; |
|---|
| 218 | 218 | bool force_primary; |
|---|
| 219 | + bool notifier_ctx; |
|---|
| 219 | 220 | s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ |
|---|
| 220 | 221 | int (*recv_probe)(const struct sk_buff *, struct bonding *, |
|---|
| 221 | 222 | struct slave *); |
|---|
| .. | .. |
|---|
| 697 | 698 | } |
|---|
| 698 | 699 | |
|---|
| 699 | 700 | /* 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) |
|---|
| 702 | 702 | { |
|---|
| 703 | 703 | struct list_head *iter; |
|---|
| 704 | 704 | struct slave *tmp; |
|---|
| 705 | 705 | |
|---|
| 706 | 706 | bond_for_each_slave_rcu(bond, tmp, iter) |
|---|
| 707 | 707 | 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)) |
|---|
| 722 | 708 | 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 | | - |
|---|
| 731 | 709 | return false; |
|---|
| 732 | 710 | } |
|---|
| 733 | 711 | |
|---|