From bc7840be16f7e4e116cada45b7ce8a2477e6b571 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 2 Jul 2019 14:15:35 +0200 Subject: receive: queue dead packets to napi queue instead of empty rx_queue Signed-off-by: Jason A. Donenfeld --- src/receive.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/receive.c') 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; -- cgit v1.2.3