From 4afe46bcde7c96f095c6e1460b296fe159b09868 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Wed, 30 Apr 2025 14:59:49 +0000 Subject: [PATCH] LU-18963 lnet: remove erroneous lnet_inet_enumerate() CWARN Upon finding a DOWN interface, LNet will emit a message like "lnet: Ignoring interface eth0: it's down". However, this is not true - LNet doesn't ignore eth0; it chooses to spam the kernel log. On an instance with a large number of network interfaces, many of them may be down. And many of them could be designated for Lustre. As a result, this error could be printed hundreds of times. But the error doesn't provide actionable advice to the user; they aren't attempting to set up those interfaces and hence don't care about them. Downgrade this warning to a CDEBUG. lnet_inet_select() will emit an appropriate warning, if needed. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I17942c2eeb37ffa5c6b7d9c107e9eae108105115 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59042 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Frank Sehr Reviewed-by: Chris Horn Reviewed-by: Oleg Drokin --- lnet/lnet/config.c | 7 +++---- lnet/lnet/lib-socket.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lnet/lnet/config.c b/lnet/lnet/config.c index 501d7c0..67f6db8 100644 --- a/lnet/lnet/config.c +++ b/lnet/lnet/config.c @@ -1548,14 +1548,13 @@ int lnet_inet_select(struct lnet_ni *ni, return if_idx; if (addr_set) - CERROR("%s: failed to find IP address %s\n", + CERROR("%s: failed to find UP interface with IP address %s\n", libcfs_lnd2modname(ni->ni_nid.nid_type), libcfs_nidstr(&ni->ni_nid)); else if (ni->ni_interface) - CERROR("%s: failed to find interface %s%s%s\n", + CERROR("%s: failed to find UP interface %s\n", libcfs_lnd2modname(ni->ni_nid.nid_type), - ni->ni_interface, addr_set ? "@" : "", - addr_set ? libcfs_nidstr(&ni->ni_nid) : ""); + ni->ni_interface); return -EINVAL; } diff --git a/lnet/lnet/lib-socket.c b/lnet/lnet/lib-socket.c index ed003561..f427640 100644 --- a/lnet/lnet/lib-socket.c +++ b/lnet/lnet/lib-socket.c @@ -564,8 +564,8 @@ int lnet_inet_enumerate(struct lnet_inetdev **dev_list, struct net *ns, continue; if (!(flags & IFF_UP)) { - CWARN("lnet: Ignoring interface %s: it's down\n", - dev->name); + CDEBUG(D_NET, "Ignoring interface %s: it's down\n", + dev->name); continue; } -- 1.8.3.1