mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user