]> git.baikalelectronics.ru Git - kernel.git/commit
svcrdma: Fix backchannel return code
authorChuck Lever <chuck.lever@oracle.com>
Fri, 20 Mar 2020 21:32:41 +0000 (17:32 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 18 May 2020 14:21:21 +0000 (10:21 -0400)
commit544447be3422e62dd384b58d0e166aea6dc0c73e
tree71486aa8886e34cc3b50244b6c0832eca7a3c92d
parent7ea9b4dd46a23d4d678fc49d29e93fdcfd6bdf04
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.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c