Skip to content
Permalink
H-kon-Bugge/RD…
Switch branches/tags

Commits on Jun 17, 2021

  1. RDMA/cma: Remove unnecessary INIT->INIT transition

    In rdma_create_qp(), a connected QP will be transitioned to the INIT
    state.
    
    Afterwards, the QP will be transitioned to the RTR state by the
    cma_modify_qp_rtr() function. But this function starts by performing
    an ib_modify_qp() to the INIT state again, before another
    ib_modify_qp() is performed to transition the QP to the RTR state.
    
    Hence, there is no need to transition the QP to the INIT state in
    rdma_create_qp().
    
    Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
    Hakon-Bugge authored and intel-lab-lkp committed Jun 17, 2021

Commits on Jun 10, 2021

  1. RDMA/irdma: Store PBL info address a pointer type

    The level1 PBL info address is stored as u64.  This requires casting
    through a uinptr_t before used as a pointer type.
    
    And this leads to sparse warning such as this when uinptr_t is missing:
    
    drivers/infiniband/hw/irdma/hw.c: In function 'irdma_destroy_virt_aeq':
    drivers/infiniband/hw/irdma/hw.c:579:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      579 |  dma_addr_t *pg_arr = (dma_addr_t *)aeq->palloc.level1.addr;
    
    This can be fixed using an intermediate uintptr_t, but rather it is better
    to fix the structure irdm_pble_info to store the address as u64* and the
    VA it is assigned in irdma_chunk as a void*. This greatly reduces the
    casting on this address.
    
    Fixes: 44d9e52 ("RDMA/irdma: Implement device initialization definitions")
    Link: https://lore.kernel.org/r/20210609234924.938-1-shiraz.saleem@intel.com
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    shirazsaleem authored and jgunthorpe committed Jun 10, 2021
  2. IB/cm: Remove dgid from the cm_id_priv av

    It turns out this is only being used to store the LID for SIDR mode to
    search the RB tree for request de-duplication. Store the LID value
    directly and don't pretend it is a GID.
    
    Link: https://lore.kernel.org/r/2e7c87b6f662c90c642fc1838e363ad3e6ef14a4.1623236345.git.leonro@nvidia.com
    Reviewed-by: Mark Zhang <markzhang@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    jgunthorpe committed Jun 10, 2021

Commits on Jun 8, 2021

  1. RDMA/irdma: Use list_last_entry/list_first_entry

    Use list_last_entry and list_first_entry instead of using prev and next
    pointers.
    
    Link: https://lore.kernel.org/r/20210608211415.680-1-shiraz.saleem@intel.com
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    shirazsaleem authored and jgunthorpe committed Jun 8, 2021
  2. RDMA/irdma: Use list_move instead of list_del/list_add

    Using list_move() instead of list_del() + list_add().
    
    Link: https://lore.kernel.org/r/20210608031041.2820429-1-libaokun1@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Baokun Li authored and jgunthorpe committed Jun 8, 2021
  3. RDMA/core: Use refcount_t instead of atomic_t on refcount of ib_uverb…

    …s_device
    
    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-8-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  4. RDMA/ipoib: Use refcount_t instead of atomic_t for reference counting

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-13-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  5. RDMA/cxgb4: Use refcount_t instead of atomic_t for reference counting

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-12-git-send-email-liweihang@huawei.com
    Cc: Potnuri Bharat Teja <bharat@chelsio.com>
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  6. RDMA/hns: Use refcount_t instead of atomic_t for QP reference counting

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-11-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  7. RDMA/hns: Use refcount_t instead of atomic_t for SRQ reference counting

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-10-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  8. RDMA/hns: Use refcount_t instead of atomic_t for CQ reference counting

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-9-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  9. RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_port

    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-6-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  10. RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_me…

    …mber
    
    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-5-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  11. RDMA/core: Remove refcount from struct ib_mad_snoop_private

    The member is never used, delete it.
    
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    jgunthorpe committed Jun 8, 2021
  12. RDMA/core: Use refcount_t instead of atomic_t on refcount of iwpm_adm…

    …in_data
    
    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks. Increase refcount_t from 0 to 1 is
    regarded as there is a risk about use-after-free. So it should be set to 1
    directly during initialization.
    
    Link: https://lore.kernel.org/r/1622194663-2383-3-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021
  13. RDMA/core: Use refcount_t instead of atomic_t on refcount of iwcm_id_…

    …private
    
    The refcount_t API will WARN on underflow and overflow of a reference
    counter, and avoid use-after-free risks.
    
    Link: https://lore.kernel.org/r/1622194663-2383-2-git-send-email-liweihang@huawei.com
    Signed-off-by: Weihang Li <liweihang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Weihang Li authored and jgunthorpe committed Jun 8, 2021

