2022-03-01 17:43:56 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* Shared Memory Communications over RDMA (SMC-R) and RoCE
|
|
|
|
*
|
|
|
|
* smc_sysctl.c: sysctl interface to SMC subsystem.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2022, Alibaba Inc.
|
|
|
|
*
|
|
|
|
* Author: Tony Lu <tonylu@linux.alibaba.com>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SMC_SYSCTL_H
|
|
|
|
#define _SMC_SYSCTL_H
|
|
|
|
|
|
|
|
#ifdef CONFIG_SYSCTL
|
|
|
|
|
2022-03-07 09:54:24 +08:00
|
|
|
int __net_init smc_sysctl_net_init(struct net *net);
|
|
|
|
void __net_exit smc_sysctl_net_exit(struct net *net);
|
2022-03-01 17:43:56 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2022-03-09 11:30:51 +08:00
|
|
|
static inline int smc_sysctl_net_init(struct net *net)
|
2022-03-01 17:43:56 +08:00
|
|
|
{
|
2022-03-07 09:54:24 +08:00
|
|
|
net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE;
|
2023-11-22 21:52:57 +08:00
|
|
|
net->smc.sysctl_max_links_per_lgr = SMC_LINKS_PER_LGR_MAX_PREFER;
|
2023-11-22 21:52:58 +08:00
|
|
|
net->smc.sysctl_max_conns_per_lgr = SMC_CONN_PER_LGR_PREFER;
|
2022-03-01 17:43:56 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-03-09 11:30:51 +08:00
|
|
|
static inline void smc_sysctl_net_exit(struct net *net) { }
|
2022-03-01 17:43:56 +08:00
|
|
|
|
|
|
|
#endif /* CONFIG_SYSCTL */
|
|
|
|
|
|
|
|
#endif /* _SMC_SYSCTL_H */
|