From bcb1f5a1fdcb3c50654a2ddec442d59c8195b3d9 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 15 Nov 2012 14:42:10 -0800 Subject: [PATCH] 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 --- lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.30.2