1. 05 Sep, 2018 23 commits
  2. 04 Sep, 2018 3 commits
  3. 01 Sep, 2018 9 commits
  4. 30 Aug, 2018 5 commits
    • Vijay Immanuel's avatar
      IB/rxe: fixes for rdma read retry · 030e46e4
      Vijay Immanuel authored
      When a read request is retried for the remaining partial
      data, the response may restart from read response first
      or read response only. So support those cases.
      
      Do not advance the comp psn beyond the current wqe's last_psn
      as that could skip over an entire read wqe and will cause the
      req_retry() logic to set an incorrect req psn.
      An example sequence is as follows:
      Write        PSN 40 -- this is the current WQE.
      Read request PSN 41
      Write        PSN 42
      Receive ACK  PSN 42 -- this will complete the current WQE
      for PSN 40, and set the comp psn to 42 which is a problem
      because the read request at PSN 41 has been skipped over.
      So when req_retry() tries to retransmit the read request,
      it sets the req psn to 42 which is incorrect.
      
      When retrying a read request, calculate the number of psns
      completed based on the dma resid instead of the wqe first_psn.
      The wqe first_psn could have moved if the read request was
      retried multiple times.
      
      Set the reth length to the dma resid to handle read retries for
      the remaining partial data.
      Signed-off-by: default avatarVijay Immanuel <vijayi@attalasystems.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      030e46e4
    • Vijay Immanuel's avatar
      IB/rxe: avoid back-to-back retries · 4e4c53df
      Vijay Immanuel authored
      Error retries can occur due to timeouts, NAKs or receiving
      packets beyond the current read request. Avoid back-to-back
      retries due to packet processing, by only retrying the initial
      attempt immediately. Subsequent retries must be due to timeouts.
      
      Continue to process completion packets after scheduling a retry.
      Signed-off-by: default avatarVijay Immanuel <vijayi@attalasystems.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      4e4c53df
    • Vijay Immanuel's avatar
      IB/rxe: fix for duplicate request processing and ack psns · b97db585
      Vijay Immanuel authored
      Don't reset the resp opcode for a replayed read response.
      The resp opcode could be in the middle of a write or send
      sequence, when the duplicate read request was received.
      An example sequence is as follows:
      - Receive read request for 12KB PSN 20. Transmit read response
        first, middle and last with PSNs 20,21,22.
      - Receive write first PSN 23.
        At this point the resp psn is 24 and resp opcode is write first.
      - The sender notices that PSN 20 is dropped and retransmits.
        Receive read request for 12KB PSN 20. Transmit read response
        first, middle and last with PSNs 20,21,22. The resp opcode is
        set to -1, the resp psn remains 24.
      - Receive write first PSN 23. This is processed by duplicate_request().
        The resp opcode remains -1 and resp psn remains 24.
      - Receive write middle PSN 24. check_op_seq() reports a missing
        first error since the resp opcode is -1.
      
      When sending an ack for a duplicate send or write request,
      use the psn of the previous ack sent. Do not use the psn
      of a read response for the ack.
      An example sequence is as follows:
      - Receive write PSN 30. Transmit ACK for PSN 30.
      - Receive read request 4KB PSN 31. Transmit read response with
        PSN 31. The resp psn is now 32.
      - The sender notices that PSN 30 is dropped and retransmits.
        Receive write PSN 30. duplicate_request() sends an ACK with
        PSN 31. That is incorrect since PSN 31 was a read request.
      Signed-off-by: default avatarVijay Immanuel <vijayi@attalasystems.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      b97db585
    • Parav Pandit's avatar
      IB/rxe: Refactor lookup memory function · 1703129e
      Parav Pandit authored
      Consolidate all error checks under single if() condition and use helper
      unlikely() macro for them, in addition drop unneeded goto labels.
      
      rxe_pool_get_index() already provides RB tree based efficient lookup.
      Avoid doing extra checks for error cases which are rare and already
      covered by rxe_pool_get_index().
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      1703129e
    • Parav Pandit's avatar
      IB/rxe: Avoid NULL check when search is successful · 536a631d
      Parav Pandit authored
      While performing lookup in a pool, if entry is found, take the
      reference right there, instead of checking again outside the loop and
      save one branch.
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      536a631d