summaryrefslogtreecommitdiffhomepage
path: root/src/receive.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-07-02 14:15:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-07-02 14:15:46 +0200
commitbc7840be16f7e4e116cada45b7ce8a2477e6b571 (patch)
tree8e7f2f74983d6dfe9fc9e83110d287021253deb9 /src/receive.c
parentf64cd4fd2935d0e71c549199937c3dd2abd6cb0f (diff)
receive: queue dead packets to napi queue instead of empty rx_queue
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/receive.c b/src/receive.c
index 6a3980b..247a56b 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -521,8 +521,7 @@ void wg_packet_decrypt_worker(struct work_struct *work)
&PACKET_CB(skb)->keypair->receiving,
&simd_context)) ?
PACKET_STATE_CRYPTED : PACKET_STATE_DEAD;
- wg_queue_enqueue_per_peer_napi(&PACKET_PEER(skb)->rx_queue, skb,
- state);
+ wg_queue_enqueue_per_peer_napi(skb, state);
simd_relax(&simd_context);
}
@@ -551,7 +550,7 @@ static void wg_packet_consume_data(struct wg_device *wg, struct sk_buff *skb)
wg->packet_crypt_wq,
&wg->decrypt_queue.last_cpu);
if (unlikely(ret == -EPIPE))
- wg_queue_enqueue_per_peer(&peer->rx_queue, skb, PACKET_STATE_DEAD);
+ wg_queue_enqueue_per_peer_napi(skb, PACKET_STATE_DEAD);
if (likely(!ret || ret == -EPIPE)) {
rcu_read_unlock_bh();
return;