aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-07-05 22:27:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-08 18:45:41 +0200
commit6008eacbf2c7a5f31b0c9d5d0a629cbdfbb8f222 (patch)
tree1d57d8c64149dbf7a1709a1a4cd938ccff868d9d /src/compat/compat.h
parentqemu: decide debug kernel based on KERNEL_VERSION (diff)
downloadwireguard-monolithic-historical-6008eacbf2c7a5f31b0c9d5d0a629cbdfbb8f222.tar.xz
wireguard-monolithic-historical-6008eacbf2c7a5f31b0c9d5d0a629cbdfbb8f222.zip
receive: use NAPI on the receive path
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>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 2c1b663..997ae39 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -597,6 +597,10 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) && !defined(ISRHEL7)
+#define napi_complete_done(n, work_done) napi_complete(n)
+#endif
+
/* https://lkml.kernel.org/r/20170624021727.17835-1-Jason@zx2c4.com */
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/ip.h>