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.

Signed-off-by: Thadeu Lima de Souza Cascardo <casca...@redhat.com>
---
 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 36e27e0..0656f36 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -1597,7 +1597,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));
-- 
2.4.2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to