Mark Wu <dwu@redhat.com>
Yufang Zhang <yuzhang@redhat.com>
Supriya Kannery <supriyak@in.ibm.com>
+ Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
[....send patches to get your name here....]
fi
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
AC_MSG_RESULT([$with_macvtap])
+if test "$with_macvtap" = yes; then
+ AC_CHECK_DECLS([MACVLAN_MODE_PASSTHRU], [], [], [[
+ #include <sys/socket.h>
+ #include <linux/if_link.h>
+ ]])
+fi
+
AC_ARG_WITH([virtualport],
AC_HELP_STRING([--with-virtualport],[enable virtual port support @<:@default=check@:>@]),
external router or gateway and that device sends them back to the
host. This procedure is followed if either the source or destination
device is in <code>private</code> mode.</dd>
+ <dt><code>passthrough</code></dt>
+ <dd>This feature attaches a virtual function of a SRIOV capable
+ NIC directly to a VM without losing the migration capability.
+ All packets are sent to the VF/IF of the configured network device.
+ Depending on the capabilities of the device additional prerequisites or
+ limitations may apply; for example, on Linux this requires
+ kernel 2.6.38 or newer. <span class="since">Since 0.9.2</span></dd>
</dl>
<pre>
</define>
<define name="bridgeMode">
<data type="string">
- <param name="pattern">(vepa|bridge|private)</param>
+ <param name="pattern">(vepa|bridge|private|passthrough)</param>
</data>
</define>
<define name="addrMAC">
VIR_ENUM_IMPL(virDomainNetdevMacvtap, VIR_DOMAIN_NETDEV_MACVTAP_MODE_LAST,
"vepa",
"private",
- "bridge")
+ "bridge",
+ "passthrough")
VIR_ENUM_IMPL(virVirtualPort, VIR_VIRTUALPORT_TYPE_LAST,
"none",
VIR_DOMAIN_NETDEV_MACVTAP_MODE_VEPA,
VIR_DOMAIN_NETDEV_MACVTAP_MODE_PRIVATE,
VIR_DOMAIN_NETDEV_MACVTAP_MODE_BRIDGE,
+ VIR_DOMAIN_NETDEV_MACVTAP_MODE_PASSTHRU,
VIR_DOMAIN_NETDEV_MACVTAP_MODE_LAST,
};
/*
- * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2010-2011 Red Hat, Inc.
* Copyright (C) 2010 IBM Corporation
*
* This library is free software; you can redistribute it and/or
# include <netlink/msg.h>
+/* Older kernels lacked this enum value. */
+# if !HAVE_DECL_MACVLAN_MODE_PASSTHRU
+# define MACVLAN_MODE_PASSTHRU 8
+# endif
+
#endif /* WITH_MACVTAP || WITH_VIRTUALPORT */
#include "util.h"
case VIR_DOMAIN_NETDEV_MACVTAP_MODE_BRIDGE:
return MACVLAN_MODE_BRIDGE;
+ case VIR_DOMAIN_NETDEV_MACVTAP_MODE_PASSTHRU:
+ return MACVLAN_MODE_PASSTHRU;
+
case VIR_DOMAIN_NETDEV_MACVTAP_MODE_VEPA:
default:
return MACVLAN_MODE_VEPA;
* be NULL if this function is supposed to choose a name
* @macaddress: The MAC address for the macvtap device
* @linkdev: The interface name of the NIC to connect to the external bridge
- * @mode: int describing the mode for 'bridge', 'vepa' or 'private'.
+ * @mode: int describing the mode for 'bridge', 'vepa', 'private' or 'passthru'.
* @vnet_hdr: 1 to enable IFF_VNET_HDR, 0 to disable it
* @vmuuid: The UUID of the VM the macvtap belongs to
* @virtPortProfile: pointer to object holding the virtual port profile data
/*
+ * Copyright (C) 2011 Red Hat, Inc.
* Copyright (C) 2010 IBM Corporation
*
* This library is free software; you can redistribute it and/or
const char *linkdev,
virVirtualPortProfileParamsPtr virtPortProfile);
-# define MACVTAP_MODE_PRIVATE_STR "private"
-# define MACVTAP_MODE_VEPA_STR "vepa"
-# define MACVTAP_MODE_BRIDGE_STR "bridge"
-
int vpAssociatePortProfileId(const char *macvtap_ifname,
const unsigned char *macvtap_macaddr,
const char *linkdev,