Skip to content

Commit dce8047

Browse files
metze-sambasmfrench
authored andcommitted
smb: smbdirect: introduce smbdirect_socket_parameters
This is the next step in the direction of a common smbdirect layer. Cc: Steve French <[email protected]> Cc: Tom Talpey <[email protected]> Cc: Long Li <[email protected]> Cc: Namjae Jeon <[email protected]> Cc: Hyunchul Lee <[email protected]> Cc: Meetakshi Setiya <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Stefan Metzmacher <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent c3011b9 commit dce8047

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

fs/smb/client/smbdirect.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <rdma/rdma_cm.h>
1616
#include <linux/mempool.h>
1717

18+
#include "../common/smbdirect/smbdirect.h"
1819
#include "../common/smbdirect/smbdirect_socket.h"
1920

2021
extern int rdma_readwrite_threshold;

fs/smb/common/smbdirect/smbdirect.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,24 @@ struct smbdirect_buffer_descriptor_v1 {
1414
__le32 length;
1515
} __packed;
1616

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+
1737
#endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__ */

fs/smb/common/smbdirect/smbdirect_socket.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ struct smbdirect_socket {
3636
struct ib_qp *qp;
3737
struct ib_device *dev;
3838
} ib;
39+
40+
struct smbdirect_socket_parameters parameters;
3941
};
4042

4143
#endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__ */

0 commit comments

Comments
 (0)