From: Stefan Metzmacher Date: Mon, 15 Sep 2025 05:55:19 +0000 (+0200) Subject: smb: client: make use of smbdirect_connection_qp_event_handler() X-Git-Tag: v7.1-rc1~128^2~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b7da58fec9ae573263571d5574d6a44f52c8223;p=thirdparty%2Flinux.git smb: client: make use of smbdirect_connection_qp_event_handler() 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 Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Acked-by: Namjae Jeon Signed-off-by: Steve French --- diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 0ccea382fdaaf..3463d9fabe313 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -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;