X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fovs_stats.c;fp=src%2Fovs_stats.c;h=da74789692619b703d34e44f9701a9a939b64ec5;hb=4a74d2e71912661dfb74e1387fb29c81432a4bf7;hp=376f0ad366b76133b8395560adb4d079dd816769;hpb=c2679380277b7dde10067f266cfd32a18a756439;p=collectd.git diff --git a/src/ovs_stats.c b/src/ovs_stats.c index 376f0ad3..da747896 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -304,6 +304,21 @@ static void ovs_stats_submit_interfaces(bridge_list_t *bridge, } } +static int ovs_stats_get_port_stat_value(port_list_t *port, + iface_counter index) { + if (port == NULL) + return 0; + + int value = 0; + + for (interface_list_t *iface = port->iface; iface != NULL; + iface = iface->next) { + value = value + iface->stats[index]; + } + + return value; +} + static void ovs_stats_submit_port(bridge_list_t *bridge, port_list_t *port) { char devname[PORT_NAME_SIZE_MAX * 2]; @@ -417,21 +432,6 @@ static port_list_t *ovs_stats_get_port(const char *uuid) { return NULL; } -static int ovs_stats_get_port_stat_value(port_list_t *port, - iface_counter index) { - if (port == NULL) - return 0; - - int value = 0; - - for (interface_list_t *iface = port->iface; iface != NULL; - iface = iface->next) { - value = value + iface->stats[index]; - } - - return value; -} - static port_list_t *ovs_stats_get_port_by_interface_uuid(const char *uuid) { if (uuid == NULL) return NULL;