diff mbox series

[22/22] lnet: change lnet_debug_peer() to struct lnet_nid

Message ID 1668953828-10909-23-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: backport OpenSFS work as of Nov 20, 2022 | expand

Commit Message

James Simmons Nov. 20, 2022, 2:17 p.m. UTC
From: Mr NeilBrown <neilb@suse.de>

lnet_debug_peer() now takes 'struct lnet_nid *'.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: e834ad5992adef598 ("LU-10391 lnet: change lnet_debug_peer() to struct lnet_nid")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/44635
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 include/linux/lnet/lib-lnet.h |  2 +-
 net/lnet/lnet/api-ni.c        |  2 +-
 net/lnet/lnet/peer.c          | 10 ++++------
 3 files changed, 6 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/include/linux/lnet/lib-lnet.h b/include/linux/lnet/lib-lnet.h
index a2d5adc..ba68d50 100644
--- a/include/linux/lnet/lib-lnet.h
+++ b/include/linux/lnet/lib-lnet.h
@@ -936,7 +936,7 @@  void lnet_peer_primary_nid_locked(struct lnet_nid *nid,
 void lnet_peer_tables_cleanup(struct lnet_net *net);
 void lnet_peer_uninit(void);
 int lnet_peer_tables_create(void);
-void lnet_debug_peer(lnet_nid_t nid);
+void lnet_debug_peer(struct lnet_nid *nid);
 struct lnet_peer_net *lnet_peer_get_net_locked(struct lnet_peer *peer,
 					       u32 net_id);
 bool lnet_peer_is_pref_nid_locked(struct lnet_peer_ni *lpni,
diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c
index 0146509..e400de7 100644
--- a/net/lnet/lnet/api-ni.c
+++ b/net/lnet/lnet/api-ni.c
@@ -5257,7 +5257,7 @@  static int lnet_net_cmd(struct sk_buff *skb, struct genl_info *info)
 
 void LNetDebugPeer(struct lnet_processid *id)
 {
-	lnet_debug_peer(lnet_nid_to_nid4(&id->nid));
+	lnet_debug_peer(&id->nid);
 }
 EXPORT_SYMBOL(LNetDebugPeer);
 
diff --git a/net/lnet/lnet/peer.c b/net/lnet/lnet/peer.c
index a1305b6..8c603c9 100644
--- a/net/lnet/lnet/peer.c
+++ b/net/lnet/lnet/peer.c
@@ -3966,21 +3966,19 @@  void lnet_peer_discovery_stop(void)
 /* Debugging */
 
 void
-lnet_debug_peer(lnet_nid_t nid4)
+lnet_debug_peer(struct lnet_nid *nid)
 {
 	char *aliveness = "NA";
 	struct lnet_peer_ni *lp;
-	struct lnet_nid nid;
 	int cpt;
 
-	lnet_nid4_to_nid(nid4, &nid);
-	cpt = lnet_nid2cpt(&nid, NULL);
+	cpt = lnet_nid2cpt(nid, NULL);
 	lnet_net_lock(cpt);
 
-	lp = lnet_peerni_by_nid_locked(&nid, NULL, cpt);
+	lp = lnet_peerni_by_nid_locked(nid, NULL, cpt);
 	if (IS_ERR(lp)) {
 		lnet_net_unlock(cpt);
-		CDEBUG(D_WARNING, "No peer %s\n", libcfs_nidstr(&nid));
+		CDEBUG(D_WARNING, "No peer %s\n", libcfs_nidstr(nid));
 		return;
 	}