• C
    xprtrdma: Reset credit grant properly after a disconnect · 5fac1c6c
    Chuck Lever 提交于
    [ Upstream commit ef739b2175dde9c05594f768cb78149f1ce2ac36 ]
    
    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 e7ce710a ("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: e7ce710a ("xprtrdma: Avoid deadlock when credit ... ")
    Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
    Cc: stable@kernel.org
    Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    5fac1c6c
svc_rdma_backchannel.c 8.7 KB