1. 18 7月, 2014 1 次提交
    • J
      bonding: enhance L2 hash helper with packet type · ce04d635
      Jianhua Xie 提交于
      Current L2 hash helper calculates destination eth addr and
      source ether addr as L2 hash factors.  This patch is adding
      packet type ID field into L2 hash factors.  While one of
      BOND_XMIT_POLICY_LAYER2 or BOND_XMIT_POLICY_{LAYER|ENCAP}23
      is applied, for the 2nd level hash, enhanced hash method can
      help to distribute different types of packets like IPv4/IPv6
      packets to different slave devices.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: David S. Miller <davem@davemloft.net>
      CC: Pan Jiafei <Jiafei.Pan@freescale.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NJianhua Xie <jianhua.xie@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce04d635
  2. 16 7月, 2014 6 次提交
  3. 15 7月, 2014 1 次提交
  4. 08 7月, 2014 1 次提交
  5. 02 7月, 2014 1 次提交
  6. 19 6月, 2014 1 次提交
  7. 05 6月, 2014 2 次提交
    • V
      bonding: Support macvlans on top of tlb/rlb mode bonds · 14af9963
      Vlad Yasevich 提交于
      To make TLB mode work, the patch allows learning packets
      to be sent using mac addresses assigned to macvlan devices,
      also taking into an account vlans that may be between the
      bond and macvlan device.
      
      To make RLB work, all we have to do is accept ARP packets
      for addresses added to the bond dev->uc list.  Since RLB
      mode will take care to update the peers directly with
      correct mac addresses, learning packets for these addresses
      do not have be send to switch.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14af9963
    • V
      bonding: Turn on IFF_UNICAST_FLT on bond devices · c565b488
      Vlad Yasevich 提交于
      Bonding devices manage the unicast filters of the underlying
      interfaces, but do not turn on IFF_UNICAST_FLT flag.  Thus
      anytime a unicast address is added to the bond, the bond is
      places in promiscuous mode.
      
      Turn on IFF_UNICAST_FLT on the bond device so that the bond does
      not go into promiscuous mode needlesly.  If an underlying device
      does not support unicast filtering, that device will automaticall
      enter promiscuous mode already.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c565b488
  8. 23 5月, 2014 2 次提交
  9. 17 5月, 2014 9 次提交
  10. 15 5月, 2014 1 次提交
  11. 09 5月, 2014 1 次提交
  12. 25 4月, 2014 3 次提交
    • M
      bonding: Add tlb_dynamic_lb parameter for tlb mode · e9f0fb88
      Mahesh Bandewar 提交于
      The aggresive load balancing causes packet re-ordering as active
      flows are moved from a slave to another within the group. Sometime
      this aggresive lb is not necessary if the preference is for less
      re-ordering. This parameter if used with value "0" disables
      this dynamic flow shuffling minimizing packet re-ordering. Of course
      the side effect is that it has to live with the static load balancing
      that the hashing distribution provides. This impact is less severe if
      the correct xmit-hashing-policy is used for the tlb setup.
      
      The default value of the parameter is set to "1" mimicing the earlier
      behavior.
      
      Ran the netperf test with 200 stream for 1 min between two hosts with
      4x1G trunk (xmit-lb mode with xmit-policy L3+4) before and after these
      changes. Following was the command used for those 200 instances -
      
          netperf -t TCP_RR -l 60 -s 5 -H <host> -- -r81920,81920
      
      Transactions per second:
          Before change: 1,367.11
          After  change: 1,470.65
      
      Change-Id: Ie3f75c77282cf602e83a6e833c6eb164e72a0990
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9f0fb88
    • M
      bonding: Added bond_tlb_xmit() for tlb mode. · f05b42ea
      Mahesh Bandewar 提交于
      Re-organized the xmit function for the lb mode separating tlb xmit
      from the alb mode. This will enable use of the hashing policies
      like 802.3ad mode. Also extended use of xmit-hash-policy to tlb mode.
      
      Now the tlb-mode defaults to BOND_XMIT_POLICY_LAYER2 if the xmit policy
      module parameter is not set (just like 802.3ad, or Xor mode).
      
      Change-Id: I140257403d272df75f477b380207338d0f04963e
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f05b42ea
    • M
      bonding: Changed hashing function to just provide hash · ee62e868
      Mahesh Bandewar 提交于
      Modified the hash function to return just hash separating from the
      modulo operation that can be performed by the caller. This is to
      make way for the tlb mode to use the same hashing policies that
      are used in the 802.3ad and Xor mode.
      
      Change-Id: I276609e87e0ca213c4d1b17b79c5e0b0f3d0dd6f
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee62e868
  13. 12 4月, 2014 1 次提交
  14. 04 4月, 2014 1 次提交
    • Z
      bonding: Inactive slaves should keep inactive flag's value · 7db8df02
      zheng.li 提交于
      bond_open is not setting the inactive flag correctly for some modes (alb and
      tlb), resulting in error behavior if the bond has been administratively set
      down and then back up. This effect should not occur when slaves are added while
      the bond is up; it's something that only happens after a down/up bounce of the
      bond.
      
      For example, in bond tlb or alb mode, domu send some ARP request which go out
      from dom0 bond's active slave, then the ARP broadcast request packets go back to
      inactive slave from switch, because the inactive slave's inactive flag is zero,
      kernel will receive the packets and pass them to bridge that cause dom0's bridge
      map domu's MAC address to port of bond, bridge should map domu's MAC to port of
      vif.
      Signed-off-by: NZheng Li <zheng.x.li@oracle.com>
      Signed-off-by: NJay Vosburgh <j.vosburgh@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7db8df02
  15. 30 3月, 2014 1 次提交
  16. 27 3月, 2014 4 次提交
    • D
      bonding: add net_ratelimt to avoid spam in arp interval · 4873ac3c
      dingtianhong 提交于
      Remove the unnecessary log and add net_ratelimit to the others, in order to
      avoid spam the log.
      
      Cc: Joe Perches <joe@perches.com>
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Veaceslav Falico <vfalico@redhat.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4873ac3c
    • D
      bonding: support QinQ for bond arp interval · fbd929f2
      dingtianhong 提交于
      The bond send arp request to indicate that the slave is active, and if the bond dev
      is a vlan dev, it will set the vlan tag in skb to notice the vlan group, but the
      bond could only send a skb with 802.1q proto, not support for QinQ.
      
      So add outer tag for lower vlan tag and inner tag for upper vlan tag to support QinQ,
      The new skb will be consist of two vlan tag just like this:
      
      dst mac | src mac | outer vlan tag | inner vlan tag | data | .....
      
      If We don't need QinQ, the inner vlan tag could be set to 0 and use outer vlan tag
       as a normal vlan group.
      
      Using "ip link" to configure the bond for QinQ and add test log:
      
      ip link add link bond0  bond0.20 type vlan proto 802.1ad id 20
      ip link add link bond0.20  bond0.20.200 type vlan proto 802.1q id 200
      
      ifconfig bond0.20 11.11.20.36/24
      ifconfig bond0.20.200 11.11.200.36/24
      
      echo +11.11.200.37 > /sys/class/net/bond0/bonding/arp_ip_target
      
      90:e2:ba:07:4a:5c (oui Unknown) > Broadcast, ethertype 802.1Q-QinQ (0x88a8),length 50: vlan 20, p 0,ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 11.11.200.37 tell 11.11.200.36, length 28
      
      90:e2:ba:06:f9:86 (oui Unknown) > 90:e2:ba:07:4a:5c (oui Unknown), ethertype 802.1Q-QinQ (0x88a8), length 50: vlan 20, p 0, ethertype 802.1Q, vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 11.11.200.37 is-at 90:e2:ba:06:f9:86 (oui Unknown), length 28
      
      v1->v2: remove the comment "TODO: QinQ?".
      
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Veaceslav Falico <vfalico@redhat.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbd929f2
    • D
      bonding: ratelimit pr_err() for bond xmit broadcast · 9152e26d
      dingtianhong 提交于
      It may spam if the system is out of the memory, add ratelimit for it.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9152e26d
    • D
      bonding: slight optimization for bond xmit path · 054bb880
      dingtianhong 提交于
      Add unlikely() micro to the unlikely conditions in the bond
      xmit path for slight optimization.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      054bb880
  17. 13 3月, 2014 1 次提交
  18. 07 3月, 2014 2 次提交
  19. 03 3月, 2014 1 次提交
    • V
      bonding: send arp requests even if there's no route to them · 28572760
      Veaceslav Falico 提交于
      Currently we're only sending arp requests if we have a route to the target
      (and, thus, can find out the source ip address).
      
      There are some use cases, however, where we don't want/need to set an ip
      address (or set up a specific route) for bonding to use arp monitoring *for
      traffic generation*. We can easily send arp probes (arp requests with src
      ip == 0) to generate arp broadcast responses from the target ip and use
      them for determining if the target is up.
      
      This, obviously, won't work with arp validation - because we don't have the
      ip address set and, thus, will filter out the responses. So in that case -
      print a warning.
      
      CC: François CACHEREUL <f.cachereul@alphalink.fr>
      CC: Zhenjie Chen <zhchen@redhat.com>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28572760