]> git.proxmox.com Git - ovs.git/commitdiff
netdev-linux: Reduce log level for ENODEV errors getting ifindex
authorRoi Dayan <roid@mellanox.com>
Tue, 8 Aug 2017 14:03:11 +0000 (17:03 +0300)
committerBen Pfaff <blp@ovn.org>
Wed, 9 Aug 2017 19:55:47 +0000 (12:55 -0700)
These are normal and unavoidable, because the vifs
disappear from the kernel before they are removed them from the OVS
database.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/netdev-linux.c

index 98820edc2b5c872992e21ea1649e24df27880253..2ff3e2bcc356ac9cbfbf06a45d42732a5a322530 100644 (file)
@@ -5438,8 +5438,12 @@ linux_get_ifindex(const char *netdev_name)
 
     error = af_inet_ioctl(SIOCGIFINDEX, &ifr);
     if (error) {
-        VLOG_WARN_RL(&rl, "ioctl(SIOCGIFINDEX) on %s device failed: %s",
-                     netdev_name, ovs_strerror(error));
+        /* ENODEV probably means that a vif disappeared asynchronously and
+         * hasn't been removed from the database yet, so reduce the log level
+         * to INFO for that case. */
+        VLOG_RL(&rl, error == ENODEV ? VLL_INFO : VLL_ERR,
+                "ioctl(SIOCGIFINDEX) on %s device failed: %s",
+                netdev_name, ovs_strerror(error));
         return -error;
     }
     return ifr.ifr_ifindex;