From: Justin Pettit Date: Thu, 15 Nov 2012 22:42:10 +0000 (-0800) Subject: netdev-linux: Don't log vport warnings when kernel datapath not loaded. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff_plain;h=bcb1f5a1fdcb3c50654a2ddec442d59c8195b3d9 netdev-linux: Don't log vport warnings when kernel datapath not loaded. 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 --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index b8139682..5b4d1a34 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1347,7 +1347,7 @@ get_stats_via_vport(const struct netdev *netdev_, 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)); }