
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IARV38 -------------------------------- Fix the below error when disable CONFIG_PROC_SYSCTL compile macro: aarch64-linux-gnu-ld: net/ipv4/tcp.o: in function \ `net_rship_refresh_timeout': include/net/net_rship.h:92: undefined reference to \ `net_numa_rship_jiffies' Fixes: 64ba5634c4c6 ("net: add some bpf hooks in tcp stack for network numa relationship") Signed-off-by: Liu Jian <liujian56@huawei.com> --- net/core/filter.c | 3 +++ net/core/sysctl_net_core.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/filter.c b/net/core/filter.c index 9ef84e86b5c5..a4e94a3e8c76 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -10787,7 +10787,10 @@ static int __init gnet_bpf_init(void) } late_initcall(gnet_bpf_init); +#if defined(CONFIG_SCHED_TASK_RELATIONSHIP) #include <linux/sched/relationship.h> +unsigned long net_numa_rship_jiffies __read_mostly = HZ / 10; /* 100ms */ +#endif BPF_CALL_3(bpf_sched_net_rship_submit, void *, reqbuf, size_t, sz, u64, flags) { #if defined(CONFIG_SCHED_TASK_RELATIONSHIP) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index ea0ee32f27bb..8ac874fd9271 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -47,7 +47,6 @@ int sysctl_devconf_inherit_init_net __read_mostly; EXPORT_SYMBOL(sysctl_devconf_inherit_init_net); #ifdef CONFIG_SCHED_TASK_RELATIONSHIP -unsigned long net_numa_rship_jiffies __read_mostly = HZ / 10; /* 100ms */ static unsigned long net_numa_rship_ms_min = HZ / 10; /* 100ms */ static unsigned long net_numa_rship_ms_max = 100 * HZ; /* 100s */ #endif -- 2.34.1