• Chuck Lever's avatar
    xprtrdma: Reset credit grant properly after a disconnect · ef739b21
    Chuck Lever authored
    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: default avatarChuck Lever <chuck.lever@oracle.com>
    Cc: stable@kernel.org
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    ef739b21
transport.c 24.6 KB