1. 11 Feb, 2019 2 commits
    • Shiraz, Saleem's avatar
      RDMA/bnxt_re: Use for_each_sg_dma_page iterator on umem SGL · 161ebe24
      Shiraz, Saleem authored
      Use the for_each_sg_dma_page iterator variant to walk the umem DMA-mapped
      SGL and get the page DMA address. This avoids the extra loop to iterate
      pages in the SGE when for_each_sg iterator is used.
      
      Additionally, purge umem->page_shift usage in the driver as its only
      relevant for ODP MRs. Use system page size and shift instead.
      Signed-off-by: default avatarShiraz, Saleem <shiraz.saleem@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      161ebe24
    • Jason Gunthorpe's avatar
      lib/scatterlist: Provide a DMA page iterator · d901b276
      Jason Gunthorpe authored
      Commit 2db76d7c ("lib/scatterlist: sg_page_iter: support sg lists w/o
      backing pages") introduced the sg_page_iter_dma_address() function without
      providing a way to use it in the general case. If the sg_dma_len() is not
      equal to the sg length callers cannot safely use the
      for_each_sg_page/sg_page_iter_dma_address combination.
      
      Resolve this API mistake by providing a DMA specific iterator,
      for_each_sg_dma_page(), that uses the right length so
      sg_page_iter_dma_address() works as expected with all sglists.
      
      A new iterator type is introduced to provide compile-time safety against
      wrongly mixing accessors and iterators.
      
      Acked-by: Christoph Hellwig <hch@lst.de> (for scatterlist)
      Acked-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> (ipu3-cio2)
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d901b276
  2. 09 Feb, 2019 3 commits
    • Raju Rangoju's avatar
      iw_cxgb4: fix srqidx leak during connection abort · f368ff18
      Raju Rangoju authored
      When an application aborts the connection by moving QP from RTS to ERROR,
      then iw_cxgb4's modify_rc_qp() RTS->ERROR logic sets the
      *srqidxp to 0 via t4_set_wq_in_error(&qhp->wq, 0), and aborts the
      connection by calling c4iw_ep_disconnect().
      
      c4iw_ep_disconnect() does the following:
       1. sends up a close_complete_upcall(ep, -ECONNRESET) to libcxgb4.
       2. sends abort request CPL to hw.
      
      But, since the close_complete_upcall() is sent before sending the
      ABORT_REQ to hw, libcxgb4 would fail to release the srqidx if the
      connection holds one. Because, the srqidx is passed up to libcxgb4 only
      after corresponding ABORT_RPL is processed by kernel in abort_rpl().
      
      This patch handle the corner-case by moving the call to
      close_complete_upcall() from c4iw_ep_disconnect() to abort_rpl().  So that
      libcxgb4 is notified about the -ECONNRESET only after abort_rpl(), and
      libcxgb4 can relinquish the srqidx properly.
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      f368ff18
    • Raju Rangoju's avatar
      iw_cxgb4: complete the cached SRQ buffers · 11a27e21
      Raju Rangoju authored
      If TP fetches an SRQ buffer but ends up not using it before the connection
      is aborted, then it passes the index of that SRQ buffer to the host in
      ABORT_REQ_RSS or ABORT_RPL CPL message.
      
      But, if the srqidx field is zero in the received ABORT_RPL or
      ABORT_REQ_RSS CPL, then we need to read the tcb.rq_start field to see if
      it really did have an RQE cached. This works around a case where HW does
      not include the srqidx in the ABORT_RPL/ABORT_REQ_RSS CPL.
      
      The final value of rq_start is the one present in TCB with the
      TF_RX_PDU_OUT bit cleared. So, we need to read the TCB, examine the
      TF_RX_PDU_OUT (bit 49 of t_flags) in order to determine if there's a rx
      PDU feedback event pending.
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      11a27e21
    • Raju Rangoju's avatar
      cxgb4: add tcb flags and tcb rpl struct · e381a1cb
      Raju Rangoju authored
      This patch adds the tcb flags and structures needed for querying tcb
      information.
      Signed-off-by: default avatarRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e381a1cb
  3. 08 Feb, 2019 21 commits
  4. 07 Feb, 2019 14 commits