Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 26 Feb 2014 20:04:37 +0000 (20:04 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 26 Feb 2014 20:04:37 +0000 (20:04 +0000)
Net patches

# gpg: Signature made Tue 25 Feb 2014 13:32:33 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/net-pull-request:
  virtio-net: use qemu_get_queue() where possible
  vhost_net: use offload API instead of bypassing it
  net: remove implicit peer from offload API
  net: Disable netmap backend when not supported
  net: add offloading support to netmap backend
  net: make tap offloading callbacks static
  net: virtio-net and vmxnet3 use offloading API
  net: TAP uses NetClientInfo offloading callbacks
  net: extend NetClientInfo for offloading
  net: change vnet-hdr TAP prototypes
  opencores_eth: flush queue whenever can_receive can go from false to true

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1  2 
configure

diff --combined configure
+++ b/configure
@@@ -302,7 -302,6 +302,7 @@@ gtkabi="2.0
  tpm="no"
  libssh2=""
  vhdx=""
 +quorum="no"
  
  # parse CC options first
  for opt do
@@@ -1047,10 -1046,6 +1047,10 @@@ for opt d
    ;;
    --disable-vhdx) vhdx="no"
    ;;
 +  --disable-quorum) quorum="no"
 +  ;;
 +  --enable-quorum) quorum="yes"
 +  ;;
    *) echo "ERROR: unknown option $opt"; show_help="yes"
    ;;
    esac
@@@ -1308,8 -1303,6 +1308,8 @@@ Advanced options (experts only)
    --enable-libssh2         enable ssh block device support
    --disable-vhdx           disables support for the Microsoft VHDX image format
    --enable-vhdx            enable support for the Microsoft VHDX image format
 +  --disable-quorum         disable quorum block filter support
 +  --enable-quorum          enable quorum block filter support
  
  NOTE: The object files are built at the place where configure is launched
  EOF
@@@ -1424,9 -1417,6 +1424,9 @@@ if compile_prog "-Werror -fno-gcse" "" 
  fi
  
  if test "$static" = "yes" ; then
 +  if test "$modules" = "yes" ; then
 +    error_exit "static and modules are mutually incompatible"
 +  fi
    if test "$pie" = "yes" ; then
      error_exit "static and pie are mutually incompatible"
    else
  fi
  
  ##########################################
 +# Quorum probe (check for gnutls)
 +if test "$quorum" != "no" ; then
 +cat > $TMPC <<EOF
 +#include <gnutls/gnutls.h>
 +#include <gnutls/crypto.h>
 +int main(void) {char data[4096], digest[32];
 +gnutls_hash_fast(GNUTLS_DIG_SHA256, data, 4096, digest);
 +return 0;
 +}
 +EOF
 +quorum_tls_cflags=`$pkg_config --cflags gnutls 2> /dev/null`
 +quorum_tls_libs=`$pkg_config --libs gnutls 2> /dev/null`
 +if compile_prog "$quorum_tls_cflags" "$quorum_tls_libs" ; then
 +  qcow_tls=yes
 +  libs_softmmu="$quorum_tls_libs $libs_softmmu"
 +  libs_tools="$quorum_tls_libs $libs_softmmu"
 +  QEMU_CFLAGS="$QEMU_CFLAGS $quorum_tls_cflags"
 +else
 +  echo "gnutls > 2.10.0 required to compile Quorum"
 +  exit 1
 +fi
 +fi
 +
 +##########################################
  # VNC SASL detection
  if test "$vnc" = "yes" -a "$vnc_sasl" != "no" ; then
    cat > $TMPC <<EOF
  fi
  
  ##########################################
- # netmap headers probe
+ # netmap support probe
+ # Apart from looking for netmap headers, we make sure that the host API version
+ # supports the netmap backend (>=11). The upper bound (15) is meant to simulate
+ # a minor/major version number. Minor new features will be marked with values up
+ # to 15, and if something happens that requires a change to the backend we will
+ # move above 15, submit the backend fixes and modify this two bounds.
  if test "$netmap" != "no" ; then
    cat > $TMPC << EOF
  #include <inttypes.h>
  #include <net/if.h>
  #include <net/netmap.h>
  #include <net/netmap_user.h>
+ #if (NETMAP_API < 11) || (NETMAP_API > 15)
+ #error
+ #endif
  int main(void) { return 0; }
  EOF
    if compile_prog "" "" ; then
@@@ -2486,12 -2460,8 +2494,12 @@@ if test "$mingw32" = yes; the
  else
      glib_req_ver=2.12
  fi
 +glib_modules=gthread-2.0
 +if test "$modules" = yes; then
 +    glib_modules="$glib_modules gmodule-2.0"
 +fi
  
 -for i in gthread-2.0 gmodule-2.0; do
 +for i in $glib_modules; do
      if $pkg_config --atleast-version=$glib_req_ver $i; then
          glib_cflags=`$pkg_config --cflags $i`
          glib_libs=`$pkg_config --libs $i`
@@@ -4036,7 -4006,6 +4044,7 @@@ echo "libssh2 support   $libssh2
  echo "TPM passthrough   $tpm_passthrough"
  echo "QOM debugging     $qom_cast_debug"
  echo "vhdx              $vhdx"
 +echo "Quorum            $quorum"
  
  if test "$sdl_too_old" = "yes"; then
  echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@@ -4455,10 -4424,6 +4463,10 @@@ if test "$libssh2" = "yes" ; the
    echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
  fi
  
 +if test "$quorum" = "yes" ; then
 +  echo "CONFIG_QUORUM=y" >> $config_host_mak
 +fi
 +
  if test "$virtio_blk_data_plane" = "yes" ; then
    echo 'CONFIG_VIRTIO_BLK_DATA_PLANE=$(CONFIG_VIRTIO)' >> $config_host_mak
  fi