net-sysctl: factor out cpumask parsing helper
authorPaolo Abeni <pabeni@redhat.com>
Tue, 7 Feb 2023 18:44:55 +0000 (19:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Feb 2023 01:45:55 +0000 (17:45 -0800)
commit135746c61fa6d7f66dc079027304eaa4d35fe942
tree95f7db4dac75e9d285537a3d8a0495dc47f93cf5
parent8697a258ae24703267d2a37d91ab757c91ef027e
net-sysctl: factor out cpumask parsing helper

Will be used by the following patch to avoid code
duplication. No functional changes intended.

The only difference is that now flow_limit_cpu_sysctl() will
always compute the flow limit mask on each read operation,
even when read() will not return any byte to user-space.

Note that the new helper is placed under a new #ifdef at
the file start to better fit the usage in the later patch

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/sysctl_net_core.c