Whamcloud - gitweb
LU-16314 lnet: Migrate LASSERTF %p to %px 31/51231/7
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 6 Jun 2023 04:07:44 +0000 (11:07 +0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:05:22 +0000 (07:05 +0000)
This change covers libcfs and lnet and converts LASSERTF
statements to explicitly use %px.

Use %px to explicitly report the non-hashed pointer value
messages printed when a kernel panic is imminent. When
analyzing a crash dump the associated kernel address can
be used to determine the system state that lead to the
system crash.

As crash dumps can and are provided by customers from
production systems the use of the kernel command line
parameter:
    no_hash_pointers
is not always possible.

Ref: Documentation/core-api/printk-formats.rst

Test-Parameters: trivial
HPE-bug-id: LUS-10945
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I4d0c956e1b914cea9517b632d46f1714bcd43a85
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51231
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
libcfs/libcfs/hash.c
lnet/include/lnet/lib-lnet.h
lnet/klnds/gnilnd/gnilnd.c
lnet/klnds/gnilnd/gnilnd.h
lnet/klnds/gnilnd/gnilnd_cb.c
lnet/klnds/gnilnd/gnilnd_conn.c
lnet/klnds/gnilnd/gnilnd_stack.c
lnet/selftest/rpc.c

index 972baef..86f321b 100644 (file)
@@ -1260,7 +1260,7 @@ cfs_hash_find_or_add(struct cfs_hash *hs, const void *key,
        struct cfs_hash_bd     bds[2];
        int               bits = 0;
 
-       LASSERTF(hlist_unhashed(hnode), "hnode = %p\n", hnode);
+       LASSERTF(hlist_unhashed(hnode), "hnode = %px\n", hnode);
 
        cfs_hash_lock(hs, 0);
        cfs_hash_dual_bd_get_and_lock(hs, key, bds, 1);
index a59c726..ce5fdec 100644 (file)
@@ -307,7 +307,7 @@ lnet_md_free(struct lnet_libmd *md)
 {
        unsigned int  size;
 
-       LASSERTF(md->md_rspt_ptr == NULL, "md %p rsp %p\n", md, md->md_rspt_ptr);
+       LASSERTF(!md->md_rspt_ptr, "md %px rsp %px\n", md, md->md_rspt_ptr);
 
        size = offsetof(struct lnet_libmd, md_kiov[md->md_niov]);
 
index cd6fd8a..e507c02 100644 (file)
@@ -372,7 +372,7 @@ kgnilnd_find_conn_locked(kgn_peer_t *peer)
                /* kgnilnd_finish_connect doesn't put connections on the
                 * peer list until they are actually established */
                LASSERTF(conn->gnc_state >= GNILND_CONN_ESTABLISHED,
-                       "found conn %p state %s on peer %p (%s)\n",
+                       "found conn %px state %s on peer %px (%s)\n",
                        conn, kgnilnd_conn_state2str(conn), peer,
                        libcfs_nid2str(peer->gnp_nid));
                if (conn->gnc_state != GNILND_CONN_ESTABLISHED)
@@ -683,7 +683,7 @@ kgnilnd_close_conn_locked(kgn_conn_t *conn, int error)
        }
 
        LASSERTF(conn->gnc_state == GNILND_CONN_ESTABLISHED,
-               "conn %p to %s with bogus state %s\n", conn,
+               "conn %px to %s with bogus state %s\n", conn,
                libcfs_nid2str(conn->gnc_peer->gnp_nid),
                kgnilnd_conn_state2str(conn));
        LASSERT(!list_empty(&conn->gnc_hashlist));
@@ -1097,7 +1097,7 @@ kgnilnd_destroy_peer(kgn_peer_t *peer)
                 "peer 0x%p->%s dirty eps %d\n",
                 peer, libcfs_nid2str(peer->gnp_nid),
                 atomic_read(&peer->gnp_dirty_eps));
-       LASSERTF(peer->gnp_net != NULL, "peer %p (%s) with NULL net\n",
+       LASSERTF(peer->gnp_net != NULL, "peer %px (%s) with NULL net\n",
                 peer, libcfs_nid2str(peer->gnp_nid));
        LASSERTF(!kgnilnd_peer_active(peer),
                 "peer 0x%p->%s\n",
@@ -1138,13 +1138,13 @@ kgnilnd_add_purgatory_locked(kgn_conn_t *conn, kgn_peer_t *peer)
        /* NB - the caller should own conn by removing him from the
         * scheduler thread when finishing the close */
 
-       LASSERTF(peer != NULL, "conn %p with NULL peer\n", conn);
+       LASSERTF(peer != NULL, "conn %px with NULL peer\n", conn);
 
        /* If this is still true, need to add the calls to unlink back in and
         * figure out how to close the hole on loopback conns */
-       LASSERTF(kgnilnd_peer_active(peer), "can't use inactive peer %s (%p)"
-               " we'll never recover the resources\n",
-               libcfs_nid2str(peer->gnp_nid), peer);
+       LASSERTF(kgnilnd_peer_active(peer),
+               "can't use inactive peer %s (%px) we'll never recover the resources\n",
+                libcfs_nid2str(peer->gnp_nid), peer);
 
        CDEBUG(D_NET, "conn %p peer %p dev %p\n", conn, peer,
                conn->gnc_device);
@@ -1221,8 +1221,9 @@ kgnilnd_detach_purgatory_locked(kgn_conn_t *conn, struct list_head *conn_list)
                 * peer.
                 */
 
-               LASSERTF(conn->gnc_state == GNILND_CONN_DONE, "Conn in invalid state  %p@%s \n",
-                               conn, kgnilnd_conn_state2str(conn));
+               LASSERTF(conn->gnc_state == GNILND_CONN_DONE,
+                       "Conn in invalid state  %px@%s\n",
+                        conn, kgnilnd_conn_state2str(conn));
 
                /* move from peer to the delayed release list */
                list_add_tail(&conn->gnc_list, conn_list);
@@ -1564,7 +1565,7 @@ kgnilnd_del_conn_or_peer(kgn_net_t *net, lnet_nid_t nid, int command,
                list_for_each_entry_safe(peer, pnxt, &kgnilnd_data.kgn_peers[i],
                                         gnp_list) {
                        LASSERTF(peer->gnp_net != NULL,
-                               "peer %p (%s) with NULL net\n",
+                               "peer %px (%s) with NULL net\n",
                                 peer, libcfs_nid2str(peer->gnp_nid));
 
                        if (net != NULL && peer->gnp_net != net)
@@ -2743,13 +2744,13 @@ kgnilnd_shutdown(struct lnet_ni *ni)
        }
 
        LASSERTF(ni == net->gnn_ni,
-               "ni %p gnn_ni %p\n", net, net->gnn_ni);
+               "ni %px gnn_ni %px\n", net, net->gnn_ni);
 
        ni->ni_data = NULL;
 
        LASSERT(!net->gnn_shutdown);
        LASSERTF(atomic_read(&net->gnn_refcount) != 0,
-               "net %p refcount %d\n",
+               "net %px refcount %d\n",
                 net, atomic_read(&net->gnn_refcount));
 
        if (!list_empty(&net->gnn_list)) {
@@ -2796,7 +2797,7 @@ kgnilnd_shutdown(struct lnet_ni *ni)
 
        /* not locking, this can't race with writers */
        LASSERTF(atomic_read(&net->gnn_refcount) == 0,
-               "net %p refcount %d\n",
+               "net %px refcount %d\n",
                 net, atomic_read(&net->gnn_refcount));
        LIBCFS_FREE(net, sizeof(*net));
 
index b9ee43a..ba15636 100644 (file)
@@ -1175,7 +1175,7 @@ do {                                                                      \
 #define kgnilnd_net_addref(net)                                                \
 do {                                                                   \
        int     val = atomic_inc_return(&net->gnn_refcount);            \
-       LASSERTF(val > 1, "net %p refcount %d\n", net, val);            \
+       LASSERTF(val > 1, "net %px refcount %d\n", net, val);           \
        CDEBUG(D_NETTRACE, "net %p->%s++ (%d)\n", net,                  \
                libcfs_nidstr(&net->gnn_ni->ni_nid), val);              \
 } while (0)
@@ -1183,46 +1183,46 @@ do {                                                                    \
 #define kgnilnd_net_decref(net)                                                \
 do {                                                                   \
        int     val = atomic_dec_return(&net->gnn_refcount);            \
-       LASSERTF(val >= 0, "net %p refcount %d\n", net, val);           \
+       LASSERTF(val >= 0, "net %px refcount %d\n", net, val);          \
        CDEBUG(D_NETTRACE, "net %p->%s-- (%d)\n", net,                  \
               libcfs_nidstr(&net->gnn_ni->ni_nid), val);               \
 } while (0)
 
-#define kgnilnd_peer_addref(peer)                                               \
-do {                                                                            \
-       int     val = atomic_inc_return(&peer->gnp_refcount);                   \
-       LASSERTF(val > 1, "peer %p refcount %d\n", peer, val);                  \
-       CDEBUG(D_NETTRACE, "peer %p->%s++ (%d)\n", peer,                        \
-              libcfs_nid2str(peer->gnp_nid), val);                             \
+#define kgnilnd_peer_addref(peer)                                      \
+do {                                                                   \
+       int     val = atomic_inc_return(&peer->gnp_refcount);           \
+       LASSERTF(val > 1, "peer %px refcount %d\n", peer, val);         \
+       CDEBUG(D_NETTRACE, "peer %p->%s++ (%d)\n", peer,                \
+              libcfs_nid2str(peer->gnp_nid), val);                     \
 } while (0)
 
-#define kgnilnd_peer_decref(peer)                                               \
-do {                                                                            \
-       int     val = atomic_dec_return(&peer->gnp_refcount);                   \
-       LASSERTF(val >= 0, "peer %p refcount %d\n", peer, val);                 \
-       CDEBUG(D_NETTRACE, "peer %p->%s--(%d)\n", peer,                         \
-              libcfs_nid2str(peer->gnp_nid), val);                             \
-       if (val == 0)                                                           \
-               kgnilnd_destroy_peer(peer);                                     \
+#define kgnilnd_peer_decref(peer)                                      \
+do {                                                                   \
+       int     val = atomic_dec_return(&peer->gnp_refcount);           \
+       LASSERTF(val >= 0, "peer %px refcount %d\n", peer, val);        \
+       CDEBUG(D_NETTRACE, "peer %p->%s--(%d)\n", peer,                 \
+              libcfs_nid2str(peer->gnp_nid), val);                     \
+       if (val == 0)                                                   \
+               kgnilnd_destroy_peer(peer);                             \
 } while(0)
 
-#define kgnilnd_conn_addref(conn)                                       \
-do {                                                                    \
-       int     val;                                                    \
+#define kgnilnd_conn_addref(conn)                                      \
+do {                                                                   \
+       int val;                                                        \
                                                                        \
-       smp_wmb();                                                      \
-       val = atomic_inc_return(&conn->gnc_refcount);                   \
-       LASSERTF(val > 1 && conn->gnc_magic == GNILND_CONN_MAGIC,       \
-               "conn %p refc %d to %s\n",                              \
-               conn, val,                                              \
-               conn->gnc_peer                                          \
-                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
-                       : "<?>");                                       \
-       CDEBUG(D_NETTRACE, "conn %p->%s++ (%d)\n", conn,                \
-               conn->gnc_peer                                          \
-                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
-                       : "<?>",                                        \
-               val);                                                   \
+       smp_wmb();                                                      \
+       val = atomic_inc_return(&conn->gnc_refcount);                   \
+       LASSERTF(val > 1 && conn->gnc_magic == GNILND_CONN_MAGIC,       \
+               "conn %px refc %d to %s\n",                             \
+               conn, val,                                              \
+               conn->gnc_peer                                          \
+                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
+                       : "<?>");                                       \
+       CDEBUG(D_NETTRACE, "conn %p->%s++ (%d)\n", conn,                \
+               conn->gnc_peer                                          \
+                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
+                       : "<?>",                                        \
+               val);                                                   \
 } while (0)
 
 /* we hijack conn_decref && gnc_refcount = 1 to allow us to push the conn
@@ -1275,31 +1275,31 @@ do {                                                                    \
  * Clearly, we are totally safe. Clearly.
  */
 
-#define kgnilnd_conn_decref(conn)                                       \
-do {                                                                    \
-       int     val;                                                    \
+#define kgnilnd_conn_decref(conn)                                      \
+do {                                                                   \
+       int val;                                                        \
                                                                        \
-       smp_wmb();                                                      \
-       val = atomic_dec_return(&conn->gnc_refcount);                   \
-       LASSERTF(val >= 0, "conn %p refc %d to %s\n",                   \
-               conn, val,                                              \
-               conn->gnc_peer                                          \
-                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
-                       : "<?>");                                       \
-       CDEBUG(D_NETTRACE, "conn %p->%s-- (%d)\n", conn,                \
-               conn->gnc_peer                                          \
-                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
-                       : "<?>",                                        \
-               val);                                                   \
-       smp_rmb();                                                      \
-       if ((val == 1) &&                                               \
-           (conn->gnc_ephandle != NULL) &&                             \
-           (conn->gnc_state != GNILND_CONN_DESTROY_EP)) {              \
-               set_mb(conn->gnc_state, GNILND_CONN_DESTROY_EP);        \
-               kgnilnd_schedule_conn(conn);                            \
-       } else if (val == 0) {                                          \
-               kgnilnd_destroy_conn(conn);                             \
-       }                                                               \
+       smp_wmb();                                                      \
+       val = atomic_dec_return(&conn->gnc_refcount);                   \
+       LASSERTF(val >= 0, "conn %px refc %d to %s\n",                  \
+               conn, val,                                              \
+               conn->gnc_peer                                          \
+                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
+                       : "<?>");                                       \
+       CDEBUG(D_NETTRACE, "conn %p->%s-- (%d)\n", conn,                \
+               conn->gnc_peer                                          \
+                       ? libcfs_nid2str(conn->gnc_peer->gnp_nid)       \
+                       : "<?>",                                        \
+               val);                                                   \
+       smp_rmb();                                                      \
+       if ((val == 1) &&                                               \
+           (conn->gnc_ephandle != NULL) &&                             \
+           (conn->gnc_state != GNILND_CONN_DESTROY_EP)) {              \
+               set_mb(conn->gnc_state, GNILND_CONN_DESTROY_EP);        \
+               kgnilnd_schedule_conn(conn);                            \
+       } else if (val == 0) {                                          \
+               kgnilnd_destroy_conn(conn);                             \
+       }                                                               \
 } while (0)
 
 static inline struct list_head *
@@ -1677,7 +1677,7 @@ kgnilnd_validate_tx_ev_id(kgn_tx_ev_id_t *ev_id, kgn_tx_t **txp, kgn_conn_t **co
 
        GNITX_ASSERTF(tx, tx->tx_id.txe_idx == ev_id->txe_idx,
                      "conn 0x%p->%s tx_ref_table hosed: wanted txe_idx %d "
-                     "found tx %p txe_idx %d",
+                     "found tx %px txe_idx %d",
                      conn, libcfs_nid2str(conn->gnc_peer->gnp_nid),
                      ev_id->txe_idx, tx, tx->tx_id.txe_idx);
 
index b2fad14..1f429aa 100644 (file)
@@ -145,7 +145,7 @@ kgnilnd_schedule_process_conn(kgn_conn_t *conn, int sched_intent)
        conn_sched = xchg(&conn->gnc_scheduled, GNILND_CONN_IDLE);
        LASSERTF(conn_sched == GNILND_CONN_WANTS_SCHED ||
                 conn_sched == GNILND_CONN_PROCESS,
-                "conn %p after process in bad state: %d\n",
+                "conn %px after process in bad state: %d\n",
                 conn, conn_sched);
 
        if (sched_intent >= 0) {
@@ -189,7 +189,8 @@ _kgnilnd_schedule_conn(kgn_conn_t *conn, const char *caller, int line, int refhe
                         */
                        kgnilnd_conn_addref(conn);
                }
-               LASSERTF(list_empty(&conn->gnc_schedlist), "conn %p already sched state %d\n",
+               LASSERTF(list_empty(&conn->gnc_schedlist),
+                       "conn %px already sched state %d\n",
                         conn, sched);
 
                CDEBUG(D_INFO, "scheduling conn 0x%p caller %s:%d\n", conn, caller, line);
@@ -249,7 +250,7 @@ kgnilnd_free_tx(kgn_tx_t *tx)
        LASSERTF((tx->tx_list_p == NULL &&
                  tx->tx_list_state == GNILND_TX_ALLOCD) &&
                list_empty(&tx->tx_list),
-               "tx %p with bad state %s (list_p %p) tx_list %s\n",
+               "tx %px with bad state %s (list_p %px) tx_list %s\n",
                tx, kgnilnd_tx_state2str(tx->tx_list_state), tx->tx_list_p,
                list_empty(&tx->tx_list) ? "empty" : "not empty");
 
@@ -547,7 +548,7 @@ kgnilnd_setup_immediate_buffer(kgn_tx_t *tx, unsigned int niov,
                }
 
                LASSERTF(niov > 0 && niov < GNILND_MAX_IMMEDIATE/PAGE_SIZE,
-                       "bad niov %d msg %p kiov %p offset %d nob%d\n",
+                       "bad niov %d msg %px kiov %px offset %d nob%d\n",
                        niov, msg, kiov, offset, nob);
 
                for (i = 0; i < niov; i++) {
@@ -989,7 +990,7 @@ kgnilnd_map_buffer(kgn_tx_t *tx)
         * that our concurrency doesn't result in the kgn_device_t
         * getting nuked while we are in here */
 
-       LASSERTF(conn != NULL, "tx %p with NULL conn, someone forgot"
+       LASSERTF(conn != NULL, "tx %px with NULL conn, someone forgot"
                " to set tx_conn before calling %s\n", tx, __FUNCTION__);
 
        if (unlikely(CFS_FAIL_CHECK(CFS_FAIL_GNI_MAP_TX)))
@@ -1183,7 +1184,7 @@ kgnilnd_tx_done(kgn_tx_t *tx, int completion)
 
                LASSERTF(test_and_clear_bit(tx->tx_id.txe_idx,
                        (volatile unsigned long *)&conn->gnc_tx_bits),
-                       "conn %p tx %p bit %d already cleared\n",
+                       "conn %px tx %px bit %d already cleared\n",
                        conn, tx, tx->tx_id.txe_idx);
 
                LASSERTF(conn->gnc_tx_ref_table[tx->tx_id.txe_idx] != NULL,
@@ -1692,7 +1693,7 @@ kgnilnd_launch_tx(kgn_tx_t *tx, kgn_net_t *net, struct lnet_processid *target)
         * failure on any problems */
 
        GNITX_ASSERTF(tx, tx->tx_conn == NULL,
-                     "tx already has connection %p", tx->tx_conn);
+                     "tx already has connection %px", tx->tx_conn);
 
        /* do all of the peer & conn searching in one swoop - this avoids
         * nastiness when dropping locks and needing to maintain a sane state
@@ -1795,14 +1796,14 @@ kgnilnd_rdma(kgn_tx_t *tx, int type,
        void *desc_buffer = tx->tx_buffer;
        gni_mem_handle_t desc_map_key = tx->tx_map_key;
        LASSERTF(kgnilnd_tx_mapped(tx),
-               "unmapped tx %p\n", tx);
+               "unmapped tx %px\n", tx);
        LASSERTF(conn != NULL,
-               "NULL conn on tx %p, naughty, naughty\n", tx);
+               "NULL conn on tx %px, naughty, naughty\n", tx);
        LASSERTF(nob <= sink->gnrd_nob,
-               "nob %u > sink->gnrd_nob %d (%p)\n",
+               "nob %u > sink->gnrd_nob %d (%px)\n",
                nob, sink->gnrd_nob, sink);
        LASSERTF(nob <= tx->tx_nob,
-               "nob %d > tx(%p)->tx_nob %d\n",
+               "nob %d > tx(%px)->tx_nob %d\n",
                nob, tx, tx->tx_nob);
 
        switch (type) {
@@ -1899,7 +1900,8 @@ kgnilnd_rdma(kgn_tx_t *tx, int type,
        }
 
        /* Don't lie (CLOSE == RDMA idle) */
-       LASSERTF(!conn->gnc_close_sent, "tx %p on conn %p after close sent %d\n",
+       LASSERTF(!conn->gnc_close_sent,
+               "tx %px on conn %px after close sent %d\n",
                 tx, conn, conn->gnc_close_sent);
 
        GNIDBG_TX(D_NET, tx, "Post RDMA type 0x%02x conn %p dlvr_mode "
@@ -2041,7 +2043,7 @@ kgnilnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
               type, nob, niov, libcfs_idstr(target));
 
        LASSERTF(nob == 0 || niov > 0,
-               "lntmsg %p nob %d niov %d\n", lntmsg, nob, niov);
+               "lntmsg %px nob %d niov %d\n", lntmsg, nob, niov);
 
        if (msg_vmflush)
                mpflag = memalloc_noreclaim_save();
@@ -2053,7 +2055,7 @@ kgnilnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg)
                LBUG();
 
        case LNET_MSG_ACK:
-               LASSERTF(nob == 0, "lntmsg %p nob %d\n",
+               LASSERTF(nob == 0, "lntmsg %px nob %d\n",
                        lntmsg, nob);
                break;
 
@@ -3123,7 +3125,7 @@ kgnilnd_check_rdma_cq(kgn_device_t *dev)
                        tx->tx_msg.gnm_type == GNILND_MSG_GET_DONE ||
                        tx->tx_msg.gnm_type == GNILND_MSG_PUT_DONE_REV ||
                        tx->tx_msg.gnm_type == GNILND_MSG_GET_DONE_REV,
-                       "tx %p with type %d\n", tx, tx->tx_msg.gnm_type);
+                       "tx %px with type %d\n", tx, tx->tx_msg.gnm_type);
 
                GNIDBG_TX(D_NET, tx, "RDMA completion for %d bytes", tx->tx_nob);
 
@@ -3663,7 +3665,7 @@ kgnilnd_process_fmaq(kgn_conn_t *conn)
        if (conn->gnc_ephandle == NULL)
                return;
 
-       LASSERTF(!conn->gnc_close_sent, "Conn %p close was sent\n", conn);
+       LASSERTF(!conn->gnc_close_sent, "Conn %px close was sent\n", conn);
 
        spin_lock(&conn->gnc_list_lock);
 
@@ -3916,9 +3918,7 @@ _kgnilnd_match_reply(kgn_conn_t *conn, int type1, int type2, __u64 cookie)
 
                GNITX_ASSERTF(tx, ((tx->tx_id.txe_idx == ev_id.txe_idx) &&
                                  (tx->tx_id.txe_cookie = cookie)),
-                             "conn 0x%p->%s tx_ref_table hosed: wanted "
-                             "txe_cookie %#llx txe_idx %d "
-                             "found tx %p cookie %#llx txe_idx %d\n",
+                            "conn 0x%p->%s tx_ref_table hosed: wanted txe_cookie %#llx txe_idx %d found tx %px cookie %#llx txe_idx %d\n",
                              conn, libcfs_nid2str(conn->gnc_peer->gnp_nid),
                              cookie, ev_id.txe_idx,
                              tx, tx->tx_id.txe_cookie, tx->tx_id.txe_idx);
@@ -4094,7 +4094,7 @@ kgnilnd_check_fma_rx(kgn_conn_t *conn)
        }
 
        LASSERTF(rrc == GNI_RC_SUCCESS,
-               "bad rc %d on conn %p from peer %s\n",
+               "bad rc %d on conn %px from peer %s\n",
                rrc, conn, libcfs_nid2str(peer->gnp_nid));
 
        msg = (kgn_msg_t *)prefix;
@@ -4819,7 +4819,7 @@ kgnilnd_process_conns(kgn_device_t *dev, unsigned long deadline)
 
                LASSERTF(conn_sched != GNILND_CONN_IDLE &&
                         conn_sched != GNILND_CONN_PROCESS,
-                        "conn %p on ready list but in bad state: %d\n",
+                        "conn %px on ready list but in bad state: %d\n",
                         conn, conn_sched);
 
                CDEBUG(D_INFO, "conn %p@%s for processing\n",
index 5159248..f559308 100644 (file)
@@ -49,7 +49,8 @@ kgnilnd_map_fmablk(kgn_device_t *device, kgn_fma_memblock_t *fma_blk)
        fma_blk->gnm_hold_timeout = 0;
 
        /* make sure we are mapping a clean block */
-       LASSERTF(fma_blk->gnm_hndl.qword1 == 0UL, "fma_blk %p dirty\n", fma_blk);
+       LASSERTF(fma_blk->gnm_hndl.qword1 == 0UL,
+                "fma_blk %px dirty\n", fma_blk);
 
        rrc = kgnilnd_mem_register(device->gnd_handle, (__u64)fma_blk->gnm_block,
                                   fma_blk->gnm_blk_size, device->gnd_rcv_fma_cqh,
@@ -286,7 +287,7 @@ kgnilnd_unmap_fmablk(kgn_device_t *dev, kgn_fma_memblock_t *fma_blk)
               fma_blk->gnm_mbox_size, fma_blk->gnm_hold_timeout);
 
        LASSERTF(rrc == GNI_RC_SUCCESS,
-               "tried to double unmap or something bad, fma_blk %p (rrc %d)\n",
+               "tried to double unmap or something bad, fma_blk %px (rrc %d)\n",
                fma_blk, rrc);
 
        if (fma_blk->gnm_hold_timeout &&
@@ -318,7 +319,7 @@ void
 kgnilnd_free_fmablk_locked(kgn_device_t *dev, kgn_fma_memblock_t *fma_blk)
 {
        LASSERTF(fma_blk->gnm_avail_mboxs == fma_blk->gnm_num_mboxs,
-                "fma_blk %p@%d free in bad state (%d): blk total %d avail %d held %d\n",
+                "fma_blk %px@%d free in bad state (%d): blk total %d avail %d held %d\n",
                 fma_blk, fma_blk->gnm_state, fma_blk->gnm_hold_timeout, fma_blk->gnm_num_mboxs,
                fma_blk->gnm_avail_mboxs, fma_blk->gnm_held_mboxs);
 
@@ -412,7 +413,8 @@ kgnilnd_find_free_mbox(kgn_conn_t *conn)
                /* We'll set the hndl to zero for PHYS blocks unmapped during stack
                 * reset and re-use the same fma_blk after stack reset. This ensures we've
                 * properly mapped it before we use it */
-               LASSERTF(fma_blk->gnm_hndl.qword1 != 0UL, "unmapped fma_blk %p, state %d\n",
+               LASSERTF(fma_blk->gnm_hndl.qword1 != 0UL,
+                       "unmapped fma_blk %px, state %d\n",
                         fma_blk, fma_blk->gnm_state);
 
                CDEBUG(D_NET, "conn %p smsg %p fmablk %p "
@@ -495,8 +497,9 @@ kgnilnd_release_mbox(kgn_conn_t *conn, int purgatory_hold)
                        break;
                }
        }
-       LASSERTF(found, "unable to find conn 0x%p with gnc_fma_blk %p "
-                "anywhere in the world\n", conn, conn->gnc_fma_blk);
+       LASSERTF(found,
+               "unable to find conn 0x%p with gnc_fma_blk %px anywhere in the world\n",
+                conn, conn->gnc_fma_blk);
 
        LASSERTF(id < fma_blk->gnm_num_mboxs,
                "bad id %d max %d\n",
@@ -544,7 +547,7 @@ kgnilnd_release_mbox(kgn_conn_t *conn, int purgatory_hold)
                 * not worry about state so much in kgnilnd_destroy_conn
                 * and makes the guaranteed cleanup of the resources easier */
                LASSERTF(test_and_clear_bit(id, fma_blk->gnm_bit_array),
-                       "conn %p bit %d already cleared in fma_blk %p\n",
+                       "conn %px bit %d already cleared in fma_blk %px\n",
                         conn, id, fma_blk);
                conn->gnc_fma_blk = NULL;
                mbox->mbx_nallocs--;
index c6c6093..e3237f1 100644 (file)
@@ -247,7 +247,7 @@ kgnilnd_reset_stack(void)
 
                        LASSERTF(conn_sched != GNILND_CONN_IDLE &&
                                 conn_sched != GNILND_CONN_PROCESS,
-                                "conn %p on ready list but in bad state: %d\n",
+                                "conn %px on ready list but in bad state: %d\n",
                                 conn, conn_sched);
 
                        list_del_init(&conn->gnc_schedlist);
index 2b2def8..4d5a787 100644 (file)
@@ -1465,7 +1465,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev)
                if (rpcev != &crpc->crpc_reqstev &&
                    rpcev != &crpc->crpc_replyev &&
                    rpcev != &crpc->crpc_bulkev) {
-                       CERROR("rpcev %p, crpc %p, reqstev %p, replyev %p, bulkev %p\n",
+                       CERROR("rpcev %px, crpc %px, reqstev %px, replyev %px, bulkev %px\n",
                               rpcev, crpc, &crpc->crpc_reqstev,
                               &crpc->crpc_replyev, &crpc->crpc_bulkev);
                        CERROR("Bad event: status %d, type %d, lnet %d\n",