1. 16 2月, 2012 1 次提交
  2. 24 1月, 2012 1 次提交
  3. 09 12月, 2011 2 次提交
  4. 05 11月, 2011 1 次提交
    • S
      macvlan: receive multicast with local address · 729e72a1
      stephen hemminger 提交于
      When implementing VRRP v2 using macvlan several problems were
      discovered.  VRRP is weird in that all routers participating
      in a redundant group use the same virtual MAC address.
      Macvlan is a natural driver to use for this but it doesn't
      work.  The problem is that packets with a macvlan device's
      source address are not received.
      
      The problem is actually a regression that date back almost 2 years now.
      The original problems started with:
      
      commit 618e1b74
      Author: Arnd Bergmann <arnd@arndb.de>
      Date:   Thu Nov 26 06:07:10 2009 +0000
      
          macvlan: implement bridge, VEPA and private mode
      
      This patches restores the original 2.6.32 behavior. Allowing multicast
      packets received with the VRRP source address to be received.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      729e72a1
  5. 19 10月, 2011 1 次提交
  6. 05 10月, 2011 1 次提交
  7. 16 9月, 2011 1 次提交
    • J
      net: consolidate and fix ethtool_ops->get_settings calling · 4bc71cb9
      Jiri Pirko 提交于
      This patch does several things:
      - introduces __ethtool_get_settings which is called from ethtool code and
        from drivers as well. Put ASSERT_RTNL there.
      - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
      - changes calling in drivers so rtnl locking is respected. In
        iboe_get_rate was previously ->get_settings() called unlocked. This
        fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
        problem. Also fixed by calling __dev_get_by_index() instead of
        dev_get_by_index() and holding rtnl_lock for both calls.
      - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
        so bnx2fc_if_create() and fcoe_if_create() are called locked as they
        are from other places.
      - use __ethtool_get_settings() in bonding code
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
      v2->v3:
      	-removed dev_ethtool_get_settings()
      	-added ASSERT_RTNL into __ethtool_get_settings()
      	-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
      	 around it and __ethtool_get_settings() call
      v1->v2:
              add missing export_symbol
      Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> [except FCoE bits]
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bc71cb9
  8. 18 8月, 2011 1 次提交
  9. 28 7月, 2011 1 次提交
    • N
      net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared · 550fd08c
      Neil Horman 提交于
      After the last patch, We are left in a state in which only drivers calling
      ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
      hardware call ether_setup for their net_devices and don't hold any state in
      their skbs.  There are a handful of drivers that violate this assumption of
      course, and need to be fixed up.  This patch identifies those drivers, and marks
      them as not being able to support the safe transmission of skbs by clearning the
      IFF_TX_SKB_SHARING flag in priv_flags
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Krzysztof Halasa <khc@pm.waw.pl>
      CC: "John W. Linville" <linville@tuxdriver.com>
      CC: Greg Kroah-Hartman <gregkh@suse.de>
      CC: Marcel Holtmann <marcel@holtmann.org>
      CC: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      550fd08c
  10. 22 7月, 2011 1 次提交
  11. 07 6月, 2011 1 次提交
  12. 23 5月, 2011 1 次提交
  13. 21 5月, 2011 1 次提交
  14. 20 5月, 2011 1 次提交
  15. 10 5月, 2011 1 次提交
    • E
      net: use batched device unregister in veth and macvlan · 226bd341
      Eric Dumazet 提交于
      veth devices dont use the batched device unregisters yet.
      
      Since veth are a pair of devices, it makes sense to use a batch of two
      unregisters, this roughly divides dismantle time by two.
      
      Fix this by changing dellink() callers to always provide a non NULL
      head. (Idea from Michał Mirosław)
      
      This patch also handles macvlan case : We now dismantle all macvlans on
      top of a lower dev at once.
      Reported-by: NAlex Bligh <alex@alex.org.uk>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Michał Mirosław <mirqus@gmail.com>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ben Greear <greearb@candelatech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      226bd341
  16. 08 5月, 2011 1 次提交
  17. 18 4月, 2011 1 次提交
  18. 22 3月, 2011 1 次提交
    • E
      macvlan: Fix use after free of struct macvlan_port. · d5cd9244
      Eric W. Biederman 提交于
      When the macvlan driver was extended to call unregisgter_netdevice_queue
      in 23289a37, a use after free of struct
      macvlan_port was introduced.  The code in dellink relied on unregister_netdevice
      actually unregistering the net device so it would be safe to free macvlan_port.
      
      Since unregister_netdevice_queue can just queue up the unregister instead of
      performing the unregiser immediately we free the macvlan_port too soon and
      then the code in macvlan_stop removes the macaddress for the set of macaddress
      to listen for and uses memory that has already been freed.
      
      To fix this add a reference count to track when it is safe to free the macvlan_port
      and move the call of macvlan_port_destroy into macvlan_uninit which is guaranteed
      to be called after the final macvlan_port_close.
      Signed-off-by: NEric W. Biederman <ebiederm@aristanetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5cd9244
  19. 17 3月, 2011 1 次提交
  20. 15 3月, 2011 1 次提交
    • D
      macvlan : fix checksums error when we are in bridge mode · 12a2856b
      Daniel Lezcano 提交于
      When the lower device has offloading capabilities, the packets checksums
      are not computed. That leads to have any macvlan port in bridge mode to
      not work because the packets are dropped due to a bad checksum.
      
      If the macvlan is in bridge mode, the packet is forwarded to another
      macvlan port and reach the network stack where it looks for a checksum
      but this one was not computed due to the offloading of the lower device.
      In this case, we have to set the packet with CHECKSUM_UNNECESSARY
      when it is forwarded to a bridged port and restore the previous value of
      ip_summed when the packet goes to the lowerdev.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Andrian Nord <nightnord@gmail.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12a2856b
  21. 23 11月, 2010 1 次提交
    • S
      macvlan: Introduce 'passthru' mode to takeover the underlying device · eb06acdc
      Sridhar Samudrala 提交于
      With the current default 'vepa' mode, a KVM guest using virtio with
      macvtap backend has the following limitations.
      - cannot change/add a mac address on the guest virtio-net
      - cannot create a vlan device on the guest virtio-net
      - cannot enable promiscuous mode on guest virtio-net
      
      To address these limitations, this patch introduces a new mode called
      'passthru' when creating a macvlan device which allows takeover of the
      underlying device and passing it to a guest using virtio with macvtap
      backend.
      
      Only one macvlan device is allowed in passthru mode and it inherits
      the mac address from the underlying device and sets it in promiscuous
      mode to receive and forward all the packets.
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      
      -------------------------------------------------------------------------
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb06acdc
  22. 17 11月, 2010 1 次提交
    • E
      macvlan: lockless tx path · 8ffab51b
      Eric Dumazet 提交于
      macvlan is a stacked device, like tunnels. We should use the lockless
      mechanism we are using in tunnels and loopback.
      
      This patch completely removes locking in TX path.
      
      tx stat counters are added into existing percpu stat structure, renamed
      from rx_stats to pcpu_stats.
      
      Note : this reverts commit 2c114553 (macvlan: add multiqueue
      capability)
      
      Note : rx_errors converted to a 32bit counter, like tx_dropped, since
      they dont need 64bit range.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Ben Greear <greearb@candelatech.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Acked-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ffab51b
  23. 18 9月, 2010 1 次提交
  24. 28 7月, 2010 1 次提交
  25. 23 7月, 2010 1 次提交
    • H
      macvtap: Limit packet queue length · 8a35747a
      Herbert Xu 提交于
      Mark Wagner reported OOM symptoms when sending UDP traffic over
      a macvtap link to a kvm receiver.
      
      This appears to be caused by the fact that macvtap packet queues
      are unlimited in length.  This means that if the receiver can't
      keep up with the rate of flow, then we will hit OOM. Of course
      it gets worse if the OOM killer then decides to kill the receiver.
      
      This patch imposes a cap on the packet queue length, in the same
      way as the tuntap driver, using the device TX queue length.
      
      Please note that macvtap currently has no way of giving congestion
      notification, that means the software device TX queue cannot be
      used and packets will always be dropped once the macvtap driver
      queue fills up.
      
      This shouldn't be a great problem for the scenario where macvtap
      is used to feed a kvm receiver, as the traffic is most likely
      external in origin so congestion notification can't be applied
      anyway.
      
      Of course, if anybody decides to complain about guest-to-guest
      UDP packet loss down the track, then we may have to revisit this.
      
      Incidentally, this patch also fixes a real memory leak when
      macvtap_get_queue fails.
      
      Chris Wright noticed that for this patch to work, we need a
      non-zero TX queue length.  This patch includes his work to change
      the default macvtap TX queue length to 500.
      Reported-by: NMark Wagner <mwagner@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NChris Wright <chrisw@sous-sol.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a35747a
  26. 10 7月, 2010 1 次提交
    • B
      net: Get rid of rtnl_link_stats64 / net_device_stats union · 3cfde79c
      Ben Hutchings 提交于
      In commit be1f3c2c "net: Enable 64-bit
      net device statistics on 32-bit architectures" I redefined struct
      net_device_stats so that it could be used in a union with struct
      rtnl_link_stats64, avoiding the need for explicit copying or
      conversion between the two.  However, this is unsafe because there is
      no locking required and no lock consistently held around calls to
      dev_get_stats() and use of the statistics structure it returns.
      
      In commit 28172739 "net: fix 64 bit
      counters on 32 bit arches" Eric Dumazet dealt with that problem by
      requiring callers of dev_get_stats() to provide storage for the
      result.  This means that the net_device::stats64 field and the padding
      in struct net_device_stats are now redundant, so remove them.
      
      Update the comment on net_device_ops::ndo_get_stats64 to reflect its
      new usage.
      
      Change dev_txq_stats_fold() to use struct rtnl_link_stats64, since
      that is what all its callers are really using and it is no longer
      going to be compatible with struct net_device_stats.
      
      Eric Dumazet suggested the separate function for the structure
      conversion.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3cfde79c
  27. 08 7月, 2010 1 次提交
    • E
      net: fix 64 bit counters on 32 bit arches · 28172739
      Eric Dumazet 提交于
      There is a small possibility that a reader gets incorrect values on 32
      bit arches. SNMP applications could catch incorrect counters when a
      32bit high part is changed by another stats consumer/provider.
      
      One way to solve this is to add a rtnl_link_stats64 param to all
      ndo_get_stats64() methods, and also add such a parameter to
      dev_get_stats().
      
      Rule is that we are not allowed to use dev->stats64 as a temporary
      storage for 64bit stats, but a caller provided area (usually on stack)
      
      Old drivers (only providing get_stats() method) need no changes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28172739
  28. 29 6月, 2010 1 次提交
  29. 16 6月, 2010 2 次提交
  30. 08 6月, 2010 1 次提交
  31. 02 6月, 2010 1 次提交
  32. 25 5月, 2010 1 次提交
  33. 16 5月, 2010 2 次提交
  34. 04 4月, 2010 1 次提交
  35. 19 3月, 2010 1 次提交
  36. 04 2月, 2010 2 次提交