1. 20 5月, 2021 1 次提交
  2. 14 4月, 2021 2 次提交
  3. 26 3月, 2021 2 次提交
    • S
      RDMA/mlx5: Set ODP caps only if device profile support ODP · e5dc370b
      Shay Drory 提交于
      Currently, ODP caps are set during the init stage of mlx5_ib_dev,
      regardless of whether the device profile supports ODP or not.  There is no
      point in setting ODP caps if the device profile doesn't support
      ODP. Hence, move setting the ODP caps to the odp_init stage.
      
      Link: https://lore.kernel.org/r/20210318135259.681264-1-leon@kernel.orgReviewed-by: NMaor Gottlieb <maorg@nvidia.com>
      Signed-off-by: NShay Drory <shayd@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      e5dc370b
    • M
      RDMA: Support more than 255 rdma ports · 1fb7f897
      Mark Bloch 提交于
      Current code uses many different types when dealing with a port of a RDMA
      device: u8, unsigned int and u32. Switch to u32 to clean up the logic.
      
      This allows us to make (at least) the core view consistent and use the
      same type. Unfortunately not all places can be converted. Many uverbs
      functions expect port to be u8 so keep those places in order not to break
      UAPIs.  HW/Spec defined values must also not be changed.
      
      With the switch to u32 we now can support devices with more than 255
      ports. U32_MAX is reserved to make control logic a bit easier to deal
      with. As a device with U32_MAX ports probably isn't going to happen any
      time soon this seems like a non issue.
      
      When a device with more than 255 ports is created uverbs will report the
      RDMA device as having 255 ports as this is the max currently supported.
      
      The verbs interface is not changed yet because the IBTA spec limits the
      port size in too many places to be u8 and all applications that relies in
      verbs won't be able to cope with this change. At this stage, we are
      extending the interfaces that are using vendor channel solely
      
      Once the limitation is lifted mlx5 in switchdev mode will be able to have
      thousands of SFs created by the device. As the only instance of an RDMA
      device that reports more than 255 ports will be a representor device and
      it exposes itself as a RAW Ethernet only device CM/MAD/IPoIB and other
      ULPs aren't effected by this change and their sysfs/interfaces that are
      exposes to userspace can remain unchanged.
      
      While here cleanup some alignment issues and remove unneeded sanity
      checks (mainly in rdmavt),
      
      Link: https://lore.kernel.org/r/20210301070420.439400-1-leon@kernel.orgSigned-off-by: NMark Bloch <mbloch@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      1fb7f897
  4. 24 3月, 2021 1 次提交
  5. 12 3月, 2021 3 次提交
    • J
      RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr() · e6fb246c
      Jason Gunthorpe 提交于
      Now that the SRCU stuff has been removed the entire MR destroy logic can
      be made a lot simpler. Currently there are many different ways to destroy a
      MR and it makes it really hard to do this task correctly. Route all
      destruction through mlx5_ib_dereg_mr() and make it work for all
      situations.
      
      Since it turns out all the different MR types do basically the same thing
      this removes a lot of knowledge of MR internals from ODP and leaves ODP
      just exporting an operation to clean up children.
      
      This fixes a few weird corner cases bugs and firmly uses the correct
      ordering of the MR destruction:
       - Stop parallel access to the mkey via the ODP xarray
       - Stop DMA
       - Release the umem
       - Clean up ODP children
       - Free/Recycle the MR
      
      Link: https://lore.kernel.org/r/20210304120745.1090751-4-leon@kernel.orgSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      e6fb246c
    • J
      RDMA/mlx5: Use a union inside mlx5_ib_mr · f18ec422
      Jason Gunthorpe 提交于
      The struct mlx5_ib_mr can be used for three different things, but only one
      at a time:
      
       - In the user MR cache
       - As a kernel MR
       - As a user MR
      
      Overlay the three things into a single union with the following rules:
      
       - If the mr is found on the cache_ent->head list then it is a cache MR
         and umem == NULL. The entire union is zero after the MR is removed from
         the cache.
      
       - If umem != NULL or type == IB_MR_TYPE_USER then it is a user MR.
      
       - If umem == NULL then it is a kernel MR
      
      This reduces the size of struct mlx5_ib_mr to 552 bytes from 702.
      
      The only place the three flows overlap in the code is during dereg, so add
      a few extra checks along there.
      
      Link: https://lore.kernel.org/r/20210304120745.1090751-3-leon@kernel.orgSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      f18ec422
    • J
      RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr · a639e667
      Jason Gunthorpe 提交于
      All of the ODP code assumes when it calls mlx5_mr_cache_alloc() the ODP
      related fields are zero'd. This is true if the MR was just allocated, but
      if the MR is recycled through the cache then the values are never zero'd.
      
      This causes a bug in the odp_stats, they don't reset when the MR is
      reallocated, also is_odp_implicit is never 0'd.
      
      So we can use memset on a block of the mlx5_ib_mr reorganize the structure
      to put all the data that can be zero'd by the cache at the end.
      
      It is organized as an anonymous struct because the next patch will make
      this a union.
      
      Delete the unused smr_info. Don't set the kernel only desc_size on the
      user path. No longer any need to zero mr->parent before freeing it, the
      memset() will get it now.
      
      Fixes: a3de94e3 ("IB/mlx5: Introduce ODP diagnostic counters")
      Link: https://lore.kernel.org/r/20210304120745.1090751-2-leon@kernel.orgSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      a639e667
  6. 09 2月, 2021 1 次提交
  7. 06 2月, 2021 4 次提交
  8. 21 1月, 2021 1 次提交
  9. 20 1月, 2021 1 次提交
  10. 08 12月, 2020 3 次提交
  11. 06 12月, 2020 1 次提交
  12. 17 11月, 2020 4 次提交
  13. 03 11月, 2020 11 次提交
  14. 02 10月, 2020 1 次提交
  15. 30 9月, 2020 4 次提交