summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-10 20:51:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-10 21:44:38 +0200
commitea6d4a5caddc48c26dc9dcd8c6a510d03c7648f5 (patch)
treee175f12ffe72e68d5ea4eca70aa79e8135c9710a
parent5ee298c4fe47e59b95d6ba4d2ef8b8198569ecf6 (diff)
receive: assume we usually succeed with userspace
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/receive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/receive.c b/src/receive.c
index 11fc700..5dc9c5b 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -248,7 +248,7 @@ static void receive_data_packet(struct sk_buff *skb, struct wireguard_peer *peer
}
dev->last_rx = jiffies;
- if (netif_rx(skb) == NET_RX_SUCCESS)
+ if (likely(netif_rx(skb) == NET_RX_SUCCESS))
rx_stats(peer, skb->len);
else {
++dev->stats.rx_dropped;