diff options
author | Gauvain "GovanifY" Roussel-Tarbouriech <govanify@anarchist.pw> | 2018-06-28 15:38:57 +0200 |
---|---|---|
committer | Gauvain "GovanifY" Roussel-Tarbouriech <govanify@anarchist.pw> | 2018-06-28 15:38:57 +0200 |
commit | 80d82792e7b92a30cc34c974a027d9e70dfbf338 (patch) | |
tree | 9123867fa9357970f88ed993b1645b83db4aea61 /src | |
parent | Basic pubkey check for aggregation in gro_receive (diff) | |
download | wireguard-monolithic-historical-80d82792e7b92a30cc34c974a027d9e70dfbf338.tar.xz wireguard-monolithic-historical-80d82792e7b92a30cc34c974a027d9e70dfbf338.zip |
GRO does indeed concatenate packets, should we store them somewhere?grt/gro
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/socket.c b/src/socket.c index 64bbef9..f8909f0 100644 --- a/src/socket.c +++ b/src/socket.c @@ -305,10 +305,10 @@ static struct sk_buff **gro_receive(struct sock *sk, struct sk_buff *skb) { struct wireguard_peer *peer, *peer2; - struct sk_buff *p, **pp = NULL; - int flush = 1; + struct sk_buff *p = NULL; struct gro_remcsum grc; + rcu_read_lock(); peer = PACKET_PEER(skb); for (p = *head; p; p = p->next) { @@ -328,15 +328,17 @@ static struct sk_buff **gro_receive(struct sock *sk, } - pp = call_gro_receive(eth_gro_receive, head, skb); - flush = 0; -out: + rcu_read_unlock(); skb_gro_remcsum_cleanup(skb, &grc); skb->remcsum_offload = 0; - NAPI_GRO_CB(skb)->flush |= flush; + NAPI_GRO_CB(skb)->flush |= 0; - return pp; + /* GRO does indeed concatenate packets but returning -EINPROGRESS makes us + * go to + * https://elixir.bootlin.com/linux/latest/source/net/core/dev.c#L4998, + * so that our packets don't get concatenated */ + return -EINPROGRESS; } static int gro_complete(struct sock *sk, struct sk_buff *skb, int nhoff) |