Commit 1570c87f authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

rdma: disbale send with inval on Soft-RoCE NICs



Currently, the RXE kernel driver does not support send with invalidate.
There is a change to the kernel making its way downstream that will
enable this feature. At that point, we can conditionally enable
send-with-invalidate based on the kernel version.

Change-Id: I05c7bcbf8ec944be89c10bdf6ccc3229e4586914
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422579


Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent b4de8e11
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -1145,10 +1145,20 @@ spdk_nvmf_rdma_request_parse_sgl(struct spdk_nvmf_rdma_transport *rtransport,
			return -1;
		}
#ifdef SPDK_CONFIG_RDMA_SEND_WITH_INVAL
		/**
		 * These vendor IDs are assigned by the IEEE and an ID of 0 implies Soft-RoCE.
		 * The Soft-RoCE RXE driver does not currently support send with invalidate.
		 * There are changes making their way through the kernel now that will enable
		 * this feature. When they are merged, we can conditionally enable this feature.
		 *
		 * todo: enable this for versions of the kernel rxe driver that support it.
		 */
		if (device->attr.vendor_id != 0) {
			if (sgl->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY) {
				rdma_req->rsp.wr.opcode = IBV_WR_SEND_WITH_INV;
				rdma_req->rsp.wr.imm_data = sgl->keyed.key;
			}
		}
#endif

		/* fill request length and populate iovs */