mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
build: eliminate WITH_MACVTAP flag entirely
This flag was originally created to indicate that either 1) the build platform wasn't linux, 2) the build platform was linux, but the kernel was too old to have macvtap support. Since there was already a switch there, the ability to also disable it when 3) the kernel supports macvtap but the user doesn't want it, was added in. I don't think that (3) was ever an intentional goal, just something that grew naturally out of having the flag there in the first place (unless possibly the original author wanted a way to quickly disable their new code in case it caused regressions elsewhere). Now that the check for (2) has been removed, WITH_MACVTAP is just checking (1) and (3), but (3) is pointless (because the extra code in libvirt itself is miniscule, and the only external library needed for it is libnl, which is also required for other unrelated features (and itself has no subordinate dependencies and takes up < 1MB on disk)). We can therfore eliminate the WITH_MACVTAP flag, as it is functionally equivalent to WITH_LIBNL (which implies __linux__). Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0cbce414e4
commit
7556ab139f
@ -1167,7 +1167,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
|
||||
-Dyajl=enabled \
|
||||
%{?arg_sanlock} \
|
||||
-Dlibpcap=enabled \
|
||||
-Dmacvtap=enabled \
|
||||
-Daudit=enabled \
|
||||
-Ddtrace=enabled \
|
||||
%{?arg_firewalld} \
|
||||
|
10
meson.build
10
meson.build
@ -1159,16 +1159,6 @@ libxml_dep = dependency('libxml-2.0', version: '>=' + libxml_version)
|
||||
cc = meson.get_compiler('c')
|
||||
m_dep = cc.find_library('m', required : false)
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
if not get_option('macvtap').disabled()
|
||||
conf.set('WITH_MACVTAP', 1)
|
||||
endif
|
||||
else
|
||||
if get_option('macvtap').enabled()
|
||||
error('macvtap is not supported on this platform.')
|
||||
endif
|
||||
endif
|
||||
|
||||
netcf_version = '0.1.8'
|
||||
netcf_dep = dependency('netcf', version: '>=' + netcf_version, required: get_option('netcf'))
|
||||
if netcf_dep.found()
|
||||
|
@ -26,7 +26,6 @@ option('libiscsi', type: 'feature', value: 'auto', description: 'libiscsi suppor
|
||||
option('libpcap', type: 'feature', value: 'auto', description: 'libpcap support')
|
||||
option('libssh', type: 'feature', value: 'auto', description: 'libssh support')
|
||||
option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
|
||||
option('macvtap', type: 'feature', value: 'auto', description: 'enable macvtap device')
|
||||
option('netcf', type: 'feature', value: 'auto', description: 'netcf support')
|
||||
option('nls', type: 'feature', value: 'auto', description: 'nls support')
|
||||
option('numactl', type: 'feature', value: 'auto', description: 'numactl support')
|
||||
|
@ -40,7 +40,7 @@ VIR_ENUM_IMPL(virNetDevMacVLanMode,
|
||||
"passthrough",
|
||||
);
|
||||
|
||||
#if WITH_MACVTAP
|
||||
#if defined(WITH_LIBNL)
|
||||
# include <fcntl.h>
|
||||
|
||||
# include <net/if.h>
|
||||
@ -1043,7 +1043,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname,
|
||||
|
||||
}
|
||||
|
||||
#else /* ! WITH_MACVTAP */
|
||||
#else /* ! WITH_LIBNL */
|
||||
bool virNetDevMacVLanIsMacvtap(const char *ifname G_GNUC_UNUSED)
|
||||
{
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
@ -1149,4 +1149,4 @@ void virNetDevMacVLanReserveName(const char *name G_GNUC_UNUSED)
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
_("Cannot create macvlan devices on this platform"));
|
||||
}
|
||||
#endif /* ! WITH_MACVTAP */
|
||||
#endif /* ! WITH_LIBNL */
|
||||
|
Loading…
Reference in New Issue
Block a user