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
commit5221eceb39a8a4f9bd637ebfa7c0f9c0958e8afa (patch)
treece57c568080eec4e989f9ded04ad4b0e5d244b19 /src/compat/compat.h
parentqemu: decide debug kernel based on KERNEL_VERSION (diff)
downloadwireguard-linux-compat-5221eceb39a8a4f9bd637ebfa7c0f9c0958e8afa.tar.xz
wireguard-linux-compat-5221eceb39a8a4f9bd637ebfa7c0f9c0958e8afa.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> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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>