Skip to content

Commit 0189399

Browse files
Fabian Frederickdavem330
authored andcommitted
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>
1 parent 2ae2904 commit 0189399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/vxlan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
18761876
goto drop;
18771877

18781878
if (vs->flags & VXLAN_F_REMCSUM_RX)
1879-
if (!vxlan_remcsum(&unparsed, skb, vs->flags))
1879+
if (unlikely(!vxlan_remcsum(&unparsed, skb, vs->flags)))
18801880
goto drop;
18811881

18821882
if (vxlan_collect_metadata(vs)) {

0 commit comments

Comments
 (0)