* [PATCH net-next] ipv6: avoid zeroing per cpu data again
@ 2017-10-09 13:01 Eric Dumazet
2017-10-09 13:22 ` Tejun Heo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2017-10-09 13:01 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Martin KaFai Lau, Tejun Heo
From: Eric Dumazet <edumazet@google.com>
per cpu allocations are already zeroed, no need to clear them again.
Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Tejun Heo <tj@kernel.org>
---
net/ipv6/route.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 606e80325b21c0e10a02e9c7d5b3fcfbfc26a003..3d7d4e09301ef4deae1985412599c6f4e973c46f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -377,17 +377,7 @@ struct rt6_info *ip6_dst_alloc(struct net *net,
if (rt) {
rt->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, GFP_ATOMIC);
- if (rt->rt6i_pcpu) {
- int cpu;
-
- for_each_possible_cpu(cpu) {
- struct rt6_info **p;
-
- p = per_cpu_ptr(rt->rt6i_pcpu, cpu);
- /* no one shares rt */
- *p = NULL;
- }
- } else {
+ if (!rt->rt6i_pcpu) {
dst_release_immediate(&rt->dst);
return NULL;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv6: avoid zeroing per cpu data again
2017-10-09 13:01 [PATCH net-next] ipv6: avoid zeroing per cpu data again Eric Dumazet
@ 2017-10-09 13:22 ` Tejun Heo
2017-10-09 16:41 ` Martin KaFai Lau
2017-10-09 17:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2017-10-09 13:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Martin KaFai Lau
On Mon, Oct 09, 2017 at 06:01:37AM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> per cpu allocations are already zeroed, no need to clear them again.
>
> Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Tejun Heo <tj@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv6: avoid zeroing per cpu data again
2017-10-09 13:01 [PATCH net-next] ipv6: avoid zeroing per cpu data again Eric Dumazet
2017-10-09 13:22 ` Tejun Heo
@ 2017-10-09 16:41 ` Martin KaFai Lau
2017-10-09 17:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2017-10-09 16:41 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Tejun Heo
On Mon, Oct 09, 2017 at 01:01:37PM +0000, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> per cpu allocations are already zeroed, no need to clear them again.
>
> Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Tejun Heo <tj@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] ipv6: avoid zeroing per cpu data again
2017-10-09 13:01 [PATCH net-next] ipv6: avoid zeroing per cpu data again Eric Dumazet
2017-10-09 13:22 ` Tejun Heo
2017-10-09 16:41 ` Martin KaFai Lau
@ 2017-10-09 17:30 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-10-09 17:30 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, kafai, tj
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 09 Oct 2017 06:01:37 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> per cpu allocations are already zeroed, no need to clear them again.
>
> Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-09 17:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 13:01 [PATCH net-next] ipv6: avoid zeroing per cpu data again Eric Dumazet
2017-10-09 13:22 ` Tejun Heo
2017-10-09 16:41 ` Martin KaFai Lau
2017-10-09 17:30 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.