[PATCH 3/9] build: eliminate useless WITH_VIRTUALPORT check

Pavel Hrdina phrdina at redhat.com
Thu Oct 1 15:04:00 UTC 2020


On Wed, Sep 30, 2020 at 07:14:38PM -0400, Laine Stump wrote:
> WITH_VIRTUALPORT just checks that we are building on Linux and that
> IFLA_PORT_MAX is defined in linux/if_link.h. Back when 802.11Qb[gh]
> support was added, the IFLA_* stuff was new (introduced in kernel
> 2.6.35, backported to RHEL6 2.6.32 kernel at some point), and so this
> extra check was necessary, because libvirt was being built on Linux
> distros that didn't yet have IFLA_* (e.g. older RHEL6, all
> RHEL5). It's been in the kernel for a *very* long time now, so all
> supported versions of all Linux platforms libvirt builds on have it.
> 
> Note that the above paragraph implies that the conditional compilation
> should be changed to #if defined(__linux__). However, the astute
> reader will notice that the code in question is sending and receiving
> netlink messages, so it really should be conditional on WITH_LIBNL
> (which implies __linux__) instead, so that's what this patch does.
> 
> Signed-off-by: Laine Stump <laine at redhat.com>
> ---
>  meson.build                      | 8 --------
>  src/util/virnetdevvportprofile.c | 8 ++++----
>  tools/virsh.c                    | 3 ---
>  3 files changed, 4 insertions(+), 15 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 2e57a435df..073ea6d49e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1386,14 +1386,6 @@ endif
>  
>  util_dep = cc.find_library('util', required: false)
>  
> -if not get_option('virtualport').disabled()
> -  if cc.has_header_symbol('linux/if_link.h', 'IFLA_PORT_MAX')
> -    conf.set('WITH_VIRTUALPORT', 1)
> -  elif get_option('virtualport').enabled()
> -    error('Installed linux headers don\'t show support for virtual port support.')
> -  endif
> -endif

We should also remove the 'virtualport' option from meson_options.txt .

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201001/7d1f8ad2/attachment-0001.sig>


More information about the libvir-list mailing list