Skip to content

Commit

Permalink
ipv6: add NUMA awareness to seg6_hmac_init_algo()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 22, 2017
1 parent f4ec606 commit 9ca677b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv6/seg6_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9ca677b

Please sign in to comment.