1. 24 5月, 2013 1 次提交
  2. 02 2月, 2013 3 次提交
    • J
      tap: multiqueue support · 264986e2
      Jason Wang 提交于
      Recently, linux support multiqueue tap which could let userspace call TUNSETIFF
      for a signle device many times to create multiple file descriptors as
      independent queues. User could also enable/disabe a specific queue through
      TUNSETQUEUE.
      
      The patch adds the generic infrastructure to create multiqueue taps. To achieve
      this a new parameter "queues" were introduced to specify how many queues were
      expected to be created for tap by qemu itself. Alternatively, management could
      also pass multiple pre-created tap file descriptors separated with ':' through a
      new parameter fds like -netdev tap,id=hn0,fds="X:Y:..:Z". Multiple vhost file
      descriptors could also be passed in this way.
      
      Each TAPState were still associated to a tap fd, which mean multiple TAPStates
      were created when user needs multiqueue taps. Since each TAPState contains one
      NetClientState, with the multiqueue nic support, an N peers of NetClientState
      were built up.
      
      A new parameter, mq_required were introduce in tap_open() to create multiqueue
      tap fds.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      264986e2
    • J
      tap: introduce a helper to get the name of an interface · e5dc0b40
      Jason Wang 提交于
      This patch introduces a helper tap_get_ifname() to get the device name of tap
      device. This is needed when ifname is unspecified in the command line and qemu
      were asked to create tap device by itself. In this situation, the name were
      allocated by kernel, so if multiqueue is asked, we need to fetch its name after
      creating the first queue.
      
      Only linux has this support since it's the only platform that supports
      multiqueue tap.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e5dc0b40
    • J
      tap: add Linux multiqueue support · 94fdc6d0
      Jason Wang 提交于
      This patch add basic multiqueue support for Linux. When multiqueue is needed, we
      will first check whether kernel support multiqueue tap before creating more
      queues. Two new functions tap_fd_enable() and tap_fd_disable() were introduced
      to enable and disable a specific queue. Since the multiqueue is only supported
      in Linux, return error on other platforms.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      94fdc6d0
  3. 19 12月, 2012 3 次提交
  4. 23 7月, 2012 1 次提交
  5. 09 6月, 2012 1 次提交
    • M
      do not include <libutil.h> needlessly or if it doesn't exist · 3294ce18
      Michael Tokarev 提交于
      <libutil.h> and <util.h> on *BSD (some have one, some another)
      were #included just for openpty() declaration.  The only file
      where this function is actually used is qemu-char.c.
      
      In vl.c and net/tap-bsd.c, none of functions declared in libutil.h
      (login logout logwtmp timdomain openpty forkpty uu_lock realhostname
      fparseln and a few others depending on version) are used.
      
      Initially the code which is currently in qemu-char.c was in vl.c,
      it has been removed into separate file in commit 0e82f34d
      Fri Oct 31 18:44:40 2008, but the #includes were left in vl.c.
      So with vl.c, we just remove includes - libutil.h, util.h and
      pty.h (which declares only openpty() and forkpty()) from there.
      
      The code in net/tap-bsd.c, which come from net/tap.c, had this
      
      commit 5281d757
      Author: Mark McLoughlin <markmc@redhat.com>
      Date:   Thu Oct 22 17:49:07 2009 +0100
      
          net: split all the tap code out into net/tap.c
      
      Note this commit not only moved stuff out of net.c to net/tap.c,
      but also rewrote large portions of the tap code, and added these
      completely unnecessary #includes -- as usual, I question why such
      a misleading commit messages are allowed.
      
      Again, no functions defined in libutil.h or util.h on *BSD are
      used by neither net/tap.c nor net/tap-bsd.c.  Removing them.
      
      And finally, the only real user for these #includes, qemu-char.c,
      which actually uses openpty().  There, the #ifdef logic is wrong.
      A GLIBC-based system has <pty.h>, even if it is a variant of *BSD.
      So __GLIBC__ should be checked first, and instead of trying to
      include <libutil.h> or <util.h>, we include <pty.h>.  If it is not
      GLIBC-based, we check for variations between <*util.h> as before.
      
      This patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one
      of the two problems): it is a distribution with a FreeBSD kernel,
      so it #defines at least __FreeBSD_kernel__, but since it is based
      on GLIBC, it has <pty.h>, but current version does not have neither
      <util.h> nor <libutil.h>, which the code tries to include 3 times
      but uses only once.
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3294ce18
  6. 07 8月, 2011 1 次提交
  7. 22 12月, 2010 1 次提交
  8. 30 9月, 2010 1 次提交
  9. 08 9月, 2010 1 次提交
  10. 28 3月, 2010 1 次提交
    • B
      Fix BSD and win32 builds · 73d96e29
      Blue Swirl 提交于
        CC    net/tap-bsd.o
      /src/qemu/net/tap-bsd.c: In function `tap_open':
      /src/qemu/net/tap-bsd.c:93: warning: implicit declaration of function `error_report'
      
        CC    sparc-softmmu/../net/tap-win32.o
      cc1: warnings being treated as errors
      /src/qemu/target-sparc/../net/tap-win32.c: In function 'net_init_tap':
      /src/qemu/target-sparc/../net/tap-win32.c:709: warning: implicit declaration of function 'error_report'
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      73d96e29
  11. 16 3月, 2010 1 次提交
    • M
      error: Replace qemu_error() by error_report() · 1ecda02b
      Markus Armbruster 提交于
      error_report() terminates the message with a newline.  Strip it it
      from its arguments.
      
      This fixes a few error messages lacking a newline:
      net_handle_fd_param()'s "No file descriptor named %s found", and
      tap_open()'s "vnet_hdr=1 requested, but no kernel support for
      IFF_VNET_HDR available" (all three versions).
      
      There's one place that passes arguments without newlines
      intentionally: load_vmstate().  Fix it up.
      1ecda02b
  12. 30 11月, 2009 1 次提交
  13. 21 11月, 2009 2 次提交
  14. 31 10月, 2009 1 次提交
    • A
      Unbreak tap compilation on OS X · 71f4effc
      Alexander Graf 提交于
      Currently compiling the tap sources breaks on Mac OS X. This is because of:
      
        1) tap-linux.h requiring Linux includes
        2) typos
        3) missing #includes
      
      This patch adds what's necessary to compile tap happily on Mac OS X.
      I haven't tested if using tap actually works, but I don't think that's a
      major issue as that code was probably seriously untested before already.
      
      I didn't split the patch, because it's only a few lines of code and
      splitting is probably not worth the effort here.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      71f4effc
  15. 30 10月, 2009 6 次提交
  16. 19 5月, 2009 1 次提交
  17. 04 3月, 2009 1 次提交
  18. 08 4月, 2008 1 次提交
  19. 01 2月, 2008 1 次提交
  20. 07 10月, 2007 1 次提交
  21. 17 9月, 2007 1 次提交
  22. 08 4月, 2007 1 次提交
  23. 02 2月, 2007 1 次提交
  24. 31 10月, 2005 1 次提交
  25. 08 11月, 2004 1 次提交