diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-10-01 14:26:13 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-10-03 09:14:57 -0400 |
commit | f9521d53e804b9721c2829858f6d5bf6f470e734 (patch) | |
tree | cd78af4cbff892a223ca9abfecaefc150b5e4f9a | |
parent | 31e62d25b5b8155b2ff6a7c6d31256475dbbcc7a (diff) |
xprtrdma: Rename rpcrdma_qp_async_error_upcall
Clean up: Use a function name that is consistent with the RDMA core
API and with other consumers. Because this is a function that is
invoked from outside the rpcrdma.ko module, add an appropriate
documenting comment.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r-- | include/trace/events/rpcrdma.h | 2 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h index 3b9de5b6b725..a4d9ff9c36d4 100644 --- a/include/trace/events/rpcrdma.h +++ b/include/trace/events/rpcrdma.h | |||
@@ -377,7 +377,7 @@ DEFINE_RXPRT_EVENT(xprtrdma_reinsert); | |||
377 | DEFINE_RXPRT_EVENT(xprtrdma_reconnect); | 377 | DEFINE_RXPRT_EVENT(xprtrdma_reconnect); |
378 | DEFINE_RXPRT_EVENT(xprtrdma_inject_dsc); | 378 | DEFINE_RXPRT_EVENT(xprtrdma_inject_dsc); |
379 | 379 | ||
380 | TRACE_EVENT(xprtrdma_qp_error, | 380 | TRACE_EVENT(xprtrdma_qp_event, |
381 | TP_PROTO( | 381 | TP_PROTO( |
382 | const struct rpcrdma_xprt *r_xprt, | 382 | const struct rpcrdma_xprt *r_xprt, |
383 | const struct ib_event *event | 383 | const struct ib_event *event |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index abbd3cdc259a..b62260aa348b 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -127,14 +127,22 @@ rpcrdma_disconnect_worker(struct work_struct *work) | |||
127 | xprt_force_disconnect(&r_xprt->rx_xprt); | 127 | xprt_force_disconnect(&r_xprt->rx_xprt); |
128 | } | 128 | } |
129 | 129 | ||
130 | /** | ||
131 | * rpcrdma_qp_event_handler - Handle one QP event (error notification) | ||
132 | * @event: details of the event | ||
133 | * @context: ep that owns QP where event occurred | ||
134 | * | ||
135 | * Called from the RDMA provider (device driver) possibly in an interrupt | ||
136 | * context. | ||
137 | */ | ||
130 | static void | 138 | static void |
131 | rpcrdma_qp_async_error_upcall(struct ib_event *event, void *context) | 139 | rpcrdma_qp_event_handler(struct ib_event *event, void *context) |
132 | { | 140 | { |
133 | struct rpcrdma_ep *ep = context; | 141 | struct rpcrdma_ep *ep = context; |
134 | struct rpcrdma_xprt *r_xprt = container_of(ep, struct rpcrdma_xprt, | 142 | struct rpcrdma_xprt *r_xprt = container_of(ep, struct rpcrdma_xprt, |
135 | rx_ep); | 143 | rx_ep); |
136 | 144 | ||
137 | trace_xprtrdma_qp_error(r_xprt, event); | 145 | trace_xprtrdma_qp_event(r_xprt, event); |
138 | pr_err("rpcrdma: %s on device %s ep %p\n", | 146 | pr_err("rpcrdma: %s on device %s ep %p\n", |
139 | ib_event_msg(event->event), event->device->name, context); | 147 | ib_event_msg(event->event), event->device->name, context); |
140 | 148 | ||
@@ -547,7 +555,7 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia, | |||
547 | if (rc) | 555 | if (rc) |
548 | return rc; | 556 | return rc; |
549 | 557 | ||
550 | ep->rep_attr.event_handler = rpcrdma_qp_async_error_upcall; | 558 | ep->rep_attr.event_handler = rpcrdma_qp_event_handler; |
551 | ep->rep_attr.qp_context = ep; | 559 | ep->rep_attr.qp_context = ep; |
552 | ep->rep_attr.srq = NULL; | 560 | ep->rep_attr.srq = NULL; |
553 | ep->rep_attr.cap.max_send_sge = max_sge; | 561 | ep->rep_attr.cap.max_send_sge = max_sge; |