]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: client: make use of smbdirect_connection_qp_event_handler()
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Sep 2025 05:55:19 +0000 (07:55 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:21 +0000 (21:58 -0500)
This is a copy of smbd_qp_async_error_upcall()...

It will allow more code to be moved to common functions
soon.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c

index 0ccea382fdaaf1992f876a9c9f9b7c2b06cd43b2..3463d9fabe3131fafc76bd03103de0f5b2382cab 100644 (file)
@@ -362,26 +362,6 @@ static int smbd_conn_upcall(
        return 0;
 }
 
-/* Upcall from RDMA QP */
-static void
-smbd_qp_async_error_upcall(struct ib_event *event, void *context)
-{
-       struct smbdirect_socket *sc = context;
-
-       log_rdma_event(ERR, "%s on device %s socket %p\n",
-               ib_event_msg(event->event), event->device->name, sc);
-
-       switch (event->event) {
-       case IB_EVENT_CQ_ERR:
-       case IB_EVENT_QP_FATAL:
-               smbdirect_socket_schedule_cleanup(sc, -ECONNABORTED);
-               break;
-
-       default:
-               break;
-       }
-}
-
 static inline void *smbdirect_send_io_payload(struct smbdirect_send_io *request)
 {
        return (void *)request->packet;
@@ -1724,7 +1704,7 @@ static struct smbd_connection *_smbd_get_connection(
        }
 
        memset(&qp_attr, 0, sizeof(qp_attr));
-       qp_attr.event_handler = smbd_qp_async_error_upcall;
+       qp_attr.event_handler = smbdirect_connection_qp_event_handler;
        qp_attr.qp_context = sc;
        qp_attr.cap = qp_cap;
        qp_attr.sq_sig_type = IB_SIGNAL_REQ_WR;