.. | .. |
---|
1442 | 1442 | |
---|
1443 | 1443 | memcpy(bond_dev->broadcast, slave_dev->broadcast, |
---|
1444 | 1444 | slave_dev->addr_len); |
---|
| 1445 | + |
---|
| 1446 | + if (slave_dev->flags & IFF_POINTOPOINT) { |
---|
| 1447 | + bond_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST); |
---|
| 1448 | + bond_dev->flags |= (IFF_POINTOPOINT | IFF_NOARP); |
---|
| 1449 | + } |
---|
1445 | 1450 | } |
---|
1446 | 1451 | |
---|
1447 | 1452 | /* On bonding slaves other than the currently active slave, suppress |
---|
.. | .. |
---|
2393 | 2398 | /* called with rcu_read_lock() */ |
---|
2394 | 2399 | static int bond_miimon_inspect(struct bonding *bond) |
---|
2395 | 2400 | { |
---|
| 2401 | + bool ignore_updelay = false; |
---|
2396 | 2402 | int link_state, commit = 0; |
---|
2397 | 2403 | struct list_head *iter; |
---|
2398 | 2404 | struct slave *slave; |
---|
2399 | | - bool ignore_updelay; |
---|
2400 | 2405 | |
---|
2401 | | - ignore_updelay = !rcu_dereference(bond->curr_active_slave); |
---|
| 2406 | + if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP) { |
---|
| 2407 | + ignore_updelay = !rcu_dereference(bond->curr_active_slave); |
---|
| 2408 | + } else { |
---|
| 2409 | + struct bond_up_slave *usable_slaves; |
---|
| 2410 | + |
---|
| 2411 | + usable_slaves = rcu_dereference(bond->usable_slaves); |
---|
| 2412 | + |
---|
| 2413 | + if (usable_slaves && usable_slaves->count == 0) |
---|
| 2414 | + ignore_updelay = true; |
---|
| 2415 | + } |
---|
2402 | 2416 | |
---|
2403 | 2417 | bond_for_each_slave_rcu(bond, slave, iter) { |
---|
2404 | 2418 | bond_propose_link_state(slave, BOND_LINK_NOCHANGE); |
---|
.. | .. |
---|
3528 | 3542 | unblock_netpoll_tx(); |
---|
3529 | 3543 | break; |
---|
3530 | 3544 | case NETDEV_FEAT_CHANGE: |
---|
3531 | | - bond_compute_features(bond); |
---|
| 3545 | + if (!bond->notifier_ctx) { |
---|
| 3546 | + bond->notifier_ctx = true; |
---|
| 3547 | + bond_compute_features(bond); |
---|
| 3548 | + bond->notifier_ctx = false; |
---|
| 3549 | + } |
---|
3532 | 3550 | break; |
---|
3533 | 3551 | case NETDEV_RESEND_IGMP: |
---|
3534 | 3552 | /* Propagate to master device */ |
---|
.. | .. |
---|
4902 | 4920 | |
---|
4903 | 4921 | bond_dev->hw_features = BOND_VLAN_FEATURES | |
---|
4904 | 4922 | NETIF_F_HW_VLAN_CTAG_RX | |
---|
4905 | | - NETIF_F_HW_VLAN_CTAG_FILTER; |
---|
| 4923 | + NETIF_F_HW_VLAN_CTAG_FILTER | |
---|
| 4924 | + NETIF_F_HW_VLAN_STAG_RX | |
---|
| 4925 | + NETIF_F_HW_VLAN_STAG_FILTER; |
---|
4906 | 4926 | |
---|
4907 | 4927 | bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; |
---|
4908 | 4928 | #ifdef CONFIG_XFRM_OFFLOAD |
---|
.. | .. |
---|
5351 | 5371 | if (!bond->wq) |
---|
5352 | 5372 | return -ENOMEM; |
---|
5353 | 5373 | |
---|
| 5374 | + bond->notifier_ctx = false; |
---|
| 5375 | + |
---|
5354 | 5376 | spin_lock_init(&bond->stats_lock); |
---|
5355 | 5377 | netdev_lockdep_set_classes(bond_dev); |
---|
5356 | 5378 | |
---|