Introduced in d86fd2402e9d. Fails to compile on aarch64 with qemu/qemu_driver.c: In function 'qemuDomainSetInterfaceParameters': ./conf/domain_conf.h:3406:1: error: inlining failed in call to 'virDomainNetTypeSharesHostView': call is unlikely and code size would grow [-Werror=inline] virDomainNetTypeSharesHostView(const virDomainNetDef *net) ^ qemu/qemu_driver.c:11240:66: error: called from here [-Werror=inline] !virDomainNetTypeSharesHostView(net)) < 0 || ^ Solve the issue by turning it into a regular function. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/conf/domain_conf.c | 35 +++++++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 36 ++---------------------------------- src/libvirt_private.syms | 1 + 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f9ae05769..2b06250df 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28091,3 +28091,38 @@ virDomainGenerateMachineName(const char *drivername, virBufferCheckError(&buf); return virBufferContentAndReset(&buf); } + +/** + * virDomainNetTypeSharesHostView: + * @net: interface + * + * Some types of interfaces "share" the host view. For instance, + * for macvtap interface, every domain RX is the host RX too. And + * every domain TX is host TX too. IOW, for some types of + * interfaces guest and host are on the same side of RX/TX + * barrier. This is important so that we set up QoS correctly and + * report proper stats. + */ +bool +virDomainNetTypeSharesHostView(const virDomainNetDef *net) +{ + virDomainNetType actualType = virDomainNetGetActualType(net); + switch (actualType) { + case VIR_DOMAIN_NET_TYPE_DIRECT: + case VIR_DOMAIN_NET_TYPE_ETHERNET: + return true; + case VIR_DOMAIN_NET_TYPE_USER: + case VIR_DOMAIN_NET_TYPE_VHOSTUSER: + case VIR_DOMAIN_NET_TYPE_SERVER: + case VIR_DOMAIN_NET_TYPE_CLIENT: + case VIR_DOMAIN_NET_TYPE_MCAST: + case VIR_DOMAIN_NET_TYPE_NETWORK: + case VIR_DOMAIN_NET_TYPE_BRIDGE: + case VIR_DOMAIN_NET_TYPE_INTERNAL: + case VIR_DOMAIN_NET_TYPE_HOSTDEV: + case VIR_DOMAIN_NET_TYPE_UDP: + case VIR_DOMAIN_NET_TYPE_LAST: + break; + } + return false; +} diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0def905b2..7f21f9871 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3391,40 +3391,8 @@ virDomainGenerateMachineName(const char *drivername, int id, const char *name, bool privileged); -/** - * virDomainNetTypeSharesHostView: - * @net: interface - * - * Some types of interfaces "share" the host view. For instance, - * for macvtap interface, every domain RX is the host RX too. And - * every domain TX is host TX too. IOW, for some types of - * interfaces guest and host are on the same side of RX/TX - * barrier. This is important so that we set up QoS correctly and - * report proper stats. - */ -static inline bool -virDomainNetTypeSharesHostView(const virDomainNetDef *net) -{ - virDomainNetType actualType = virDomainNetGetActualType(net); - switch (actualType) { - case VIR_DOMAIN_NET_TYPE_DIRECT: - case VIR_DOMAIN_NET_TYPE_ETHERNET: - return true; - case VIR_DOMAIN_NET_TYPE_USER: - case VIR_DOMAIN_NET_TYPE_VHOSTUSER: - case VIR_DOMAIN_NET_TYPE_SERVER: - case VIR_DOMAIN_NET_TYPE_CLIENT: - case VIR_DOMAIN_NET_TYPE_MCAST: - case VIR_DOMAIN_NET_TYPE_NETWORK: - case VIR_DOMAIN_NET_TYPE_BRIDGE: - case VIR_DOMAIN_NET_TYPE_INTERNAL: - case VIR_DOMAIN_NET_TYPE_HOSTDEV: - case VIR_DOMAIN_NET_TYPE_UDP: - case VIR_DOMAIN_NET_TYPE_LAST: - break; - } - return false; -} + +bool virDomainNetTypeSharesHostView(const virDomainNetDef *net); bool virDomainDefLifecycleActionAllowed(virDomainLifecycle type, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2e67366b7..36cd5b55b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -446,6 +446,7 @@ virDomainNetInsert; virDomainNetRemove; virDomainNetRemoveHostdev; virDomainNetTypeFromString; +virDomainNetTypeSharesHostView; virDomainNetTypeToString; virDomainNostateReasonTypeFromString; virDomainNostateReasonTypeToString; -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list