nvmf/rdma: Handle CQ resize for iWARP transport
Since iWARP doesn't support CQ resize, we can't
accept new qpairs when CQ size is insufficient.
In other case if we accept new qpairs we can
et CQ overrun and receive IBV_EVENT_CQ_ERR ibv
async event. In that case we will have to close
all qpairs that use this CQ.
Part of the fix for issue #1747
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6106 (master)
(cherry picked from commit 4a2c27f717
)
Change-Id: I30b9163a7c8abb8651f8813c6bbdb80000741c9c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6179
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
081cd04ea2
commit
2a1fe02d98
@ -2,7 +2,7 @@
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright (c) Intel Corporation. All rights reserved.
|
||||
* Copyright (c) 2019, 2020 Mellanox Technologies LTD. All rights reserved.
|
||||
* Copyright (c) 2019-2021 Mellanox Technologies LTD. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -944,6 +944,11 @@ nvmf_rdma_resize_cq(struct spdk_nvmf_rdma_qpair *rqpair, struct spdk_nvmf_rdma_d
|
||||
}
|
||||
|
||||
if (rpoller->num_cqe != num_cqe) {
|
||||
if (device->context->device->transport_type == IBV_TRANSPORT_IWARP) {
|
||||
SPDK_ERRLOG("iWARP doesn't support CQ resize. Current capacity %u, required %u\n"
|
||||
"Using CQ of insufficient size may lead to CQ overrun\n", rpoller->num_cqe, num_cqe);
|
||||
return -1;
|
||||
}
|
||||
if (required_num_wr > device->attr.max_cqe) {
|
||||
SPDK_ERRLOG("RDMA CQE requirement (%d) exceeds device max_cqe limitation (%d)\n",
|
||||
required_num_wr, device->attr.max_cqe);
|
||||
|
Loading…
Reference in New Issue
Block a user