linux-stable/include/rdma
Jason Gunthorpe 19278c4470 IB/rxe: Revise the ib_wr_opcode enum
[ Upstream commit 9a59739bd0 ]

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: Seth Howell <seth.howell@intel.com>
Tested-by: Seth Howell <seth.howell@intel.com>
Fixes: 8700e3e7c4 ("Soft RoCE driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
2019-05-16 19:42:25 +02:00
..
ib.h new helper: uaccess_kernel() 2017-03-28 16:43:25 -04:00
ib_addr.h RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 14:26:29 +02:00
ib_cache.h RDMA/core: export ib_get_cached_port_state 2017-01-12 23:00:00 -05:00
ib_cm.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
ib_fmr_pool.h
ib_hdrs.h IB/hfi1: Add functions to parse BTH/IB headers 2017-06-27 16:56:33 -04:00
ib_mad.h IB/core: Enforce security on management datagrams 2017-05-23 12:27:21 -04:00
ib_marshall.h IB/core: Convert ah_attr from OPA to IB when copying to user 2017-08-08 14:47:18 -04:00
ib_pack.h IB/core: Fix calculation of maximum RoCE MTU 2017-12-20 10:10:35 +01:00
ib_pma.h IB/core: Display extended counter set if available 2015-12-23 15:58:30 -05:00
ib_sa.h RDMA/SA: Fix kernel panic in CMA request handler flow 2017-06-01 17:20:14 -04:00
ib_smi.h IB/core: Move SM class defines from ib_mad.h to ib_smi.h 2015-09-03 15:50:32 -04:00
ib_umem.h IB/umem: Use the correct mm during ib_umem_release 2018-05-30 07:51:49 +02:00
ib_umem_odp.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
ib_verbs.h IB/rxe: Revise the ib_wr_opcode enum 2019-05-16 19:42:25 +02:00
iw_cm.h rdma_cm: add rdma_reject_msg() helper function 2016-12-14 11:38:28 -05:00
iw_portmap.h
mr_pool.h IB/core: add a simple MR pool 2016-05-13 13:37:18 -04:00
opa_addr.h IB/hfi1: Add 16B UD support 2017-08-22 14:22:37 -04:00
opa_port_info.h IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
opa_smi.h IB/mad: Eliminate redundant SM class version defines for OPA 2016-12-14 11:01:58 -05:00
opa_vnic.h IB/hfi1: Add support to receive 16B bypass packets 2017-08-22 14:22:37 -04:00
rdma_cm.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
rdma_cm_ib.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
rdma_netlink.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rdma_vt.h IB/hfi1: Optimize kthread pointer locking when queuing CQ entries 2018-07-03 11:24:54 +02:00
rdmavt_cq.h IB/rdmavt: Add completion queue functions 2016-03-10 20:37:24 -05:00
rdmavt_mr.h IB/rdmavt: Handle dereg of inuse MRs properly 2017-08-28 19:12:31 -04:00
rdmavt_qp.h IB/rdmavt: Handle dereg of inuse MRs properly 2017-08-28 19:12:31 -04:00
rw.h rdma core: Add rdma_rw_mr_payload() 2017-09-05 15:15:30 -04:00
uverbs_ioctl.h IB/core: Assign root to all drivers 2017-08-31 08:35:14 -04:00
uverbs_std_types.h IB/core: Assign root to all drivers 2017-08-31 08:35:14 -04:00
uverbs_types.h IB/core: Explicitly destroy an object while keeping uobject 2017-08-31 08:35:11 -04:00