Commit b3d03daa authored by Chuck Lever's avatar Chuck Lever Committed by Jason Gunthorpe

RDMA/core: Move the rdma_show_ib_cm_event() macro

Refactor: Make it globally available in the utilities header.

Link: https://lore.kernel.org/r/159767239131.2968.9520990257041764685.stgit@klimt.1015granger.netSigned-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 8d9290a4
...@@ -17,46 +17,6 @@ ...@@ -17,46 +17,6 @@
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <trace/events/rdma.h> #include <trace/events/rdma.h>
/*
* enum ib_cm_event_type, from include/rdma/ib_cm.h
*/
#define IB_CM_EVENT_LIST \
ib_cm_event(REQ_ERROR) \
ib_cm_event(REQ_RECEIVED) \
ib_cm_event(REP_ERROR) \
ib_cm_event(REP_RECEIVED) \
ib_cm_event(RTU_RECEIVED) \
ib_cm_event(USER_ESTABLISHED) \
ib_cm_event(DREQ_ERROR) \
ib_cm_event(DREQ_RECEIVED) \
ib_cm_event(DREP_RECEIVED) \
ib_cm_event(TIMEWAIT_EXIT) \
ib_cm_event(MRA_RECEIVED) \
ib_cm_event(REJ_RECEIVED) \
ib_cm_event(LAP_ERROR) \
ib_cm_event(LAP_RECEIVED) \
ib_cm_event(APR_RECEIVED) \
ib_cm_event(SIDR_REQ_ERROR) \
ib_cm_event(SIDR_REQ_RECEIVED) \
ib_cm_event_end(SIDR_REP_RECEIVED)
#undef ib_cm_event
#undef ib_cm_event_end
#define ib_cm_event(x) TRACE_DEFINE_ENUM(IB_CM_##x);
#define ib_cm_event_end(x) TRACE_DEFINE_ENUM(IB_CM_##x);
IB_CM_EVENT_LIST
#undef ib_cm_event
#undef ib_cm_event_end
#define ib_cm_event(x) { IB_CM_##x, #x },
#define ib_cm_event_end(x) { IB_CM_##x, #x }
#define rdma_show_ib_cm_event(x) \
__print_symbolic(x, IB_CM_EVENT_LIST)
DECLARE_EVENT_CLASS(cma_fsm_class, DECLARE_EVENT_CLASS(cma_fsm_class,
TP_PROTO( TP_PROTO(
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
/* /*
* enum ib_event_type, from include/rdma/ib_verbs.h * enum ib_event_type, from include/rdma/ib_verbs.h
*/ */
#define IB_EVENT_LIST \ #define IB_EVENT_LIST \
ib_event(CQ_ERR) \ ib_event(CQ_ERR) \
ib_event(QP_FATAL) \ ib_event(QP_FATAL) \
...@@ -90,6 +89,46 @@ IB_WC_STATUS_LIST ...@@ -90,6 +89,46 @@ IB_WC_STATUS_LIST
#define rdma_show_wc_status(x) \ #define rdma_show_wc_status(x) \
__print_symbolic(x, IB_WC_STATUS_LIST) __print_symbolic(x, IB_WC_STATUS_LIST)
/*
* enum ib_cm_event_type, from include/rdma/ib_cm.h
*/
#define IB_CM_EVENT_LIST \
ib_cm_event(REQ_ERROR) \
ib_cm_event(REQ_RECEIVED) \
ib_cm_event(REP_ERROR) \
ib_cm_event(REP_RECEIVED) \
ib_cm_event(RTU_RECEIVED) \
ib_cm_event(USER_ESTABLISHED) \
ib_cm_event(DREQ_ERROR) \
ib_cm_event(DREQ_RECEIVED) \
ib_cm_event(DREP_RECEIVED) \
ib_cm_event(TIMEWAIT_EXIT) \
ib_cm_event(MRA_RECEIVED) \
ib_cm_event(REJ_RECEIVED) \
ib_cm_event(LAP_ERROR) \
ib_cm_event(LAP_RECEIVED) \
ib_cm_event(APR_RECEIVED) \
ib_cm_event(SIDR_REQ_ERROR) \
ib_cm_event(SIDR_REQ_RECEIVED) \
ib_cm_event_end(SIDR_REP_RECEIVED)
#undef ib_cm_event
#undef ib_cm_event_end
#define ib_cm_event(x) TRACE_DEFINE_ENUM(IB_CM_##x);
#define ib_cm_event_end(x) TRACE_DEFINE_ENUM(IB_CM_##x);
IB_CM_EVENT_LIST
#undef ib_cm_event
#undef ib_cm_event_end
#define ib_cm_event(x) { IB_CM_##x, #x },
#define ib_cm_event_end(x) { IB_CM_##x, #x }
#define rdma_show_ib_cm_event(x) \
__print_symbolic(x, IB_CM_EVENT_LIST)
/* /*
* enum rdma_cm_event_type, from include/rdma/rdma_cm.h * enum rdma_cm_event_type, from include/rdma/rdma_cm.h
*/ */
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/sunrpc/rpc_rdma_cid.h> #include <linux/sunrpc/rpc_rdma_cid.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <rdma/ib_cm.h>
#include <trace/events/rdma.h> #include <trace/events/rdma.h>
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment