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>
This commit is contained in:
Eric Dumazet 2017-01-20 08:08:56 -08:00 committed by David S. Miller
parent f4ec60644a
commit 9ca677b1bd
1 changed files with 2 additions and 1 deletions

View File

@ -389,7 +389,8 @@ static int seg6_hmac_init_algo(void)
return -ENOMEM;
for_each_possible_cpu(cpu) {
shash = kzalloc(shsize, GFP_KERNEL);
shash = kzalloc_node(shsize, GFP_KERNEL,
cpu_to_node(cpu));
if (!shash)
return -ENOMEM;
*per_cpu_ptr(algo->shashs, cpu) = shash;