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> Change-Id: I30b9163a7c8abb8651f8813c6bbdb80000741c9c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6106 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
137866e573
commit
4a2c27f717
@ -2,7 +2,7 @@
|
|||||||
* BSD LICENSE
|
* BSD LICENSE
|
||||||
*
|
*
|
||||||
* Copyright (c) Intel Corporation. All rights reserved.
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* 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 (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) {
|
if (required_num_wr > device->attr.max_cqe) {
|
||||||
SPDK_ERRLOG("RDMA CQE requirement (%d) exceeds device max_cqe limitation (%d)\n",
|
SPDK_ERRLOG("RDMA CQE requirement (%d) exceeds device max_cqe limitation (%d)\n",
|
||||||
required_num_wr, device->attr.max_cqe);
|
required_num_wr, device->attr.max_cqe);
|
||||||
|
Loading…
Reference in New Issue
Block a user