Make the header easier to read and let the compiler inline
what it wants.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/conf/netdev_bandwidth_conf.c | 23 +++++++++++++++++++++++
src/conf/netdev_bandwidth_conf.h | 24 +-----------------------
src/libvirt_private.syms | 1 +
3 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/src/conf/netdev_bandwidth_conf.c b/src/conf/netdev_bandwidth_conf.c
index 349b451e41..2fe0499638 100644
--- a/src/conf/netdev_bandwidth_conf.c
+++ b/src/conf/netdev_bandwidth_conf.c
@@ -299,6 +299,29 @@ virDomainClearNetBandwidth(virDomainObjPtr vm)
}
+bool virNetDevSupportsBandwidth(virDomainNetType type)
+{
+ switch ((virDomainNetType) type) {
+ case VIR_DOMAIN_NET_TYPE_BRIDGE:
+ case VIR_DOMAIN_NET_TYPE_NETWORK:
+ 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_UDP:
+ case VIR_DOMAIN_NET_TYPE_INTERNAL:
+ case VIR_DOMAIN_NET_TYPE_HOSTDEV:
+ case VIR_DOMAIN_NET_TYPE_LAST:
+ break;
+ }
+ return false;
+}
+
+
bool
virNetDevBandwidthHasFloor(const virNetDevBandwidth *b)
{
diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_conf.h
index 172f9a50f9..5a70cb6bba 100644
--- a/src/conf/netdev_bandwidth_conf.h
+++ b/src/conf/netdev_bandwidth_conf.h
@@ -37,28 +37,6 @@ int virNetDevBandwidthFormat(const virNetDevBandwidth *def,
void virDomainClearNetBandwidth(virDomainObjPtr vm)
ATTRIBUTE_NONNULL(1);
-static inline bool virNetDevSupportsBandwidth(virDomainNetType type)
-{
- switch (type) {
- case VIR_DOMAIN_NET_TYPE_BRIDGE:
- case VIR_DOMAIN_NET_TYPE_NETWORK:
- 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_UDP:
- case VIR_DOMAIN_NET_TYPE_INTERNAL:
- case VIR_DOMAIN_NET_TYPE_HOSTDEV:
- case VIR_DOMAIN_NET_TYPE_LAST:
- break;
- }
- return false;
-}
-
-
+bool virNetDevSupportsBandwidth(virDomainNetType type);
bool virNetDevBandwidthHasFloor(const virNetDevBandwidth *b);
bool virNetDevBandwidthSupportsFloor(virNetworkForwardType type);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 8883aa89cc..fbcc26ad98 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -737,6 +737,7 @@ virNetDevBandwidthFormat;
virNetDevBandwidthHasFloor;
virNetDevBandwidthParse;
virNetDevBandwidthSupportsFloor;
+virNetDevSupportsBandwidth;
# conf/netdev_vlan_conf.h
--
2.24.1