History

svcrdma: Fix backchannel return code

Way back when I was writing the RPC/RDMA server-side backchannel code, I misread the TCP backchannel reply handler logic. When svc_tcp_recvfrom() successfully receives a backchannel reply, it does not return -EAGAIN. It sets XPT_DATA and returns zero. Update svc_rdma_recvfrom() to return zero. Here, XPT_DATA doesn't need to be set again: it is set whenever a new message is received, behind a spin lock in a single threaded context. Also, if handling the cb reply is not successful, the message is simply dropped. There's no special message framing to deal with as there is in the TCP case. Now that the handle_bc_reply() return value is ignored, I've removed the dprintk call sites in the error exit of handle_bc_reply() in favor of trace points in other areas that already report the error cases.

Chuck Lever committed 6 years ago

Commit ea740bd1 parent dbc17ac3 files · +17 −37Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/sunrpc/svc_rdma.h+2−3
@@ -160,9 +160,8 @@ struct svc_rdma_send_ctxt { · 159 unmodified lines
160};160};
161 161
162/* svc_rdma_backchannel.c */162/* svc_rdma_backchannel.c */
163extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt,163extern void svc_rdma_handle_bc_reply(struct svc_rqst *rqstp,
164 __be32 *rdma_resp,164 struct svc_rdma_recv_ctxt *rctxt);
165 struct xdr_buf *rcvbuf);
166 165
167/* svc_rdma_recvfrom.c */166/* svc_rdma_recvfrom.c */
168extern void svc_rdma_recv_ctxts_destroy(struct svcxprt_rdma *rdma);167extern void svc_rdma_recv_ctxts_destroy(struct svcxprt_rdma *rdma);