]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Reset credit grant properly after a disconnect
authorChuck Lever <chuck.lever@oracle.com>
Mon, 1 Oct 2018 18:25:14 +0000 (14:25 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 2 Oct 2018 19:45:09 +0000 (15:45 -0400)
commit4ad80d835a1122b4bf4a6723763663f9fe702cd0
tree3da7a736bd81ed85e41470b4b16f66d2dc943aeb
parent070ada82e792836dcecf2f32ded11fba8292e6e8
xprtrdma: Reset credit grant properly after a disconnect

On a fresh connection, an RPC/RDMA client is supposed to send only
one RPC Call until it gets a credit grant in the first RPC Reply
from the server [RFC 8166, Section 3.3.3].

There is a bug in the Linux client's credit accounting mechanism
introduced by commit e70f01d8867a ("xprtrdma: Avoid deadlock when
credit window is reset"). On connect, it simply dumps all pending
RPC Calls onto the new connection.

Servers have been tolerant of this bad behavior. Currently no server
implementation ever changes its credit grant over reconnects, and
servers always repost enough Receives before connections are fully
established.

To correct this issue, ensure that the client resets both the credit
grant _and_ the congestion window when handling a reconnect.

Fixes: e70f01d8867a ("xprtrdma: Avoid deadlock when credit ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
net/sunrpc/xprtrdma/transport.c