1. 02 Oct, 2018 2 commits
    • 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
    • Chuck Lever's avatar
      xprtrdma: xprt_release_rqst_cong is called outside of transport_lock · 91ca1866
      Chuck Lever authored
      Since commit ce7c252a ("SUNRPC: Add a separate spinlock to
      protect the RPC request receive list") the RPC/RDMA reply handler
      has been calling xprt_release_rqst_cong without holding
      xprt->transport_lock.
      
      I think the only way this call is ever made is if the credit grant
      increases and there are RPCs pending. Current server implementations
      do not change their credit grant during operation (except at
      connect time).
      
      Commit e7ce710a
      
       ("xprtrdma: Avoid deadlock when credit window is
      reset") added the ->release_rqst call because UDP invokes
      xprt_adjust_cwnd(), which calls __xprt_put_cong() after adjusting
      xprt->cwnd. Both xprt_release() and ->xprt_release_xprt already wake
      another task in this case, so it is safe to remove this call from
      the reply handler.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      91ca1866
  2. 30 Sep, 2018 4 commits
  3. 29 Sep, 2018 12 commits
  4. 28 Sep, 2018 8 commits
  5. 27 Sep, 2018 14 commits