aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit73105cfee250a0ffaeb8488837cabc6fa6358c4b (patch)
tree7855b1c0cc201cfd82206c396bd94c5fa7cf5961
parentreceive: no need to test for !len (diff)
downloadwireguard-monolithic-historical-experimental-0.0.20160711.tar.xz
wireguard-monolithic-historical-experimental-0.0.20160711.zip
receive: assume we usually succeed with userspaceexperimental-0.0.20160711
-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;