From 7517bd6b228a32fc930056c9d4b282ece992582e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 12 Jul 2021 03:11:18 +0000 Subject: [PATCH] isert-scst: Add support for handling RDMA_CV_EVENT_ADDR_CHANGE Re-create the portal RDMA CM ID if the address of that port changes. Signed-off-by: Chesnokov Gleb [ bvanassche: edited patch description ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9483 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_rdma.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index ba1d6cb4e..7709708df 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -1660,6 +1660,14 @@ static int isert_cm_evt_listener_handler(struct rdma_cm_id *cm_id, case RDMA_CM_EVENT_DEVICE_REMOVAL: portal->cm_id = NULL; break; + case RDMA_CM_EVENT_ADDR_CHANGE: + portal->cm_id = isert_setup_id(portal); + if (IS_ERR(portal->cm_id)) { + PRINT_ERROR("Failed to create rdma id, err:%ld\n", + PTR_ERR(portal->cm_id)); + portal->cm_id = NULL; + } + break; default: PRINT_INFO("Listener event:%s(%d), ignored", rdma_event_msg(event), event);