diff mbox series

[ovs-dev,32/62] netdev-linux:don't print no ifindex log

Message ID 20201228092520.11807-33-taoyunxiang@cmss.chinamobile.com
State Not Applicable
Headers show
Series DPDK Offload API to test | expand

Commit Message

Tao YunXiang Dec. 28, 2020, 9:24 a.m. UTC
From: Rongyin <rongyin@cmss.chinamobile.com>

Code Source From: Self Code

Description:

     don't print no ifindex log

Jira:  #[Optional]
市场项目编号(名称):[Optional]
---
 lib/netdev-linux.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 4326456..5d02e12 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -6263,9 +6263,11 @@  linux_get_ifindex(const char *netdev_name)
         /* 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));
+        if (error != ENODEV) {
+            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;