From 7d7b44f2a62b346f848b1d5d12b2bf142597b7f3 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 10 Apr 2019 17:14:44 -0700 Subject: [PATCH] rdma: decrement descriptor before checking SEND_WITH_INVAL We were incrementing over the end of the descriptor list and assigning undefined values to the rsp opcode in SEND_WITH_INVAL case. We were only hitting this error when mixing sgl and inline requests in the same workload. We were just by chance hitting a four bit value that was set to all 1s from the in capsule data from the last request. Change-Id: Ied06356f3d22fa34a2cd869dfad6bdca8720791d Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450873 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/nvmf/rdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 15fcebe65..d144900c8 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -1629,6 +1629,8 @@ nvmf_rdma_request_fill_iovs_multi_sgl(struct spdk_nvmf_rdma_transport *rtranspor } #ifdef SPDK_CONFIG_RDMA_SEND_WITH_INVAL + /* Go back to the last descriptor in the list. */ + desc--; if ((device->attr.device_cap_flags & IBV_DEVICE_MEM_MGT_EXTENSIONS) != 0) { if (desc->keyed.subtype == SPDK_NVME_SGL_SUBTYPE_INVALIDATE_KEY) { rdma_req->rsp.wr.opcode = IBV_WR_SEND_WITH_INV;