| 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 | __u32 resolve_addr_timeout_msec; |
| 27 | __u32 resolve_route_timeout_msec; |
| 28 | __u32 rdma_connect_timeout_msec; |
| 29 | __u32 negotiate_timeout_msec; |
| 30 | __u8 initiator_depth; |
| 31 | __u8 responder_resources; |
| 32 | __u16 recv_credit_max; |
| 33 | __u16 send_credit_target; |
| 34 | __u32 max_send_size; |
| 35 | __u32 max_fragmented_send_size; |
| 36 | __u32 max_recv_size; |
| 37 | __u32 max_fragmented_recv_size; |
| 38 | __u32 max_read_write_size; |
| 39 | __u32 max_frmr_depth; |
| 40 | __u32 keepalive_interval_msec; |
| 41 | __u32 keepalive_timeout_msec; |
| 42 | } __packed; |
| 43 | |
| 44 | #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__ */ |
| 45 | |