conf: Don't inline virDomainNetTypeSharesHostView

When coverage build is enabled, gcc complains about it:

In file included from qemu/qemu_agent.h:29:0,
                 from qemu/qemu_driver.c:47:
qemu/qemu_driver.c: In function 'qemuDomainSetInterfaceParameters':
./conf/domain_conf.h:3397:1: error: inlining failed in call to
'virDomainNetTypeSharesHostView': call is unlikely and code size would
grow [-Werror=inline]
 virDomainNetTypeSharesHostView(const virDomainNetDef *net)
 ^

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2017-11-02 19:58:00 +01:00
parent 27b67eba22
commit bce925dada
3 changed files with 40 additions and 34 deletions

View File

@ -28091,3 +28091,39 @@ virDomainGenerateMachineName(const char *drivername,
virBufferCheckError(&buf); virBufferCheckError(&buf);
return virBufferContentAndReset(&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;
}

View File

@ -3391,40 +3391,9 @@ virDomainGenerateMachineName(const char *drivername,
int id, int id,
const char *name, const char *name,
bool privileged); bool privileged);
/**
* virDomainNetTypeSharesHostView: bool
* @net: interface virDomainNetTypeSharesHostView(const virDomainNetDef *net);
*
* 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 bool
virDomainDefLifecycleActionAllowed(virDomainLifecycle type, virDomainDefLifecycleActionAllowed(virDomainLifecycle type,

View File

@ -446,6 +446,7 @@ virDomainNetInsert;
virDomainNetRemove; virDomainNetRemove;
virDomainNetRemoveHostdev; virDomainNetRemoveHostdev;
virDomainNetTypeFromString; virDomainNetTypeFromString;
virDomainNetTypeSharesHostView;
virDomainNetTypeToString; virDomainNetTypeToString;
virDomainNostateReasonTypeFromString; virDomainNostateReasonTypeFromString;
virDomainNostateReasonTypeToString; virDomainNostateReasonTypeToString;