Skip to content
Snippets Groups Projects
  1. Feb 01, 2013
    • 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
  2. Dec 19, 2012
  3. Jul 23, 2012
  4. Jun 09, 2012
    • 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
  5. Aug 07, 2011
  6. Dec 21, 2010
  7. Sep 29, 2010
  8. Sep 07, 2010
  9. Mar 27, 2010
    • 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
  10. Mar 16, 2010
    • 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
  11. Nov 29, 2009
  12. Nov 21, 2009
  13. Oct 30, 2009
  14. May 18, 2009
  15. Mar 03, 2009
  16. Apr 08, 2008
  17. Feb 01, 2008
  18. Oct 07, 2007
  19. Sep 16, 2007
  20. Apr 07, 2007
  21. Feb 02, 2007
  22. Oct 30, 2005
  23. Nov 07, 2004
Loading