diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-06-24 16:06:03 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-06-29 16:28:35 -0600 |
commit | 3917d7135cc605da3d607df089f16f9773aa67f9 (patch) | |
tree | 04ee1f9fb409729ecffe3315c8202d978ad38e82 | |
parent | 2fbaef864227150ca9bbc78b57614c313c2dac9d (diff) |
receive: account for napi_gro_receive never returning GRO_DROP
The napi_gro_receive function no longer returns GRO_DROP ever, making
handling GRO_DROP dead code. This commit removes that dead code.
Further, it's not even clear that device drivers have any business in
taking action after passing off received packets; that's arguably out of
their hands.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/receive.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/receive.c b/src/receive.c index 055d3dd..4f7141a 100644 --- a/src/receive.c +++ b/src/receive.c @@ -419,14 +419,8 @@ static void wg_packet_consume_data_done(struct wg_peer *peer, if (unlikely(routed_peer != peer)) goto dishonest_packet_peer; - if (unlikely(napi_gro_receive(&peer->napi, skb) == GRO_DROP)) { - ++dev->stats.rx_dropped; - net_dbg_ratelimited("%s: Failed to give packet to userspace from peer %llu (%pISpfsc)\n", - dev->name, peer->internal_id, - &peer->endpoint.addr); - } else { - update_rx_stats(peer, message_data_len(len_before_trim)); - } + napi_gro_receive(&peer->napi, skb); + update_rx_stats(peer, message_data_len(len_before_trim)); return; dishonest_packet_peer: |