aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/queueing.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: prefix all functions with wg_Jason A. Donenfeld2018-10-021-38/+38
| | | | | | | | | | | | | I understand why this must be done, though I'm not so happy about having to do it. In some places, it puts us over 80 chars and we have to break lines up in further ugly ways. And in general, I think this makes things harder to read. Yet another thing we must do to please upstream. Maybe this can be replaced in the future by some kind of automatic module namespacing logic in the linker, or even combined with LTO and aggressive symbol stripping. Suggested-by: Andrew Lunn <andrew@lunn.ch>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-201-2/+2
| | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments.
* global: run through clang-formatJason A. Donenfeld2018-08-281-15/+43
| | | | | | | This is the worst commit in the whole repo, making the code much less readable, but so it goes with upstream maintainers. We are now woefully wrapped at 80 columns.
* queueing: ensure strictly ordered loads and storesJason A. Donenfeld2018-08-021-3/+3
| | | | | | | We don't want a consumer to read plaintext when it's supposed to be reading ciphertext, which means we need to synchronize across cores. Suggested-by: Jann Horn <jann@thejh.net>
* queueing: document double-adding and reference conditionsJason A. Donenfeld2018-08-011-0/+12
|
* queueing: keep reference to peer after setting atomic state bitJason A. Donenfeld2018-08-011-2/+6
| | | | | | | | After we atomic_set, the peer is allowed to be freed, which means if we want to continue to reference it, we need to bump the reference count. This was introduced a few commits ago by b713ab0e when implementing some simplification suggestions.
* peer: simplify rcu reference countsJason A. Donenfeld2018-07-311-8/+2
| | | | | | | Use RCU reference counts only when we must, and otherwise use a more reasonably named function. Reported-by: Jann Horn <jann@thejh.net>
* receive: use NAPI on the receive pathJonathan Neuschäfer2018-07-081-2/+12
| | | | | | Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> [Jason: fixed up the flushing of the rx_queue in peer_remove] Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* queueing: preserve pfmemalloc header bitJason A. Donenfeld2018-05-131-0/+2
|
* send: account for route-based MTUJason A. Donenfeld2018-04-151-0/+1
| | | | | | | | | | It might be that a particular route has a different MTU than the interface, via `ip route add ... dev wg0 mtu 1281`, for example. In this case, it's important that we don't accidently pad beyond the end of the MTU. We accomplish that in this patch by carrying forward the MTU from the dst if it exists. We also add a unit test for this issue. Reported-by: Roman Mamedov <rm.wg@romanrm.net>
* queueing: skb_reset: mark as xnetJason A. Donenfeld2018-02-201-1/+1
| | | | | | | | This was avoided for a long time, because I wanted the packet to be charged to the original socket for as long as possible. However, this broke net_cls, which looks at skb->sk for additional late-stage routing decisions. So we had no choice but to ensure that skb->sk is NULL by the time of xmit, and this means calling the skb destructor.
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
|
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-1/+4
| | | | | | | | | | | | | It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: style nitsJason A. Donenfeld2017-10-311-1/+2
|
* global: accept decent check_patch.pl suggestionsJason A. Donenfeld2017-10-311-1/+1
|
* queueing: cleanup skb_paddingJason A. Donenfeld2017-10-051-14/+0
|
* queueing: move from ctx to cbJason A. Donenfeld2017-10-051-16/+18
|
* receive: do not store endpoint in ctxJason A. Donenfeld2017-10-051-1/+0
|
* queueing: use ptr_ring instead of linked listsJason A. Donenfeld2017-10-051-48/+8
|
* global: add space around variable declarationsJason A. Donenfeld2017-10-031-0/+6
|
* global: use _WG prefix for include guardsJason A. Donenfeld2017-10-031-3/+3
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* queueing: more standard init/uninit namesJason A. Donenfeld2017-09-251-2/+2
|
* queueing: rename cpumask functionJason A. Donenfeld2017-09-191-1/+1
|
* queueing: clean up worthless helperJason A. Donenfeld2017-09-191-12/+1
|
* queueing: no need to memzero structJason A. Donenfeld2017-09-191-1/+1
|
* queue: entirely rework parallel systemJason A. Donenfeld2017-09-181-0/+196
This removes our dependency on padata and moves to a different mode of multiprocessing that is more efficient. This began as Samuel Holland's GSoC project and was gradually reworked/redesigned/rebased into this present commit, which is a combination of his initial contribution and my subsequent rewriting and redesigning.