vxlan: add unlikely to vxlan_remcsum check
authorFabian Frederick <fabf@skynet.be>
Fri, 25 Sep 2020 13:16:18 +0000 (15:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 23:58:07 +0000 (16:58 -0700)
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>
drivers/net/vxlan.c

index 47c762f..cc904f0 100644 (file)
@@ -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)) {