netdev-linux: Don't log vport warnings when kernel datapath not loaded.
authorJustin Pettit <jpettit@nicira.com>
Thu, 15 Nov 2012 22:42:10 +0000 (14:42 -0800)
committerJustin Pettit <jpettit@nicira.com>
Fri, 16 Nov 2012 20:35:55 +0000 (12:35 -0800)
commitbcb1f5a1fdcb3c50654a2ddec442d59c8195b3d9
tree19dcf58e16a5dfef497d5b96a9864fc675767bcb
parent7eb1bd81120806b4189e860b2a6468925d8e7bba
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 <jpettit@nicira.com>
lib/netdev-linux.c