* [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed
@ 2017-05-23 0:45 gfree.wind
2017-05-23 3:02 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: gfree.wind @ 2017-05-23 0:45 UTC (permalink / raw)
To: davem, netdev; +Cc: Gao Feng
From: Gao Feng <gfree.wind@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.wind@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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed
2017-05-23 0:45 [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed gfree.wind
@ 2017-05-23 3:02 ` David Miller
2017-05-23 3:10 ` Gao Feng
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-05-23 3:02 UTC (permalink / raw)
To: gfree.wind; +Cc: netdev
From: gfree.wind@vip.163.com
Date: Tue, 23 May 2017 08:45:11 +0800
> From: Gao Feng <gfree.wind@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.wind@vip.163.com>
It seems like an intentional feature to be able to reset the
table by simply writing the same value to the sysfs knob.
I'm not applying this, sorry.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:Re: [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed
2017-05-23 3:02 ` David Miller
@ 2017-05-23 3:10 ` Gao Feng
0 siblings, 0 replies; 3+ messages in thread
From: Gao Feng @ 2017-05-23 3:10 UTC (permalink / raw)
To: David Miller; +Cc: netdev
At 2017-05-23 11:02:20, "David Miller" <davem@davemloft.net> wrote:
>From: gfree.wind@vip.163.com
>Date: Tue, 23 May 2017 08:45:11 +0800
>
>> From: Gao Feng <gfree.wind@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.wind@vip.163.com>
>
>It seems like an intentional feature to be able to reset the
>table by simply writing the same value to the sysfs knob.
>
>I'm not applying this, sorry.
It is ok.
I just thought maybe it was used to reset, but I didn't find any comment and tips by google.
Regards
Feng
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-23 3:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 0:45 [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed gfree.wind
2017-05-23 3:02 ` David Miller
2017-05-23 3:10 ` Gao Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).