Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 4:55 PM Eric Dumazet wrote: > > On 6/14/19 4:45 PM, Alexei Starovoitov wrote: > > On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > > > maxlen is ignored by proc_do_static_key(), right? > > That is right, I was not sure putting a zero or sizeof(int) > would ma

Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Eric Dumazet
On 6/14/19 4:45 PM, Alexei Starovoitov wrote: > On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > maxlen is ignored by proc_do_static_key(), right? That is right, I was not sure putting a zero or sizeof(int) would make sense here. Using sizeof(...key) is consistent with other sy

Re: [PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Alexei Starovoitov
On Fri, Jun 14, 2019 at 04:22:18PM -0700, Eric Dumazet wrote: > Convert proc_dointvec_minmax_bpf_stats() into a more generic > helper, since we are going to use jump labels more often. > > Note that sysctl_bpf_stats_enabled is removed, since > it is no longer needed/used. > > Signed-off-by: Eric

[PATCH net 1/4] sysctl: define proc_do_static_key()

2019-06-14 Thread Eric Dumazet
Convert proc_dointvec_minmax_bpf_stats() into a more generic helper, since we are going to use jump labels more often. Note that sysctl_bpf_stats_enabled is removed, since it is no longer needed/used. Signed-off-by: Eric Dumazet --- include/linux/bpf.h| 1 - include/linux/sysctl.h | 3 +++