mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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 <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>
This commit is contained in:
parent
e5fd091663
commit
0b7da58fec
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user