mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:00:07 +02:00
smb: smbdirect: introduce smbdirect_socket.rw_io.credits
This will be used by the server to manage the state for RDMA read/write requests. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Acked-by: 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> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
cce93d2d0c
commit
90255ed467
|
|
@ -159,6 +159,27 @@ struct smbdirect_socket {
|
|||
bool full_packet_received;
|
||||
} reassembly;
|
||||
} recv_io;
|
||||
|
||||
/*
|
||||
* The state for RDMA read/write requests on the server
|
||||
*/
|
||||
struct {
|
||||
/*
|
||||
* The credit state for the send side
|
||||
*/
|
||||
struct {
|
||||
/*
|
||||
* The maximum number of rw credits
|
||||
*/
|
||||
size_t max;
|
||||
/*
|
||||
* The number of pages per credit
|
||||
*/
|
||||
size_t num_pages;
|
||||
atomic_t count;
|
||||
wait_queue_head_t wait_queue;
|
||||
} credits;
|
||||
} rw_io;
|
||||
};
|
||||
|
||||
static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc)
|
||||
|
|
@ -184,6 +205,9 @@ static __always_inline void smbdirect_socket_init(struct smbdirect_socket *sc)
|
|||
INIT_LIST_HEAD(&sc->recv_io.reassembly.list);
|
||||
spin_lock_init(&sc->recv_io.reassembly.lock);
|
||||
init_waitqueue_head(&sc->recv_io.reassembly.wait_queue);
|
||||
|
||||
atomic_set(&sc->rw_io.credits.count, 0);
|
||||
init_waitqueue_head(&sc->rw_io.credits.wait_queue);
|
||||
}
|
||||
|
||||
struct smbdirect_send_io {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user