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.
Jano
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
libvirt.spec.in | 1 -
meson.build | 10 ----------
src/util/virnetdevmacvlan.c | 6 +++---
3 files changed, 3 insertions(+), 14 deletions(-)