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 #include <linux/types.h> 11 12 /* SMB-DIRECT buffer descriptor V1 structure [MS-SMBD] 2.2.3.1 */ 13 struct smbdirect_buffer_descriptor_v1 { 14 __le64 offset; 15 __le32 token; 16 __le32 length; 17 } __packed; 18 19 /* 20 * Connection parameters mostly from [MS-SMBD] 3.1.1.1 21 * 22 * These are setup and negotiated at the beginning of a 23 * connection and remain constant unless explicitly changed. 24 * 25 * Some values are important for the upper layer. 26 */ 27 struct smbdirect_socket_parameters { 28 __u32 resolve_addr_timeout_msec; 29 __u32 resolve_route_timeout_msec; 30 __u32 rdma_connect_timeout_msec; 31 __u32 negotiate_timeout_msec; 32 __u8 initiator_depth; 33 __u8 responder_resources; 34 __u16 recv_credit_max; 35 __u16 send_credit_target; 36 __u32 max_send_size; 37 __u32 max_fragmented_send_size; 38 __u32 max_recv_size; 39 __u32 max_fragmented_recv_size; 40 __u32 max_read_write_size; 41 __u32 max_frmr_depth; 42 __u32 keepalive_interval_msec; 43 __u32 keepalive_timeout_msec; 44 } __packed; 45 46 #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__ */ 47