aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2020-09-25 15:16:18 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-25 16:58:07 -0700
commit0189399cbb5eba6e98f02b61574b507062c476b7 (patch)
tree40de8833e36333a52eb59aea31dc16f5c6c84354 /drivers/net/vxlan.c
parentvxlan: don't collect metadata if remote checksum is wrong (diff)
downloadlinux-dev-0189399cbb5eba6e98f02b61574b507062c476b7.tar.xz
linux-dev-0189399cbb5eba6e98f02b61574b507062c476b7.zip
vxlan: add unlikely to vxlan_remcsum check
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>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 47c762f7f5b1..cc904f003f15 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -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)) {