• Jason Gunthorpe's avatar
    IB/rxe: Revise the ib_wr_opcode enum · 19278c44
    Jason Gunthorpe authored
    [ Upstream commit 9a59739bd01f77db6fbe2955a4fce165f0f43568 ]
    
    This enum has become part of the uABI, as both RXE and the
    ib_uverbs_post_send() command expect userspace to supply values from this
    enum. So it should be properly placed in include/uapi/rdma.
    
    In userspace this enum is called 'enum ibv_wr_opcode' as part of
    libibverbs.h. That enum defines different values for IB_WR_LOCAL_INV,
    IB_WR_SEND_WITH_INV, and IB_WR_LSO. These were introduced (incorrectly, it
    turns out) into libiberbs in 2015.
    
    The kernel has changed its mind on the numbering for several of the IB_WC
    values over the years, but has remained stable on IB_WR_LOCAL_INV and
    below.
    
    Based on this we can conclude that there is no real user space user of the
    values beyond IB_WR_ATOMIC_FETCH_AND_ADD, as they have never worked via
    rdma-core. This is confirmed by inspection, only rxe uses the kernel enum
    and implements the latter operations. rxe has clearly never worked with
    these attributes from userspace. Other drivers that support these opcodes
    implement the functionality without calling out to the kernel.
    
    To make IB_WR_SEND_WITH_INV and related work for RXE in userspace we
    choose to renumber the IB_WR enum in the kernel to match the uABI that
    userspace has bee using since before Soft RoCE was merged. This is an
    overall simpler configuration for the whole software stack, and obviously
    can't break anything existing.
    Reported-by: default avatarSeth Howell <seth.howell@intel.com>
    Tested-by: default avatarSeth Howell <seth.howell@intel.com>
    Fixes: 8700e3e7 ("Soft RoCE driver")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
    19278c44
Name
Last commit
Last update
..
ib.h Loading commit data...
ib_addr.h Loading commit data...
ib_cache.h Loading commit data...
ib_cm.h Loading commit data...
ib_fmr_pool.h Loading commit data...
ib_hdrs.h Loading commit data...
ib_mad.h Loading commit data...
ib_marshall.h Loading commit data...
ib_pack.h Loading commit data...
ib_pma.h Loading commit data...
ib_sa.h Loading commit data...
ib_smi.h Loading commit data...
ib_umem.h Loading commit data...
ib_umem_odp.h Loading commit data...
ib_verbs.h Loading commit data...
iw_cm.h Loading commit data...
iw_portmap.h Loading commit data...
mr_pool.h Loading commit data...
opa_addr.h Loading commit data...
opa_port_info.h Loading commit data...
opa_smi.h Loading commit data...
opa_vnic.h Loading commit data...
rdma_cm.h Loading commit data...
rdma_cm_ib.h Loading commit data...
rdma_netlink.h Loading commit data...
rdma_vt.h Loading commit data...
rdmavt_cq.h Loading commit data...
rdmavt_mr.h Loading commit data...
rdmavt_qp.h Loading commit data...
rw.h Loading commit data...
uverbs_ioctl.h Loading commit data...
uverbs_std_types.h Loading commit data...
uverbs_types.h Loading commit data...