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 #ifdef CONFIG_SMB_SERVER_SMBDIRECT 15 int ksmbd_rdma_init(void); 16 void ksmbd_rdma_stop_listening(void); 17 void ksmbd_rdma_destroy(void); 18 bool ksmbd_rdma_capable_netdev(struct net_device *netdev); 19 void init_smbd_max_io_size(unsigned int sz); 20 unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt); 21 #else ksmbd_rdma_init(void)22static inline int ksmbd_rdma_init(void) { return 0; } ksmbd_rdma_stop_listening(void)23static inline void ksmbd_rdma_stop_listening(void) { } ksmbd_rdma_destroy(void)24static inline void ksmbd_rdma_destroy(void) { } ksmbd_rdma_capable_netdev(struct net_device * netdev)25static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; } init_smbd_max_io_size(unsigned int sz)26static inline void init_smbd_max_io_size(unsigned int sz) { } get_smbd_max_read_write_size(struct ksmbd_transport * kt)27static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; } 28 #endif 29 30 #endif /* __KSMBD_TRANSPORT_RDMA_H__ */ 31