xref: /linux/fs/smb/common/smbdirect/smbdirect.h (revision 522cd6acd250dea76afaabc52e028fef280fd753)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *   Copyright (C) 2017, Microsoft Corporation.
4  *   Copyright (C) 2018, LG Electronics.
5  */
6 
7 #ifndef __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__
8 #define __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__
9 
10 /* SMB-DIRECT buffer descriptor V1 structure [MS-SMBD] 2.2.3.1 */
11 struct smbdirect_buffer_descriptor_v1 {
12 	__le64 offset;
13 	__le32 token;
14 	__le32 length;
15 } __packed;
16 
17 /*
18  * Connection parameters mostly from [MS-SMBD] 3.1.1.1
19  *
20  * These are setup and negotiated at the beginning of a
21  * connection and remain constant unless explicitly changed.
22  *
23  * Some values are important for the upper layer.
24  */
25 struct smbdirect_socket_parameters {
26 	__u16 recv_credit_max;
27 	__u16 send_credit_target;
28 	__u32 max_send_size;
29 	__u32 max_fragmented_send_size;
30 	__u32 max_recv_size;
31 	__u32 max_fragmented_recv_size;
32 	__u32 max_read_write_size;
33 	__u32 keepalive_interval_msec;
34 	__u32 keepalive_timeout_msec;
35 } __packed;
36 
37 #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__ */
38