Commits on Jun 7, 2021

  1. RDMA/irdma: Fix return error sign from irdma_modify_qp

    There is a typo in the returned error code sign from irdma_modify_qp()
    when the attr_mask is not supported - Fix it.
    
    Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs")
    Link: https://lore.kernel.org/r/20210607221543.254144-1-kamalheib1@gmail.com
    Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Kamalheib authored and jgunthorpe committed Jun 7, 2021
  2. RDMA/irdma: Fix spelling mistake "Allocal" -> "Allocate"

    There is a spelling mistake in a literal string. Fix it.
    
    Link: https://lore.kernel.org/r/20210607113345.82206-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Colin Ian King authored and jgunthorpe committed Jun 7, 2021
  3. RDMA/irdma: remove redundant initialization of variable val

    The variable val is being initialized with a value that is never
    read, it is being updated later on. The assignment is redundant and
    can be removed.
    
    Link: https://lore.kernel.org/r/20210605131347.26293-1-colin.king@canonical.com
    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Colin Ian King authored and jgunthorpe committed Jun 7, 2021
  4. RDMA/irdma: remove extraneous indentation on a statement

    A single statement is indented one level too deeply, clean up the
    code by removing the extraneous tab.
    
    Link: https://lore.kernel.org/r/20210605130400.25987-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Colin Ian King authored and jgunthorpe committed Jun 7, 2021
  5. RDMA/irdma: Fix issues with u8 left shift operation

    The shifting of the u8 integer info->map[i] the left will be promoted
    to a 32 bit signed int and then sign-extended to a u64. In the event
    that the top bit of the u8 is set then all then all the upper 32 bits
    of the u64 end up as also being set because of the sign-extension.
    Fix this by casting the u8 values to a u64 before the left shift. This
    
    Link: https://lore.kernel.org/r/20210605122059.25105-1-colin.king@canonical.com
    Addresses-Coverity: ("Unitentional integer overflow / bad shift operation")
    Fixes: 3f49d68 ("RDMA/irdma: Implement HW Admin Queue OPs")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Colin Ian King authored and jgunthorpe committed Jun 7, 2021

Commits on Jun 4, 2021

  1. RDMA/cxgb4: Fix missing error code in create_qp()

    The error code is missing in this code scenario so 0 will be returned. Add
    the error code '-EINVAL' to the return value 'ret'.
    
    Eliminates the follow smatch warning:
    
    drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'.
    
    Link: https://lore.kernel.org/r/1622545669-20625-1-git-send-email-jiapeng.chong@linux.alibaba.com
    Reported-by: Abaci Robot <abaci@linux.alibaba.com>
    Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Jiapeng Chong authored and jgunthorpe committed Jun 4, 2021

Commits on Jun 3, 2021

  1. RDMA/bnxt_re: Update maintainers list

    Updated the maintainers list and removed non-active members.
    
    Link: https://lore.kernel.org/r/20210603131534.982257-3-devesh.sharma@broadcom.com
    Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Devesh Sharma authored and jgunthorpe committed Jun 3, 2021
  2. RDMA/bnxt_re: Enable global atomic ops if platform supports

    Enabling Atomic operations for Gen P5 devices if the underlying platform
    supports global atomic ops.
    
    Link: https://lore.kernel.org/r/20210603131534.982257-2-devesh.sharma@broadcom.com
    Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Devesh Sharma authored and jgunthorpe committed Jun 3, 2021
  3. RDMA/rxe: Fix failure during driver load

    To avoid the following failure when trying to load the rdma_rxe module
    while IPv6 is disabled, add a check for EAFNOSUPPORT and ignore the
    failure, also delete the needless debug print from rxe_setup_udp_tunnel().
    
    $ modprobe rdma_rxe
    modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted
    
    Fixes: dfdd615 ("IB/rxe: Fix kernel panic in udp_setup_tunnel")
    Link: https://lore.kernel.org/r/20210603090112.36341-1-kamalheib1@gmail.com
    Reported-by: Yi Zhang <yi.zhang@redhat.com>
    Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Kamalheib authored and jgunthorpe committed Jun 3, 2021
  4. RDMA/rxe: Protext kernel index from user space

    In order to prevent user space from modifying the index that belongs to
    the kernel for shared queues let the kernel use a local copy of the index
    and copy any new values of that index to the shared rxe_queue_bus struct.
    
    This adds more switch statements which decreases the performance of the
    queue API. Move the type into the parameter list for these functions so
    that the compiler can optimize out the switch statements when the explicit
    type is known. Modify all the calls in the driver on performance paths to
    pass in the explicit queue type.
    
    Link: https://lore.kernel.org/r/20210527194748.662636-4-rpearsonhpe@gmail.com
    Link: https://lore.kernel.org/linux-rdma/20210526165239.GP1002214@@nvidia.com/
    Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Bob Pearson authored and jgunthorpe committed Jun 3, 2021
  5. RDMA/rxe: Protect user space index loads/stores

    Modify the queue APIs to protect all user space index loads with
    smp_load_acquire() and all user space index stores with
    smp_store_release(). Base this on the types of the queues which can be one
    of ..KERNEL, ..FROM_USER, ..TO_USER. Kernel space indices are protected by
    locks which also provide memory barriers.
    
    Link: https://lore.kernel.org/r/20210527194748.662636-3-rpearsonhpe@gmail.com
    Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Bob Pearson authored and jgunthorpe committed Jun 3, 2021
  6. RDMA/rxe: Add a type flag to rxe_queue structs

    To create optimal code only want to use smp_load_acquire() and
    smp_store_release() for user indices in rxe_queue APIs since kernel
    indices are protected by locks which also act as memory barriers. By
    adding a type to the queues we can determine which indices need to be
    protected.
    
    Link: https://lore.kernel.org/r/20210527194748.662636-2-rpearsonhpe@gmail.com
    Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Bob Pearson authored and jgunthorpe committed Jun 3, 2021

