Skip to content

Commit

Permalink
netdev-linux: do not warn when getting stats for netdev with no vport
Browse files Browse the repository at this point in the history
When there is no vport for a given netdev, dpif_netlink_vport_get might return
ENODEV. Do not warn a failure to get port stats when that's the case.

This happens when the userspace switch is used.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and blp committed Jul 16, 2015
1 parent 125f60c commit 72c44b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netdev-linux.c
Expand Up @@ -1536,7 +1536,7 @@ get_stats_via_vport(const struct netdev *netdev_,
int error;

error = get_stats_via_vport__(netdev_, stats);
if (error && error != ENOENT) {
if (error && error != ENOENT && error != ENODEV) {
VLOG_WARN_RL(&rl, "%s: obtaining netdev stats via vport failed "
"(%s)",
netdev_get_name(netdev_), ovs_strerror(error));
Expand Down

0 comments on commit 72c44b3

Please sign in to comment.