* [PATCH v3 0/2] Re-send with SPDX headers
@ 2018-01-20 16:16 Chuck Lever
2018-01-20 16:16 ` [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values Chuck Lever
2018-01-20 16:16 ` [PATCH v3 2/2] rpcrdma: infrastructure for static trace points in rpcrdma.ko Chuck Lever
0 siblings, 2 replies; 6+ messages in thread
From: Chuck Lever @ 2018-01-20 16:16 UTC (permalink / raw)
To: jgg, dledford, anna.schumaker, leon; +Cc: linux-rdma, linux-nfs
Hi Anna and RDMA maintainers-
Here are the two patches in my "xprtrdma trace points" series for
v4.16 that introduce new files. These have been updated to include
SPDX headers in the new files.
RDMA maintainers, please ACK the first patch. Anna, can you replace
the corresponding patches in your tree with these?
Thanks!
Changes since v2:
- Commit the change to rpcrdma.h _before_ mailing
---
Chuck Lever (2):
rdma/ib: Add trace point macros to display human-readable values
rpcrdma: infrastructure for static trace points in rpcrdma.ko
include/trace/events/rdma.h | 129 +++++++++++++++++++++++++++++++++++++++
include/trace/events/rpcrdma.h | 16 +++++
net/sunrpc/xprtrdma/module.c | 12 ++--
net/sunrpc/xprtrdma/xprt_rdma.h | 2 +
4 files changed, 154 insertions(+), 5 deletions(-)
create mode 100644 include/trace/events/rdma.h
create mode 100644 include/trace/events/rpcrdma.h
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values
2018-01-20 16:16 [PATCH v3 0/2] Re-send with SPDX headers Chuck Lever
@ 2018-01-20 16:16 ` Chuck Lever
2018-01-22 17:47 ` Jason Gunthorpe
2018-01-20 16:16 ` [PATCH v3 2/2] rpcrdma: infrastructure for static trace points in rpcrdma.ko Chuck Lever
1 sibling, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2018-01-20 16:16 UTC (permalink / raw)
To: jgg, dledford, anna.schumaker, leon; +Cc: linux-rdma, linux-nfs
These can be shared with all kernel ULPs, and more can easily be
added as needed.
Note: checkpatch.pl has some heartburn with the TRACE_DEFINE_ENUM
macros and the LIST macros. These follow the same style as other
header files under include/tracing/events , thus should be
considered acceptable exceptions.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
include/trace/events/rdma.h | 129 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)
create mode 100644 include/trace/events/rdma.h
diff --git a/include/trace/events/rdma.h b/include/trace/events/rdma.h
new file mode 100644
index 0000000..aa19afc
--- /dev/null
+++ b/include/trace/events/rdma.h
@@ -0,0 +1,129 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2017 Oracle. All rights reserved.
+ */
+
+/*
+ * enum ib_event_type, from include/rdma/ib_verbs.h
+ */
+
+#define IB_EVENT_LIST \
+ ib_event(CQ_ERR) \
+ ib_event(QP_FATAL) \
+ ib_event(QP_REQ_ERR) \
+ ib_event(QP_ACCESS_ERR) \
+ ib_event(COMM_EST) \
+ ib_event(SQ_DRAINED) \
+ ib_event(PATH_MIG) \
+ ib_event(PATH_MIG_ERR) \
+ ib_event(DEVICE_FATAL) \
+ ib_event(PORT_ACTIVE) \
+ ib_event(PORT_ERR) \
+ ib_event(LID_CHANGE) \
+ ib_event(PKEY_CHANGE) \
+ ib_event(SM_CHANGE) \
+ ib_event(SRQ_ERR) \
+ ib_event(SRQ_LIMIT_REACHED) \
+ ib_event(QP_LAST_WQE_REACHED) \
+ ib_event(CLIENT_REREGISTER) \
+ ib_event(GID_CHANGE) \
+ ib_event_end(WQ_FATAL)
+
+#undef ib_event
+#undef ib_event_end
+
+#define ib_event(x) TRACE_DEFINE_ENUM(IB_EVENT_##x);
+#define ib_event_end(x) TRACE_DEFINE_ENUM(IB_EVENT_##x);
+
+IB_EVENT_LIST
+
+#undef ib_event
+#undef ib_event_end
+
+#define ib_event(x) { IB_EVENT_##x, #x },
+#define ib_event_end(x) { IB_EVENT_##x, #x }
+
+#define rdma_show_ib_event(x) \
+ __print_symbolic(x, IB_EVENT_LIST)
+
+/*
+ * enum ib_wc_status type, from include/rdma/ib_verbs.h
+ */
+#define IB_WC_STATUS_LIST \
+ ib_wc_status(SUCCESS) \
+ ib_wc_status(LOC_LEN_ERR) \
+ ib_wc_status(LOC_QP_OP_ERR) \
+ ib_wc_status(LOC_EEC_OP_ERR) \
+ ib_wc_status(LOC_PROT_ERR) \
+ ib_wc_status(WR_FLUSH_ERR) \
+ ib_wc_status(MW_BIND_ERR) \
+ ib_wc_status(BAD_RESP_ERR) \
+ ib_wc_status(LOC_ACCESS_ERR) \
+ ib_wc_status(REM_INV_REQ_ERR) \
+ ib_wc_status(REM_ACCESS_ERR) \
+ ib_wc_status(REM_OP_ERR) \
+ ib_wc_status(RETRY_EXC_ERR) \
+ ib_wc_status(RNR_RETRY_EXC_ERR) \
+ ib_wc_status(LOC_RDD_VIOL_ERR) \
+ ib_wc_status(REM_INV_RD_REQ_ERR) \
+ ib_wc_status(REM_ABORT_ERR) \
+ ib_wc_status(INV_EECN_ERR) \
+ ib_wc_status(INV_EEC_STATE_ERR) \
+ ib_wc_status(FATAL_ERR) \
+ ib_wc_status(RESP_TIMEOUT_ERR) \
+ ib_wc_status_end(GENERAL_ERR)
+
+#undef ib_wc_status
+#undef ib_wc_status_end
+
+#define ib_wc_status(x) TRACE_DEFINE_ENUM(IB_WC_##x);
+#define ib_wc_status_end(x) TRACE_DEFINE_ENUM(IB_WC_##x);
+
+IB_WC_STATUS_LIST
+
+#undef ib_wc_status
+#undef ib_wc_status_end
+
+#define ib_wc_status(x) { IB_WC_##x, #x },
+#define ib_wc_status_end(x) { IB_WC_##x, #x }
+
+#define rdma_show_wc_status(x) \
+ __print_symbolic(x, IB_WC_STATUS_LIST)
+
+/*
+ * enum rdma_cm_event_type, from include/rdma/rdma_cm.h
+ */
+#define RDMA_CM_EVENT_LIST \
+ rdma_cm_event(ADDR_RESOLVED) \
+ rdma_cm_event(ADDR_ERROR) \
+ rdma_cm_event(ROUTE_RESOLVED) \
+ rdma_cm_event(ROUTE_ERROR) \
+ rdma_cm_event(CONNECT_REQUEST) \
+ rdma_cm_event(CONNECT_RESPONSE) \
+ rdma_cm_event(CONNECT_ERROR) \
+ rdma_cm_event(UNREACHABLE) \
+ rdma_cm_event(REJECTED) \
+ rdma_cm_event(ESTABLISHED) \
+ rdma_cm_event(DISCONNECTED) \
+ rdma_cm_event(DEVICE_REMOVAL) \
+ rdma_cm_event(MULTICAST_JOIN) \
+ rdma_cm_event(MULTICAST_ERROR) \
+ rdma_cm_event(ADDR_CHANGE) \
+ rdma_cm_event_end(TIMEWAIT_EXIT)
+
+#undef rdma_cm_event
+#undef rdma_cm_event_end
+
+#define rdma_cm_event(x) TRACE_DEFINE_ENUM(RDMA_CM_EVENT_##x);
+#define rdma_cm_event_end(x) TRACE_DEFINE_ENUM(RDMA_CM_EVENT_##x);
+
+RDMA_CM_EVENT_LIST
+
+#undef rdma_cm_event
+#undef rdma_cm_event_end
+
+#define rdma_cm_event(x) { RDMA_CM_EVENT_##x, #x },
+#define rdma_cm_event_end(x) { RDMA_CM_EVENT_##x, #x }
+
+#define rdma_show_cm_event(x) \
+ __print_symbolic(x, RDMA_CM_EVENT_LIST)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] rpcrdma: infrastructure for static trace points in rpcrdma.ko
2018-01-20 16:16 [PATCH v3 0/2] Re-send with SPDX headers Chuck Lever
2018-01-20 16:16 ` [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values Chuck Lever
@ 2018-01-20 16:16 ` Chuck Lever
1 sibling, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2018-01-20 16:16 UTC (permalink / raw)
To: jgg, dledford, anna.schumaker, leon; +Cc: linux-rdma, linux-nfs
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
include/trace/events/rpcrdma.h | 16 ++++++++++++++++
net/sunrpc/xprtrdma/module.c | 12 +++++++-----
net/sunrpc/xprtrdma/xprt_rdma.h | 2 ++
3 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 include/trace/events/rpcrdma.h
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h
new file mode 100644
index 0000000..8536d90
--- /dev/null
+++ b/include/trace/events/rpcrdma.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2017 Oracle. All rights reserved.
+ */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM rpcrdma
+
+#if !defined(_TRACE_RPCRDMA_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_RPCRDMA_H
+
+#include <linux/tracepoint.h>
+#include <trace/events/rdma.h>
+
+#endif /* _TRACE_RPCRDMA_H */
+
+#include <trace/define_trace.h>
diff --git a/net/sunrpc/xprtrdma/module.c b/net/sunrpc/xprtrdma/module.c
index 560712b..a762d19 100644
--- a/net/sunrpc/xprtrdma/module.c
+++ b/net/sunrpc/xprtrdma/module.c
@@ -1,18 +1,20 @@
/*
- * Copyright (c) 2015 Oracle. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle. All rights reserved.
*/
/* rpcrdma.ko module initialization
*/
+#include <linux/types.h>
+#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sunrpc/svc_rdma.h>
-#include "xprt_rdma.h"
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
-# define RPCDBG_FACILITY RPCDBG_TRANS
-#endif
+#include <asm/swab.h>
+
+#define CREATE_TRACE_POINTS
+#include "xprt_rdma.h"
MODULE_AUTHOR("Open Grid Computing and Network Appliance, Inc.");
MODULE_DESCRIPTION("RPC/RDMA Transport");
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index 28ae1fb..a1ca1b6 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -675,3 +675,5 @@ static inline void rpcrdma_set_xdrlen(struct xdr_buf *xdr, size_t len)
extern struct xprt_class xprt_rdma_bc;
#endif /* _LINUX_SUNRPC_XPRT_RDMA_H */
+
+#include <trace/events/rpcrdma.h>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values
2018-01-20 16:16 ` [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values Chuck Lever
@ 2018-01-22 17:47 ` Jason Gunthorpe
2018-01-23 16:38 ` Chuck Lever
0 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2018-01-22 17:47 UTC (permalink / raw)
To: Chuck Lever; +Cc: dledford, anna.schumaker, leon, linux-rdma, linux-nfs
On Sat, Jan 20, 2018 at 11:16:25AM -0500, Chuck Lever wrote:
> These can be shared with all kernel ULPs, and more can easily be
> added as needed.
>
> Note: checkpatch.pl has some heartburn with the TRACE_DEFINE_ENUM
> macros and the LIST macros. These follow the same style as other
> header files under include/tracing/events , thus should be
> considered acceptable exceptions.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> include/trace/events/rdma.h | 129 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 129 insertions(+)
> create mode 100644 include/trace/events/rdma.h
Not knowing a lout about trace points, this does seem OK to me:
Acked-by: Jason Gunthorpe <jgg@mellanox.com>
To flow through Anna's tree
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values
2018-01-22 17:47 ` Jason Gunthorpe
@ 2018-01-23 16:38 ` Chuck Lever
2018-01-23 16:42 ` Anna Schumaker
0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2018-01-23 16:38 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: dledford, Anna Schumaker, leon, linux-rdma,
Linux NFS Mailing List
> On Jan 22, 2018, at 9:47 AM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>=20
> On Sat, Jan 20, 2018 at 11:16:25AM -0500, Chuck Lever wrote:
>> These can be shared with all kernel ULPs, and more can easily be
>> added as needed.
>>=20
>> Note: checkpatch.pl has some heartburn with the TRACE_DEFINE_ENUM
>> macros and the LIST macros. These follow the same style as other
>> header files under include/tracing/events , thus should be
>> considered acceptable exceptions.
>>=20
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> include/trace/events/rdma.h | 129 =
+++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 129 insertions(+)
>> create mode 100644 include/trace/events/rdma.h
>=20
> Not knowing a lout about trace points, this does seem OK to me:
>=20
> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
>=20
> To flow through Anna's tree
Thanks, Jason.
--
Chuck Lever
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values
2018-01-23 16:38 ` Chuck Lever
@ 2018-01-23 16:42 ` Anna Schumaker
0 siblings, 0 replies; 6+ messages in thread
From: Anna Schumaker @ 2018-01-23 16:42 UTC (permalink / raw)
To: Chuck Lever, Jason Gunthorpe
Cc: dledford, leon, linux-rdma, Linux NFS Mailing List
On 01/23/2018 11:38 AM, Chuck Lever wrote:
>
>
>> On Jan 22, 2018, at 9:47 AM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
>>
>> On Sat, Jan 20, 2018 at 11:16:25AM -0500, Chuck Lever wrote:
>>> These can be shared with all kernel ULPs, and more can easily be
>>> added as needed.
>>>
>>> Note: checkpatch.pl has some heartburn with the TRACE_DEFINE_ENUM
>>> macros and the LIST macros. These follow the same style as other
>>> header files under include/tracing/events , thus should be
>>> considered acceptable exceptions.
>>>
>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>> include/trace/events/rdma.h | 129 +++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 129 insertions(+)
>>> create mode 100644 include/trace/events/rdma.h
>>
>> Not knowing a lout about trace points, this does seem OK to me:
>>
>> Acked-by: Jason Gunthorpe <jgg@mellanox.com>
>>
>> To flow through Anna's tree
>
> Thanks, Jason.
Thank you! I've added the patches to my tree.
>
> --
> Chuck Lever
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-23 16:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-20 16:16 [PATCH v3 0/2] Re-send with SPDX headers Chuck Lever
2018-01-20 16:16 ` [PATCH v3 1/2] rdma/ib: Add trace point macros to display human-readable values Chuck Lever
2018-01-22 17:47 ` Jason Gunthorpe
2018-01-23 16:38 ` Chuck Lever
2018-01-23 16:42 ` Anna Schumaker
2018-01-20 16:16 ` [PATCH v3 2/2] rpcrdma: infrastructure for static trace points in rpcrdma.ko Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).