The *_get_stats functions call get_stats_via_vport(), which tries to get
information about ports attached to the kernel datapath. When a pure
userspace switch is used (eg, the OVS kernel module isn't loaded), ports
are not attached to a kernel datapath, so warnings get logged. This
commit handles that case and doesn't log a warning. However, if the
kernel datapath is loaded, ports attached to a userspace datapath will
still log a warning.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
int error;
error = netdev_vport_get_stats(netdev_, stats);
- if (error) {
+ if (error && error != ENOENT) {
VLOG_WARN_RL(&rl, "%s: obtaining netdev stats via vport failed "
"(%s)", netdev_get_name(netdev_), strerror(error));
}