1. 04 1月, 2010 1 次提交
    • A
      bonding: allow arp_ip_targets on separate vlans to use arp validation · 1f3c8804
      Andy Gospodarek 提交于
      This allows a bond device to specify an arp_ip_target as a host that is
      not on the same vlan as the base bond device and still use arp
      validation.  A configuration like this, now works:
      
      BONDING_OPTS="mode=active-backup arp_interval=1000 arp_ip_target=10.0.100.1 arp_validate=3"
      
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
      3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
      8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
          inet6 fe80::213:21ff:febe:33e9/64 scope link
             valid_lft forever preferred_lft forever
      9: bond0.100@bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
          inet 10.0.100.2/24 brd 10.0.100.255 scope global bond0.100
          inet6 fe80::213:21ff:febe:33e9/64 scope link
             valid_lft forever preferred_lft forever
      
      Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
      
      Bonding Mode: fault-tolerance (active-backup)
      Primary Slave: None
      Currently Active Slave: eth1
      MII Status: up
      MII Polling Interval (ms): 0
      Up Delay (ms): 0
      Down Delay (ms): 0
      ARP Polling Interval (ms): 1000
      ARP IP target/s (n.n.n.n form): 10.0.100.1
      
      Slave Interface: eth1
      MII Status: up
      Link Failure Count: 1
      Permanent HW addr: 00:40:05:30:ff:30
      
      Slave Interface: eth0
      MII Status: up
      Link Failure Count: 0
      Permanent HW addr: 00:13:21:be:33:e9
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f3c8804
  2. 14 12月, 2009 1 次提交
  3. 04 12月, 2009 1 次提交
  4. 02 12月, 2009 1 次提交
  5. 18 11月, 2009 1 次提交
  6. 31 10月, 2009 6 次提交
  7. 29 10月, 2009 1 次提交
    • J
      bonding: fix a race condition in calls to slave MII ioctls · d9d52832
      Jiri Bohac 提交于
      In mii monitor mode, bond_check_dev_link() calls the the ioctl
      handler of slave devices. It stores the ndo_do_ioctl function
      pointer to a static (!) ioctl variable and later uses it to call the
      handler with the IOCTL macro.
      
      If another thread executes bond_check_dev_link() at the same time
      (even with a different bond, which none of the locks prevent), a
      race condition occurs. If the two racing slaves have different
      drivers, this may result in one driver's ioctl handler being
      called with a pointer to a net_device controlled with a different
      driver, resulting in unpredictable breakage.
      
      Unless I am overlooking something, the "static" must be a
      copy'n'paste error (?).
      Signed-off-by: NJiri Bohac <jbohac@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9d52832
  8. 27 10月, 2009 1 次提交
  9. 24 10月, 2009 1 次提交
  10. 13 10月, 2009 1 次提交
  11. 08 10月, 2009 2 次提交
  12. 07 10月, 2009 1 次提交
    • J
      bonding: introduce primary_reselect option · a549952a
      Jiri Pirko 提交于
      In some cases there is not desirable to switch back to primary interface when
      it's link recovers and rather stay with currently active one. We need to avoid
      packetloss as much as we can in some cases. This is solved by introducing
      primary_reselect option. Note that enslaved primary slave is set as current
      active no matter what.
      
      Patch modified by Jay Vosburgh as follows: fixed bug in action
      after change of option setting via sysfs, revised the documentation
      update, and bumped the bonding version number.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a549952a
  13. 17 9月, 2009 1 次提交
  14. 15 9月, 2009 1 次提交
  15. 01 9月, 2009 1 次提交
  16. 29 8月, 2009 4 次提交
  17. 14 8月, 2009 1 次提交
  18. 17 7月, 2009 1 次提交
    • M
      bonding: clean muticast addresses when device changes type · e36b9d16
      Moni Shoua 提交于
      Bonding device forbids slave device of different types under the same
      master.
      
      However, it is possible for a bonding master to change type during its
      lifetime.  This can be either from ARPHRD_ETHER to ARPHRD_INFINIBAND
      or the other way arround.  The change of type requires device level
      multicast address cleanup because device level multicast addresses
      depend on the device type.
      
      The patch adds a call to dev_close() before the bonding master changes
      type and dev_open() just after that.
      
      In the example below I enslaved an IPoIB device (ib0) under
      bond0. Since each bonding master starts as device of type ARPHRD_ETHER
      by default, a change of type occurs when ib0 is enslaved.
      
      This is how /proc/net/dev_mcast looks like without the patch
      
      5    bond0           1     0     00ffffffff12601bffff000000000001ff96ca05
      5    bond0           1     0     01005e000116
      5    bond0           1     0     01005e7ffffd
      5    bond0           1     0     01005e000001
      5    bond0           1     0     333300000001
      6    ib0             1     0     00ffffffff12601bffff000000000001ff96ca05
      6    ib0             1     0     333300000001
      6    ib0             1     0     01005e000001
      6    ib0             1     0     01005e7ffffd
      6    ib0             1     0     01005e000116
      6    ib0             1     0     00ffffffff12401bffff00000000000000000001
      6    ib0             1     0     00ffffffff12601bffff00000000000000000001
      
      and this is how it looks like after the patch.
      
      5    bond0           1     0     00ffffffff12601bffff000000000001ff96ca05
      5    bond0           1     0     00ffffffff12601bffff00000000000000000001
      5    bond0           1     0     00ffffffff12401bffff0000000000000ffffffd
      5    bond0           1     0     00ffffffff12401bffff00000000000000000116
      5    bond0           1     0     00ffffffff12401bffff00000000000000000001
      6    ib0             1     0     00ffffffff12601bffff000000000001ff96ca05
      6    ib0             1     0     00ffffffff12401bffff00000000000000000116
      6    ib0             1     0     00ffffffff12401bffff0000000000000ffffffd
      6    ib0             2     0     00ffffffff12401bffff00000000000000000001
      6    ib0             2     0     00ffffffff12601bffff00000000000000000001
      Signed-off-by: NMoni Shoua <monis@voltaire.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e36b9d16
  19. 06 7月, 2009 1 次提交
  20. 14 6月, 2009 7 次提交
  21. 30 5月, 2009 1 次提交
  22. 19 5月, 2009 1 次提交
    • E
      net: release dst entry in dev_hard_start_xmit() · 93f154b5
      Eric Dumazet 提交于
      One point of contention in high network loads is the dst_release() performed
      when a transmited skb is freed. This is because NIC tx completion calls
      dev_kree_skb() long after original call to dev_queue_xmit(skb).
      
      CPU cache is cold and the atomic op in dst_release() stalls. On SMP, this is
      quite visible if one CPU is 100% handling softirqs for a network device,
      since dst_clone() is done by other cpus, involving cache line ping pongs.
      
      It seems right place to release dst is in dev_hard_start_xmit(), for most
      devices but ones that are virtual, and some exceptions.
      
      David Miller suggested to define a new device flag, set in alloc_netdev_mq()
      (so that most devices set it at init time), and carefuly unset in devices
      which dont want a NULL skb->dst in their ndo_start_xmit().
      
      List of devices that must clear this flag is :
      
      - loopback device, because it calls netif_rx() and quoting Patrick :
          "ip_route_input() doesn't accept loopback addresses, so loopback packets
           already need to have a dst_entry attached."
      - appletalk/ipddp.c : needs skb->dst in its xmit function
      
      - And all devices that call again dev_queue_xmit() from their xmit function
      (as some classifiers need skb->dst) : bonding, vlan, macvlan, eql, ifb, hdlc_fr
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93f154b5
  23. 18 5月, 2009 1 次提交
    • E
      net: tx scalability works : trans_start · 9d21493b
      Eric Dumazet 提交于
      struct net_device trans_start field is a hot spot on SMP and high performance
      devices, particularly multi queues ones, because every transmitter dirties
      it. Is main use is tx watchdog and bonding alive checks.
      
      But as most devices dont use NETIF_F_LLTX, we have to lock
      a netdev_queue before calling their ndo_start_xmit(). So it makes
      sense to move trans_start from net_device to netdev_queue. Its update
      will occur on a already present (and in exclusive state) cache line, for
      free.
      
      We can do this transition smoothly. An old driver continue to
      update dev->trans_start, while an updated one updates txq->trans_start.
      
      Further patches could also put tx_bytes/tx_packets counters in 
      netdev_queue to avoid dirtying dev->stats (vlan device comes to mind)
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9d21493b
  24. 10 5月, 2009 1 次提交
  25. 06 5月, 2009 1 次提交