Skip to content

Commit

Permalink
vxlan: add unlikely to vxlan_remcsum check
Browse files Browse the repository at this point in the history
small optimization around checking as it's being done in all
receptions

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Sep 25, 2020
1 parent 2ae2904 commit 0189399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
goto drop;

if (vs->flags & VXLAN_F_REMCSUM_RX)
if (!vxlan_remcsum(&unparsed, skb, vs->flags))
if (unlikely(!vxlan_remcsum(&unparsed, skb, vs->flags)))
goto drop;

if (vxlan_collect_metadata(vs)) {
Expand Down

0 comments on commit 0189399

Please sign in to comment.