[ovs-dev] [PATCH 32/62] netdev-linux:don't print no ifindex log
Tao YunXiang
taoyunxiang at cmss.chinamobile.com
Mon Dec 28 09:24:50 UTC 2020
From: Rongyin <rongyin at 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 --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;
--
1.8.3.1
More information about the dev
mailing list