Skip to content

Commit

Permalink
DAOS-17013 cart: Fix timeout error prints for CORPCS (#15813)
Browse files Browse the repository at this point in the history
- CORPC don't have ep_target set, making their prints confusing during timeouts

Signed-off-by: Alexander A Oganezov <[email protected]>
  • Loading branch information
frostedcmos authored Jan 30, 2025
1 parent 1ee84b9 commit 9e6042f
Showing 1 changed file with 42 additions and 16 deletions.
58 changes: 42 additions & 16 deletions src/cart/crt_internal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -36,10 +37,17 @@
break; \
\
crt_opc_decode((rpc)->crp_pub.cr_opc, &_module, &_opc); \
D_TRACE_DEBUG(mask, (rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, (rpc)->crp_req_hdr.cch_rpcid, \
(rpc)->crp_pub.cr_ep.ep_rank, (rpc)->crp_pub.cr_ep.ep_tag, \
##__VA_ARGS__); \
if ((rpc)->crp_coll) { \
D_TRACE_DEBUG(mask, (rpc), "[opc=%#x (%s:%s) rpcid=%#lx CORPC] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, ##__VA_ARGS__); \
} else { \
D_TRACE_DEBUG(mask, (rpc), \
"[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, (rpc)->crp_pub.cr_ep.ep_rank, \
(rpc)->crp_pub.cr_ep.ep_tag, ##__VA_ARGS__); \
} \
} while (0)

/* Log an error with an RPC descriptor */
Expand All @@ -49,10 +57,16 @@
char *_opc; \
\
crt_opc_decode((rpc)->crp_pub.cr_opc, &_module, &_opc); \
D_TRACE_ERROR((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, (rpc)->crp_req_hdr.cch_rpcid, \
(rpc)->crp_pub.cr_ep.ep_rank, (rpc)->crp_pub.cr_ep.ep_tag, \
##__VA_ARGS__); \
if ((rpc)->crp_coll) { \
D_TRACE_ERROR((rpc), "[opc=%#x (%s:%s) rpcid=%#lx CORPC] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, ##__VA_ARGS__); \
} else { \
D_TRACE_ERROR((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, (rpc)->crp_pub.cr_ep.ep_rank, \
(rpc)->crp_pub.cr_ep.ep_tag, ##__VA_ARGS__); \
} \
} while (0)

/* Log a warning with an RPC descriptor */
Expand All @@ -62,10 +76,16 @@
char *_opc; \
\
crt_opc_decode((rpc)->crp_pub.cr_opc, &_module, &_opc); \
D_TRACE_WARN((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, (rpc)->crp_req_hdr.cch_rpcid, \
(rpc)->crp_pub.cr_ep.ep_rank, (rpc)->crp_pub.cr_ep.ep_tag, \
##__VA_ARGS__); \
if ((rpc)->crp_coll) { \
D_TRACE_WARN((rpc), "[opc=%#x (%s:%s) rpcid=%#lx CORPC] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, ##__VA_ARGS__); \
} else { \
D_TRACE_WARN((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, (rpc)->crp_pub.cr_ep.ep_rank, \
(rpc)->crp_pub.cr_ep.ep_tag, ##__VA_ARGS__); \
} \
} while (0)

/* Log an info message with an RPC descriptor */
Expand All @@ -75,10 +95,16 @@
char *_opc; \
\
crt_opc_decode((rpc)->crp_pub.cr_opc, &_module, &_opc); \
D_TRACE_INFO((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, (rpc)->crp_req_hdr.cch_rpcid, \
(rpc)->crp_pub.cr_ep.ep_rank, (rpc)->crp_pub.cr_ep.ep_tag, \
##__VA_ARGS__); \
if ((rpc)->crp_coll) { \
D_TRACE_INFO((rpc), "[opc=%#x (%s:%s) rpcid=%#lx CORPC] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, ##__VA_ARGS__); \
} else { \
D_TRACE_INFO((rpc), "[opc=%#x (%s:%s) rpcid=%#lx rank:tag=%d:%d] " fmt, \
(rpc)->crp_pub.cr_opc, _module, _opc, \
(rpc)->crp_req_hdr.cch_rpcid, (rpc)->crp_pub.cr_ep.ep_rank, \
(rpc)->crp_pub.cr_ep.ep_tag, ##__VA_ARGS__); \
} \
} while (0)
/**
* If \a cond is false, this is equivalent to an RPC_ERROR (i.e., \a mask is
Expand Down

0 comments on commit 9e6042f

Please sign in to comment.