smc_sysctl.h 691 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Shared Memory Communications over RDMA (SMC-R) and RoCE
  4. *
  5. * smc_sysctl.c: sysctl interface to SMC subsystem.
  6. *
  7. * Copyright (c) 2022, Alibaba Inc.
  8. *
  9. * Author: Tony Lu <[email protected]>
  10. *
  11. */
  12. #ifndef _SMC_SYSCTL_H
  13. #define _SMC_SYSCTL_H
  14. #ifdef CONFIG_SYSCTL
  15. int __net_init smc_sysctl_net_init(struct net *net);
  16. void __net_exit smc_sysctl_net_exit(struct net *net);
  17. #else
  18. static inline int smc_sysctl_net_init(struct net *net)
  19. {
  20. net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE;
  21. return 0;
  22. }
  23. static inline void smc_sysctl_net_exit(struct net *net) { }
  24. #endif /* CONFIG_SYSCTL */
  25. #endif /* _SMC_SYSCTL_H */