Commits on Jun 2, 2021

  1. Merge branch 'irdma' into rdma.git for-next

    Shiraz Saleem says:
    
    ====================
    Add Intel Ethernet Protocol Driver for RDMA (irdma)
    
    The following patch series introduces a unified Intel Ethernet Protocol
    Driver for RDMA (irdma) for the X722 iWARP device and a new E810 device
    which supports iWARP and RoCEv2. The irdma module replaces the legacy
    i40iw module for X722 and extends the ABI already defined for i40iw. It is
    backward compatible with legacy X722 rdma-core provider (libi40iw).
    
    X722 and E810 are PCI network devices that are RDMA capable. The RDMA
    block of this parent device is represented via an auxiliary device
    exported to 'irdma' using the core auxiliary bus infrastructure recently
    added for 5.11 kernel.  The parent PCI netdev drivers 'i40e' and 'ice'
    register auxiliary RDMA devices with private data/ops encapsulated that
    bind to auxiliary drivers registered in irdma module.
    
    Currently, default is RoCEv2 for E810. Runtime support for protocol switch
    to iWARP will be made available via devlink in a future patch.
    ====================
    
    Link: https://lore.kernel.org/r/20210602205138.889-1-shiraz.saleem@intel.com
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    
    * branch 'irdma':
      RDMA/irdma: Update MAINTAINERS file
      RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw
      RDMA/irdma: Add ABI definitions
      RDMA/irdma: Add dynamic tracing for CM
      RDMA/irdma: Add miscellaneous utility definitions
      RDMA/irdma: Add user/kernel shared libraries
      RDMA/irdma: Add RoCEv2 UD OP support
      RDMA/irdma: Implement device supported verb APIs
      RDMA/irdma: Add PBLE resource manager
      RDMA/irdma: Add connection manager
      RDMA/irdma: Add QoS definitions
      RDMA/irdma: Add privileged UDA queue implementation
      RDMA/irdma: Add HMC backing store setup functions
      RDMA/irdma: Implement HW Admin Queue OPs
      RDMA/irdma: Implement device initialization definitions
      RDMA/irdma: Register auxiliary driver and implement private channel OPs
      i40e: Register auxiliary devices to provide RDMA
      i40e: Prep i40e header for aux bus conversion
      ice: Register auxiliary device to provide RDMA
      ice: Implement iidc operations
      ice: Initialize RDMA support
      iidc: Introduce iidc.h
      i40e: Replace one-element array with flexible-array member
    jgunthorpe committed Jun 2, 2021
  2. RDMA/irdma: Update MAINTAINERS file

    Add maintainer entry for irdma driver.
    
    Link: https://lore.kernel.org/r/20210602205138.889-17-shiraz.saleem@intel.com
    Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    shirazsaleem authored and jgunthorpe committed Jun 2, 2021
  3. RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw

    Add Kconfig and Makefile to build irdma driver.
    
    Remove i40iw driver and add an alias in irdma.
    
    Remove legacy exported symbols i40e_register_client
    and i40e_unregister_client from i40e as they are no
    longer used.
    
    irdma is the replacement driver that supports X722.
    
    Link: https://lore.kernel.org/r/20210602205138.889-16-shiraz.saleem@intel.com
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    shirazsaleem authored and jgunthorpe committed Jun 2, 2021
  4. RDMA/irdma: Add ABI definitions

    Add ABI definitions for irdma.
    
    Link: https://lore.kernel.org/r/20210602205138.889-15-shiraz.saleem@intel.com
    Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    mustafakismail authored and jgunthorpe committed Jun 2, 2021
  5. RDMA/irdma: Add dynamic tracing for CM

    Add dynamic tracing functionality to debug connection
    management issues.
    
    Link: https://lore.kernel.org/r/20210602205138.889-14-shiraz.saleem@intel.com
    Signed-off-by: "Michael J. Ruhl" <michael.j.ruhl@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    mjruhl authored and jgunthorpe committed Jun 2, 2021
  6. RDMA/irdma: Add miscellaneous utility definitions

    Add miscellaneous utility functions and headers.
    
    Link: https://lore.kernel.org/r/20210602205138.889-13-shiraz.saleem@intel.com
    Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    mustafakismail authored and jgunthorpe committed Jun 2, 2021
  7. RDMA/irdma: Add user/kernel shared libraries

    Building the WQE descriptors for different verb
    operations are similar in kernel and user-space.
    Add these shared libraries.
    
    Link: https://lore.kernel.org/r/20210602205138.889-12-shiraz.saleem@intel.com
    Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    mustafakismail authored and jgunthorpe committed Jun 2, 2021
Older