From f3237a16e367e13eb8d29bab66903757ba8fdd62 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 7 Nov 2023 10:57:46 -0500 Subject: [PATCH] LU-10391 lnet: use lnet_ni_get_status_locked for lnet_net_show_dump In my testing of IPv6 I was always seeing the NI state as "down". This is incorrect and I found this was due to reading ni->ni_status directly. Using lnet_ni_get_status_locked() fixes the issue. Test-Parameters: trivial testlist=sanity-lnet Fixes: 8f8f6e2f36e ("LU-10003 lnet: use Netlink to support old and new NI APIs.") Change-Id: I490144ceae4a5c1cdd7c920661f8220033df8cd5 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53016 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Reviewed-by: Oleg Drokin --- lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 1ab0ad1..4bc70c6 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -5294,7 +5294,7 @@ static int lnet_net_show_dump(struct sk_buff *msg, nla_put_string(msg, LNET_NET_LOCAL_NI_ATTR_NID, libcfs_nidstr(&ni->ni_nid)); if (!nid_is_lo0(&ni->ni_nid) && - *ni->ni_status != LNET_NI_STATUS_UP) + lnet_ni_get_status_locked(ni) != LNET_NI_STATUS_UP) status = "down"; nla_put_string(msg, LNET_NET_LOCAL_NI_ATTR_STATUS, status); -- 1.8.3.1