1. 06 Sep, 2013 1 commit
  2. 24 May, 2013 1 commit
  3. 01 Feb, 2013 3 commits
    • Jason Wang's avatar
      tap: multiqueue support · 264986e2
      Jason Wang authored
      
      
      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: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      264986e2
    • Jason Wang's avatar
      tap: introduce a helper to get the name of an interface · e5dc0b40
      Jason Wang authored
      
      
      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: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      e5dc0b40
    • Jason Wang's avatar
      tap: add Linux multiqueue support · 94fdc6d0
      Jason Wang authored
      
      
      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: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      94fdc6d0
  4. 19 Dec, 2012 3 commits
  5. 23 Jul, 2012 1 commit
  6. 09 Jun, 2012 1 commit
    • Michael Tokarev's avatar
      do not include <libutil.h> needlessly or if it doesn't exist · 3294ce18
      Michael Tokarev authored
      <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: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      3294ce18
  7. 07 Aug, 2011 1 commit
  8. 21 Dec, 2010 1 commit
  9. 29 Sep, 2010 1 commit
  10. 07 Sep, 2010 1 commit
  11. 27 Mar, 2010 1 commit
    • Blue Swirl's avatar
      Fix BSD and win32 builds · 73d96e29
      Blue Swirl authored
      
      
        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: default avatarBlue Swirl <blauwirbel@gmail.com>
      73d96e29
  12. 16 Mar, 2010 1 commit
    • Markus Armbruster's avatar
      error: Replace qemu_error() by error_report() · 1ecda02b
      Markus Armbruster authored
      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
  13. 29 Nov, 2009 1 commit
  14. 21 Nov, 2009 2 commits
  15. 30 Oct, 2009 7 commits
  16. 18 May, 2009 1 commit
  17. 03 Mar, 2009 1 commit
  18. 08 Apr, 2008 1 commit
  19. 01 Feb, 2008 1 commit
  20. 07 Oct, 2007 1 commit
  21. 16 Sep, 2007 1 commit
  22. 07 Apr, 2007 1 commit
  23. 01 Feb, 2007 1 commit
  24. 30 Oct, 2005 1 commit
  25. 07 Nov, 2004 1 commit