Whamcloud - gitweb
LU-10391 lnet: change lnet_debug_peer() to struct lnet_nid 35/44635/10
authorMr NeilBrown <neilb@suse.de>
Tue, 6 Jul 2021 05:19:31 +0000 (15:19 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 17 Nov 2022 06:55:49 +0000 (06:55 +0000)
lnet_debug_peer() now takes 'struct lnet_nid *'.

Test-Parameters: trivial testlist=sanity-lnet
Test-Parameters: serverversion=2.12 serverdistro=el7.9 testlist=runtests
Test-Parameters: clientversion=2.12 testlist=runtests
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Iba496dc2008228046eff0092cf25d98b9409e771
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/44635
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lnet/include/lnet/lib-lnet.h
lnet/lnet/api-ni.c
lnet/lnet/peer.c

index 109b1c8..aaa24d9 100644 (file)
@@ -1013,7 +1013,7 @@ void lnet_push_update_to_peers(int force);
 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,
index 5518b70..c979532 100644 (file)
@@ -5345,7 +5345,7 @@ static struct genl_family lnet_family = {
 
 void LNetDebugPeer(struct lnet_processid *id)
 {
-       lnet_debug_peer(lnet_nid_to_nid4(&id->nid));
+       lnet_debug_peer(&id->nid);
 }
 EXPORT_SYMBOL(LNetDebugPeer);
 
index d9d8798..2da79fc 100644 (file)
@@ -3992,21 +3992,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;
        int                     cpt;
-       struct lnet_nid nid;
 
-       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;
        }