[PATCH 6/9] build: eliminate WITH_MACVTAP flag

Ján Tomko jtomko at redhat.com
Thu Oct 1 14:13:55 UTC 2020

On a Wednesday in 2020, Laine Stump wrote:
>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 in case 3) the kernel supported
>macvtap but the user didn'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 (since it adds almost
>nothing extra in size to the code). We can therfore eliminate
>the WITH_MACVTAP flag, as it is equivalent to __linux__.
>*However*, macvtap/macvlan devices are created using netlink messages,
> and any netlink interaction in libvirt requires libnl. So what we
> *really* need is to check WITH_LIBNL (which itself implies __linux__,
> as libnl is only useful/available on Linux).

The indentation is off here.


>Signed-off-by: Laine Stump <laine at redhat.com>
> libvirt.spec.in             |  1 -
> meson.build                 | 10 ----------
> src/util/virnetdevmacvlan.c |  6 +++---
> 3 files changed, 3 insertions(+), 14 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201001/7ede5236/attachment-0001.sig>

More information about the libvir-list mailing list