1. 16 11月, 2013 4 次提交
    • D
      Merge branch 'macvlan' · 82c80e9d
      David S. Miller 提交于
      Michal Kubecek says:
      
      ====================
      macvlan: disable LRO on lowerdev instead of a macvlan
      
      A customer of ours encountered a problem with LRO on an ixgbe network
      card. Analysis showed that it was a known conflict of forwarding and LRO
      but the forwarding was enabled in an LXC container where only a macvlan
      was, not the ethernet device itself.
      
      I believe the solution is exactly the same as what we do for "normal"
      (802.1q) VLAN devices: if dev_disable_lro() is called for such device,
      LRO is disabled on the underlying "real" device instead.
      
      v2: adapt to changes merged from net-next
      
      v3: use BUG() in macvlan_dev_real_dev() if compiled without macvlan
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82c80e9d
    • M
      macvlan: disable LRO on lower device instead of macvlan · 529d0489
      Michal Kubeček 提交于
      A macvlan device has always LRO disabled so that calling
      dev_disable_lro() on it does nothing. If we need to disable LRO
      e.g. because
      
        - the macvlan device is inserted into a bridge
        - IPv6 forwarding is enabled for it
        - it is in a different namespace than lowerdev and IPv4
          forwarding is enabled in it
      
      we need to disable LRO on its underlying device instead (as we
      do for 802.1q VLAN devices).
      
      v2: use newly introduced netif_is_macvlan()
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      529d0489
    • M
      macvlan: introduce macvlan_dev_real_dev() helper function · be9eac48
      Michal Kubeček 提交于
      Introduce helper function macvlan_dev_real_dev which returns the
      underlying device of a macvlan device, similar to vlan_dev_real_dev()
      for 802.1q VLAN devices.
      
      v2: IFF_MACVLAN flag and equivalent of is_macvlan_dev() were
      introduced in the meantime
      
      v3: do BUG() if compiled without macvlan support
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be9eac48
    • W
      bonding: add ip checks when store ip target · f9de11a1
      Wang Weidong 提交于
      I met a Bug when I add ip target with the wrong ip address:
      
      echo +500.500.500.500 > /sys/class/net/bond0/bonding/arp_ip_target
      
      the wrong ip address will transfor to 245.245.245.244 and add
      to the ip target success, it is uncorrect, so I add checks to avoid
      adding wrong address.
      
      The in4_pton() will set wrong ip address to 0.0.0.0, it will return by
      the next check and will not add to ip target.
      
      v2
      According Veaceslav's opinion, simplify the code.
      
      v3
      According Veaceslav's opinion, add broadcast check and make a micro
      definition to package it.
      
      v4
      Solve the problem of the format which David point out.
      Suggested-by: NVeaceslav Falico <vfalico@redhat.com>
      Suggested-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9de11a1
  2. 15 11月, 2013 36 次提交