aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* queueing: remove per-peer queuesjd/remove-per-peer-queuesJason A. Donenfeld2018-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, having many peers would result in many napi structs, which could make lookups in the napi_hash in net/core/dev.c slow. So, we move to using a single napi struct per device. The best solution would be to replace napi_hash with an idr or just get rid of it all together and use straight pointers. However, that isn't the case currently, so we work with what is and begrudgingly remove per-peer queues. On the upside, it means we reduce the per-peer memory usage by about 8k/16k, but on the downside it means that napi_gro_receive is called on a unified list, which might result in less GRO speedups on systems with many peers active at once. However, if napi_hash does ever go away, we should consider reverting this commit. Since this means moving to unified packet queues, flushing at peer removal is something of a problem. So we make the slightly dubious modification of just not flushing, and letting our reference counters do the work. This in turn required some small changes to ensure that the reference counter will, at some point in the future, still reach zero, and not be kept alive by non-stop packet ingress. Co-developed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* 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>
* allowedips: rename from routingtableJason A. Donenfeld2017-11-101-2/+2
| | | | Makes it more clear that this _not_ a routing table replacement.
* device: only take reference if netns is differentJason A. Donenfeld2017-10-311-0/+1
| | | | | | If we take two references, the namespace and the device are never freed in the usual manner. We should thus only take a reference to another namespace when it is a different namespace from our own.
* peer: store total number of peers instead of iteratingJason A. Donenfeld2017-10-311-1/+1
| | | | | | This is faster, since it means adding a new peer is O(1) instead of O(n). It's also safe to do because we're holding the device_update_lock on both the ++ and the --.
* queueing: use ptr_ring instead of linked listsJason A. Donenfeld2017-10-051-3/+2
|
* global: use _WG prefix for include guardsJason A. Donenfeld2017-10-031-3/+3
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* netlink: switch from ioctl to netlink for configurationJason A. Donenfeld2017-10-021-0/+1
|
* device: properly arrange structsJason A. Donenfeld2017-09-191-6/+5
|
* queue: entirely rework parallel systemJason A. Donenfeld2017-09-181-12/+21
| | | | | | | | | | 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.
* global: use pointer to net_deviceJason A. Donenfeld2017-07-201-0/+1
| | | | | | DaveM prefers it to be this way per [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html
* device: only use one sleep notifierJason A. Donenfeld2017-06-241-4/+1
| | | | | This greatly improves performance when adding and removing interfaces, since the power registration function does a linear search each time.
* handshake: process in parallelJason A. Donenfeld2017-05-301-2/+9
|
* data: cleanup parallel workqueue and use two max_activeJason A. Donenfeld2017-04-081-3/+5
|
* socket: enable setting of fwmarkJason A. Donenfeld2017-02-131-0/+1
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* device: make suspend code conditional on CONFIG_PM_SLEEPJason A. Donenfeld2016-12-091-0/+2
| | | | | This isn't actually neccessary, since there are no-op stubs for these functions, but the MIPS people don't want any unneccessary bloat.
* device: clear all peer ephemeral keys on sleepJason A. Donenfeld2016-12-091-0/+2
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* Rework headers and includesJason A. Donenfeld2016-09-291-0/+31
|
* Initial commitJason A. Donenfeld2016-06-251-0/+9