~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/smb/server/transport_rdma.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 __KSMBD_TRANSPORT_RDMA_H__
  8 #define __KSMBD_TRANSPORT_RDMA_H__
  9 
 10 #define SMBD_DEFAULT_IOSIZE (8 * 1024 * 1024)
 11 #define SMBD_MIN_IOSIZE (512 * 1024)
 12 #define SMBD_MAX_IOSIZE (16 * 1024 * 1024)
 13 
 14 /* SMB DIRECT negotiation request packet [MS-SMBD] 2.2.1 */
 15 struct smb_direct_negotiate_req {
 16         __le16 min_version;
 17         __le16 max_version;
 18         __le16 reserved;
 19         __le16 credits_requested;
 20         __le32 preferred_send_size;
 21         __le32 max_receive_size;
 22         __le32 max_fragmented_size;
 23 } __packed;
 24 
 25 /* SMB DIRECT negotiation response packet [MS-SMBD] 2.2.2 */
 26 struct smb_direct_negotiate_resp {
 27         __le16 min_version;
 28         __le16 max_version;
 29         __le16 negotiated_version;
 30         __le16 reserved;
 31         __le16 credits_requested;
 32         __le16 credits_granted;
 33         __le32 status;
 34         __le32 max_readwrite_size;
 35         __le32 preferred_send_size;
 36         __le32 max_receive_size;
 37         __le32 max_fragmented_size;
 38 } __packed;
 39 
 40 #define SMB_DIRECT_RESPONSE_REQUESTED 0x0001
 41 
 42 /* SMB DIRECT data transfer packet with payload [MS-SMBD] 2.2.3 */
 43 struct smb_direct_data_transfer {
 44         __le16 credits_requested;
 45         __le16 credits_granted;
 46         __le16 flags;
 47         __le16 reserved;
 48         __le32 remaining_data_length;
 49         __le32 data_offset;
 50         __le32 data_length;
 51         __le32 padding;
 52         __u8 buffer[];
 53 } __packed;
 54 
 55 #ifdef CONFIG_SMB_SERVER_SMBDIRECT
 56 int ksmbd_rdma_init(void);
 57 void ksmbd_rdma_destroy(void);
 58 bool ksmbd_rdma_capable_netdev(struct net_device *netdev);
 59 void init_smbd_max_io_size(unsigned int sz);
 60 unsigned int get_smbd_max_read_write_size(void);
 61 #else
 62 static inline int ksmbd_rdma_init(void) { return 0; }
 63 static inline int ksmbd_rdma_destroy(void) { return 0; }
 64 static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; }
 65 static inline void init_smbd_max_io_size(unsigned int sz) { }
 66 static inline unsigned int get_smbd_max_read_write_size(void) { return 0; }
 67 #endif
 68 
 69 #endif /* __KSMBD_TRANSPORT_RDMA_H__ */
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php