aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sysctl_net_core.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-12-07 08:29:10 -0800
committerDavid S. Miller <davem@davemloft.net>2016-12-08 13:18:35 -0500
commit13bfff25c081f4e060af761c4082b5a96f756810 (patch)
tree2c170254731c68a46814d0d1bf296915709afcdf /net/core/sysctl_net_core.c
parentmacsec: remove first zero and add attribute name in comments (diff)
downloadlinux-dev-13bfff25c081f4e060af761c4082b5a96f756810.tar.xz
linux-dev-13bfff25c081f4e060af761c4082b5a96f756810.zip
net: rfs: add a jump label
RFS is not commonly used, so add a jump label to avoid some conditionals in fast path. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sysctl_net_core.c')
-rw-r--r--net/core/sysctl_net_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 0df2aa652530..2a46e4009f62 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -79,10 +79,13 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
if (sock_table != orig_sock_table) {
rcu_assign_pointer(rps_sock_flow_table, sock_table);
- if (sock_table)
+ if (sock_table) {
static_key_slow_inc(&rps_needed);
+ static_key_slow_inc(&rfs_needed);
+ }
if (orig_sock_table) {
static_key_slow_dec(&rps_needed);
+ static_key_slow_dec(&rfs_needed);
synchronize_rcu();
vfree(orig_sock_table);
}