1. 25 Jan, 2020 2 commits
    • Danit Goldberg's avatar
      IB/mlx5: Return the administrative GUID if exists · 4bbd4923
      Danit Goldberg authored
      A user can change the operational GUID (a.k.a affective GUID) through
      link/infiniband. Therefore it is preferred to return the currently set
      GUID if it exists instead of the operational.
      
      This way the PF can query which VF GUID will be set in the next bind.  In
      order to align with MAC address, zero is returned if administrative GUID
      is not set.
      
      For example, before setting administrative GUID:
       $ ip link show
       ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 4092 qdisc mq state UP mode DEFAULT group default qlen 256
       link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
       vf 0     link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
       spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state auto, trust off, query_rss off
      
      Then:
      
       $ ip link set ib0 vf 0 node_guid 11:00:af:21:cb:05:11:00
       $ ip link set ib0 vf 0 port_guid 22:11:af:21:cb:05:11:00
      
      After setting administrative GUID:
       $ ip link show
       ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 4092 qdisc mq state UP mode DEFAULT group default qlen 256
       link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
       vf 0     link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff,
       spoof checking off, NODE_GUID 11:00:af:21:cb:05:11:00, PORT_GUID 22:11:af:21:cb:05:11:00, link-state auto, trust off, query_rss off
      
      Fixes: 9c0015ef ("IB/mlx5: Implement callbacks for getting VFs GUID attributes")
      Link: https://lore.kernel.org/r/20200116120048.12744-1-leon@kernel.orgSigned-off-by: default avatarDanit Goldberg <danitg@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      4bbd4923
    • Jason Gunthorpe's avatar
      RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence · 6b3712c0
      Jason Gunthorpe authored
      The set of entry->driver_removed is missing locking, protect it with
      xa_lock() which is held by the only reader.
      
      Otherwise readers may continue to see driver_removed = false after
      rdma_user_mmap_entry_remove() returns and may continue to try and
      establish new mmaps.
      
      Fixes: 3411f9f0 ("RDMA/core: Create mmap database and cookie helper functions")
      Link: https://lore.kernel.org/r/20200115202041.GA17199@ziepe.caReviewed-by: default avatarGal Pressman <galpress@amazon.com>
      Acked-by: default avatarMichal Kalderon <michal.kalderon@marvell.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      6b3712c0
  2. 21 Jan, 2020 1 commit
    • Jason Gunthorpe's avatar
      Merge tag 'rds-odp-for-5.5' into rdma.git for-next · e8b3a426
      Jason Gunthorpe authored
      From https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma
      
      Leon Romanovsky says:
      
      ====================
      Use ODP MRs for kernel ULPs
      
      The following series extends MR creation routines to allow creation of
      user MRs through kernel ULPs as a proxy. The immediate use case is to
      allow RDS to work over FS-DAX, which requires ODP (on-demand-paging)
      MRs to be created and such MRs were not possible to create prior this
      series.
      
      The first part of this patchset extends RDMA to have special verb
      ib_reg_user_mr(). The common use case that uses this function is a
      userspace application that allocates memory for HCA access but the
      responsibility to register the memory at the HCA is on an kernel ULP.
      This ULP acts as an agent for the userspace application.
      
      The second part provides advise MR functionality for ULPs. This is
      integral part of ODP flows and used to trigger pagefaults in advance
      to prepare memory before running working set.
      
      The third part is actual user of those in-kernel APIs.
      ====================
      
      * tag 'rds-odp-for-5.5':
        net/rds: Use prefetch for On-Demand-Paging MR
        net/rds: Handle ODP mr registration/unregistration
        net/rds: Detect need of On-Demand-Paging memory registration
        RDMA/mlx5: Fix handling of IOVA != user_va in ODP paths
        IB/mlx5: Mask out unsupported ODP capabilities for kernel QPs
        RDMA/mlx5: Don't fake udata for kernel path
        IB/mlx5: Add ODP WQE handlers for kernel QPs
        IB/core: Add interface to advise_mr for kernel users
        IB/core: Introduce ib_reg_user_mr
        IB: Allow calls to ib_umem_get from kernel ULPs
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e8b3a426
  3. 18 Jan, 2020 2 commits
  4. 16 Jan, 2020 22 commits
  5. 15 Jan, 2020 10 commits
  6. 13 Jan, 2020 3 commits