mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
smb: smbdirect: introduce smbdirect_connection_request_keep_alive()
This a copy of manage_keep_alive_before_sending() in client and server, it will replace these in future. 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:
committed by
Steve French
parent
3514195010
commit
4908d19640
@@ -726,6 +726,25 @@ static u16 smbdirect_connection_grant_recv_credits(struct smbdirect_socket *sc)
|
||||
return new_credits;
|
||||
}
|
||||
|
||||
__maybe_unused /* this is temporary while this file is included in others */
|
||||
static bool smbdirect_connection_request_keep_alive(struct smbdirect_socket *sc)
|
||||
{
|
||||
const struct smbdirect_socket_parameters *sp = &sc->parameters;
|
||||
|
||||
if (sc->idle.keepalive == SMBDIRECT_KEEPALIVE_PENDING) {
|
||||
sc->idle.keepalive = SMBDIRECT_KEEPALIVE_SENT;
|
||||
/*
|
||||
* Now use the keepalive timeout (instead of keepalive interval)
|
||||
* in order to wait for a response
|
||||
*/
|
||||
mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
|
||||
msecs_to_jiffies(sp->keepalive_timeout_msec));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
__maybe_unused /* this is temporary while this file is included in others */
|
||||
static void smbdirect_connection_send_io_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user