1. 29 May, 2018 1 commit
    • Parav Pandit's avatar
      IB/core: Fix error code for invalid GID entry · a840c93c
      Parav Pandit authored
      When a GID entry is invalid EAGAIN is returned. This is an incorrect error
      code, there is nothing that will make this GID entry valid again in
      bounded time.
      
      Some user space tools fail incorrectly if EAGAIN is returned here, and
      this represents a small ABI change from earlier kernels.
      
      The first patch in the Fixes list makes entries that were valid before
      to become invalid, allowing this code to trigger, while the second patch
      in the Fixes list introduced the wrong EAGAIN.
      
      Therefore revert the return result to EINVAL which matches the historical
      expectations of the ibv_query_gid_type() API of the libibverbs user space
      library.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Fixes: 03db3a2d ("IB/core: Add RoCE GID table management")
      Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a840c93c
  2. 28 May, 2018 1 commit
    • Arnd Bergmann's avatar
      IB: Revert "remove redundant INFINIBAND kconfig dependencies" · 533d1dae
      Arnd Bergmann authored
      Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends
      on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a
      link error when another driver using it is built-in. The
      INFINIBAND_ADDR_TRANS dependency is insufficient here as this is
      a 'bool' symbol that does not force anything to be a module in turn.
      
      fs/cifs/smbdirect.o: In function `smbd_disconnect_rdma_work':
      smbdirect.c:(.text+0x1e4): undefined reference to `rdma_disconnect'
      net/9p/trans_rdma.o: In function `rdma_request':
      trans_rdma.c:(.text+0x7bc): undefined reference to `rdma_disconnect'
      net/9p/trans_rdma.o: In function `rdma_destroy_trans':
      trans_rdma.c:(.text+0x830): undefined reference to `ib_destroy_qp'
      trans_rdma.c:(.text+0x858): undefined reference to `ib_dealloc_pd'
      
      Fixes: 9533b292 ("IB: remove redundant INFINIBAND kconfig dependencies")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarGreg Thelen <gthelen@google.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      533d1dae
  3. 25 May, 2018 1 commit
    • Devesh Sharma's avatar
      RDMA/bnxt_re: Fix broken RoCE driver due to recent L2 driver changes · 6e04b103
      Devesh Sharma authored
      The recent changes in Broadcom's ethernet driver(L2 driver) broke
      RoCE functionality in terms of MSIx vector allocation and
      de-allocation.
      
      There is a possibility that L2 driver would initiate MSIx vector
      reallocation depending upon the requests coming from administrator.
      In such cases L2 driver needs to free up all the MSIx vectors
      allocated previously and reallocate/initialize those.
      
      If RoCE driver is loaded and reshuffling is attempted, there will be
      kernel crashes because RoCE driver would still be holding the MSIx
      vectors but L2 driver would attempt to free in-use vectors. Thus
      leading to a kernel crash.
      
      Making changes in roce driver to fix crashes described above.
      As part of solution L2 driver tells RoCE driver to release
      the MSIx vector whenever there is a need. When RoCE driver
      get message it sync up with all the running tasklets and IRQ
      handlers and releases the vectors. L2 driver send one more
      message to RoCE driver to resume the MSIx vectors. L2 driver
      guarantees that RoCE vector do not change during reshuffling.
      
      Fixes: ec86f14e ("bnxt_en: Add ULP calls to stop and restart IRQs.")
      Fixes: 08654eb2 ("bnxt_en: Change IRQ assignment for RDMA driver.")
      Signed-off-by: default avatarDevesh Sharma <devesh.sharma@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      6e04b103
  4. 23 May, 2018 4 commits
  5. 15 May, 2018 1 commit
    • Lidong Chen's avatar
      IB/umem: Use the correct mm during ib_umem_release · 8e907ed4
      Lidong Chen authored
      User-space may invoke ibv_reg_mr and ibv_dereg_mr in different threads.
      
      If ibv_dereg_mr is called after the thread which invoked ibv_reg_mr has
      exited, get_pid_task will return NULL and ib_umem_release will not
      decrease mm->pinned_vm.
      
      Instead of using threads to locate the mm, use the overall tgid from the
      ib_ucontext struct instead. This matches the behavior of ODP and
      disassociate in handling the mm of the process that called ibv_reg_mr.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 87773dd5 ("IB: ib_umem_release() should decrement mm->pinned_vm from ib_umem_get")
      Signed-off-by: default avatarLidong Chen <lidongchen@tencent.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      8e907ed4
  6. 09 May, 2018 23 commits
  7. 03 May, 2018 8 commits
  8. 30 Apr, 2018 1 commit