Skip to content

Commit

Permalink
fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks
Browse files Browse the repository at this point in the history
Do WARN_ON_ONCE instead of WARN_ON in gue_gro_receive when the offload
callcaks are bad (either don't exist or gro_receive is not specified).

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Herbert authored and David S. Miller committed Aug 23, 2015
1 parent 58ce31c commit 2701366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/fou.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
rcu_read_lock();
offloads = NAPI_GRO_CB(skb)->is_ipv6 ? inet6_offloads : inet_offloads;
ops = rcu_dereference(offloads[guehdr->proto_ctype]);
if (WARN_ON(!ops || !ops->callbacks.gro_receive))
if (WARN_ON_ONCE(!ops || !ops->callbacks.gro_receive))
goto out_unlock;

pp = ops->callbacks.gro_receive(head, skb);
Expand Down

0 comments on commit 2701366

Please sign in to comment.