From: Gao Feng <gfree.w...@vip.163.com> When the new RFS table size specified by sysctl equals the old one, there is nothing changed actually. So it is unnecessary to reset the RFS table entris.
Signed-off-by: Gao Feng <gfree.w...@vip.163.com> --- net/core/sysctl_net_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index ea23254..80b6a7e 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -69,11 +69,12 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, int write, } rps_cpu_mask = roundup_pow_of_two(nr_cpu_ids) - 1; sock_table->mask = size - 1; + + for (i = 0; i < size; i++) + sock_table->ents[i] = RPS_NO_CPU; } else sock_table = orig_sock_table; - for (i = 0; i < size; i++) - sock_table->ents[i] = RPS_NO_CPU; } else sock_table = NULL; -- 1.9.1