1. 16 11月, 2013 1 次提交
  2. 08 11月, 2013 1 次提交
  3. 26 6月, 2013 1 次提交
  4. 13 6月, 2013 1 次提交
    • J
      macvtap: slient sparse warnings · d9a90a31
      Jason Wang 提交于
      This patch silents the following sparse warnings:
      
      drivers/net/macvtap.c:98:9: warning: incorrect type in assignment (different
      address spaces)
      drivers/net/macvtap.c:98:9:    expected struct macvtap_queue *<noident>
      drivers/net/macvtap.c:98:9:    got struct macvtap_queue [noderef]
      <asn:4>*<noident>
      drivers/net/macvtap.c:120:9: warning: incorrect type in assignment (different
      address spaces)
      drivers/net/macvtap.c:120:9:    expected struct macvtap_queue *<noident>
      drivers/net/macvtap.c:120:9:    got struct macvtap_queue [noderef]
      <asn:4>*<noident>
      drivers/net/macvtap.c:151:22: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:233:23: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:243:23: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:247:15: error: incompatible types in comparison expression
      (different address spaces)
        CC [M]  drivers/net/macvtap.o
      drivers/net/macvlan.c:232:24: error: incompatible types in comparison expression
      (different address spaces)
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9a90a31
  5. 08 6月, 2013 3 次提交
  6. 07 2月, 2013 1 次提交
  7. 16 4月, 2012 1 次提交
    • J
      macvlan: add FDB bridge ops and macvlan flags · df8ef8f3
      John Fastabend 提交于
      This adds FDB bridge ops to the macvlan device passthru mode.
      Additionally a flags field was added and a NOPROMISC bit to
      allow users to use passthru mode without the driver calling
      dev_set_promiscuity(). The flags field is a u16 placed in a
      4 byte hole (consuming 2 bytes) of the macvlan_dev struct.
      
      We want to do this so that the macvlan driver or stack
      above the macvlan driver does not have to process every
      packet. For the use case where we know all the MAC addresses
      of the endstations above us this works well.
      
      This patch is a result of Roopa Prabhu's work. Follow up
      patches are needed for VEPA and VEB macvlan modes.
      
      v2: Change from distinct nopromisc mode to a flags field to
          configure this. This avoids the tendency to add a new
          mode every time we need some slightly different behavior.
      v3: fix error in dev_set_promiscuity and add change and get
          link attributes for flags.
      
      CC: Roopa Prabhu <roprabhu@cisco.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df8ef8f3
  8. 21 10月, 2011 1 次提交
    • E
      macvtap: Fix the minor device number allocation · e09eff7f
      Eric W. Biederman 提交于
      On systems that create and delete lots of dynamic devices the
      31bit linux ifindex fails to fit in the 16bit macvtap minor,
      resulting in unusable macvtap devices.  I have systems running
      automated tests that that hit this condition in just a few days.
      
      Use a linux idr allocator to track which mavtap minor numbers
      are available and and to track the association between macvtap
      minor numbers and macvtap network devices.
      
      Remove the unnecessary unneccessary check to see if the network
      device we have found is indeed a macvtap device.  With macvtap
      specific data structures it is impossible to find any other
      kind of networking device.
      
      Increase the macvtap minor range from 65536 to the full 20 bits
      that is supported by linux device numbers.  It doesn't solve the
      original problem but there is no penalty for a larger minor
      device range.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e09eff7f
  9. 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
  10. 16 11月, 2010 1 次提交
  11. 17 8月, 2010 1 次提交
  12. 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
  13. 29 6月, 2010 1 次提交
  14. 02 6月, 2010 1 次提交
  15. 16 5月, 2010 1 次提交
  16. 19 2月, 2010 1 次提交
  17. 17 2月, 2010 1 次提交
  18. 04 2月, 2010 2 次提交
    • A
      net: macvtap driver · 20d29d7a
      Arnd Bergmann 提交于
      In order to use macvlan with qemu and other tools that require
      a tap file descriptor, the macvtap driver adds a small backend
      with a character device with the same interface as the tun
      driver, with a minimum set of features.
      
      Macvtap interfaces are created in the same way as macvlan
      interfaces using ip link, but the netif is just used as a
      handle for configuration and accounting, while the data
      goes through the chardev. Each macvtap interface has its
      own character device, simplifying permission management
      significantly over the generic tun/tap driver.
      
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: David S. Miller" <davem@davemloft.net>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Or Gerlitz <ogerlitz@voltaire.com>
      Cc: netdev@vger.kernel.org
      Cc: bridge@lists.linux-foundation.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20d29d7a
    • A
      macvlan: allow multiple driver backends · fc0663d6
      Arnd Bergmann 提交于
      This makes it possible to hook into the macvlan driver
      from another kernel module. In particular, the goal is
      to extend it with the macvtap backend that provides
      a tun/tap compatible interface directly on the macvlan
      device.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc0663d6
  19. 30 4月, 2008 1 次提交
  20. 15 7月, 2007 1 次提交