| 1 |
|
| 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 |
|
| 13 | #ifndef _SMC_SYSCTL_H
|
| 14 | #define _SMC_SYSCTL_H
|
| 15 |
|
| 16 | #ifdef CONFIG_SYSCTL
|
| 17 |
|
| 18 | int __net_init smc_sysctl_net_init(struct net *net);
|
| 19 | void __net_exit smc_sysctl_net_exit(struct net *net);
|
| 20 |
|
| 21 | #else
|
| 22 |
|
| 23 | static inline int smc_sysctl_net_init(struct net *net)
|
| 24 | {
|
| 25 | net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE;
|
| 26 | net->smc.sysctl_max_links_per_lgr = SMC_LINKS_PER_LGR_MAX_PREFER;
|
| 27 | net->smc.sysctl_max_conns_per_lgr = SMC_CONN_PER_LGR_PREFER;
|
| 28 | net->smc.sysctl_smcr_max_send_wr = SMCR_MAX_SEND_WR_DEF;
|
| 29 | net->smc.sysctl_smcr_max_recv_wr = SMCR_MAX_RECV_WR_DEF;
|
| 30 | return 0;
|
| 31 | }
|
| 32 |
|
| 33 | static inline void smc_sysctl_net_exit(struct net *net) { }
|
| 34 |
|
| 35 | #endif
|
| 36 |
|
| 37 | #endif
|