diff options
author | Eric Dumazet <edumazet@google.com> | 2017-01-20 11:08:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-22 16:50:36 -0500 |
commit | 9ca677b1bd8979f9a7702db5ed4028e4b8b232e8 (patch) | |
tree | 39870ca5d03e9917bc095486faca815b89b80902 | |
parent | f4ec60644a7f9f8bd9571c30c573ce54c4b0ad97 (diff) |
ipv6: add NUMA awareness to seg6_hmac_init_algo()
Since we allocate per cpu storage, let's also use NUMA hints.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/seg6_hmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c index 5215e1eba010..b274f1d95e03 100644 --- a/net/ipv6/seg6_hmac.c +++ b/net/ipv6/seg6_hmac.c | |||
@@ -389,7 +389,8 @@ static int seg6_hmac_init_algo(void) | |||
389 | return -ENOMEM; | 389 | return -ENOMEM; |
390 | 390 | ||
391 | for_each_possible_cpu(cpu) { | 391 | for_each_possible_cpu(cpu) { |
392 | shash = kzalloc(shsize, GFP_KERNEL); | 392 | shash = kzalloc_node(shsize, GFP_KERNEL, |
393 | cpu_to_node(cpu)); | ||
393 | if (!shash) | 394 | if (!shash) |
394 | return -ENOMEM; | 395 | return -ENOMEM; |
395 | *per_cpu_ptr(algo->shashs, cpu) = shash; | 396 | *per_cpu_ptr(algo->shashs, cpu) = shash; |