# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1195085880 28800
# Node ID 670294145fcc1a786594f5110e2248cd4ec0b7ed
# Parent 7a96c19a305233cccd1075cd96fea207954e4890
Make QEMU and Xen NIC limits configure'able
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 7a96c19a3052 -r 670294145fcc configure.ac
--- a/configure.ac Wed Nov 14 15:03:42 2007 -0500
+++ b/configure.ac Wed Nov 14 16:18:00 2007 -0800
@@ -34,6 +34,22 @@ AC_ARG_VAR([LIBVIRTDIR],[the directory w
AC_ARG_VAR([LIBVIRTDIR],[the directory where the libvirt package is installed.])
AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed.
])
+
+AC_ARG_WITH([kvm-max-nics],
+ AC_HELP_STRING([--with-kvm-max-nics=X],
+ [Maximum NICs to advertise for KVM]),
+ [test "x$withval" != "x" && KVM_MAX_NICS=$withval],
+ [KVM_MAX_NICS=8])
+AC_SUBST(KVM_MAX_NICS)
+AC_DEFINE_UNQUOTED(KVM_MAX_NICS, $KVM_MAX_NICS, [Maximum NIC limit for KVM])
+
+AC_ARG_WITH([xen-max-nics],
+ AC_HELP_STRING([--with-xen-max-nics=X],
+ [Maximum NIC limit to advertise for Xen (unless known by the provider)]),
+ [test "x$withval" != "x" &&
XEN_MAX_NICS=$withval],
+ [XEN_MAX_NICS=8])
+AC_SUBST(XEN_MAX_NICS)
+AC_DEFINE_UNQUOTED(XEN_MAX_NICS, $XEN_MAX_NICS, [Maximum NIC limit for Xen])
AC_ARG_WITH([namespace],
AC_HELP_STRING([--with-namespace=ns],
diff -r 7a96c19a3052 -r 670294145fcc src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Nov 14 15:03:42 2007 -0500
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Nov 14 16:18:00 2007 -0800
@@ -336,7 +336,7 @@ static uint16_t net_max_kvm(const CMPIOb
CMPIStatus *s)
{
/* This appears to not require anything dynamic. */
- return 32;
+ return KVM_MAX_NICS;
}
static uint16_t net_max_xen(const CMPIObjectPath *ref,
CMPIStatus *s)
@@ -364,7 +364,7 @@ static uint16_t net_max_xen(const CMPIOb
}
if (version >= 3001000)
- num_nics = 8;
+ num_nics = XEN_MAX_NICS;
else
num_nics = 4;
Show replies by date
Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1195085880 28800
# Node ID 670294145fcc1a786594f5110e2248cd4ec0b7ed
# Parent 7a96c19a305233cccd1075cd96fea207954e4890
Make QEMU and Xen NIC limits configure'able
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
The m4 seems okay, and the idea is definitely good. +1
--
-Jay