summaryrefslogtreecommitdiffstats
path: root/src/plugins/wireguard/wireguard.h
diff options
context:
space:
mode:
authorArtem Glazychev <artem.glazychev@xored.com>2020-09-14 11:36:01 +0700
committerNeale Ranns <nranns@cisco.com>2020-09-23 10:11:13 +0000
commit8eb69407c8075e101b773d5a27ea21bd3fc906d7 (patch)
treefe6dffcf1865882a1c32a86d083a68e6c4f7e0af /src/plugins/wireguard/wireguard.h
parent6a3d4cc9a11efbe73a1cda35a64c619eebde0b24 (diff)
wireguard: add handoff node
All timer and control plane functions happen from main thread Type: fix Change-Id: I4fc333c644485cd17e6f426493feef91688d9b24 Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Diffstat (limited to 'src/plugins/wireguard/wireguard.h')
-rwxr-xr-xsrc/plugins/wireguard/wireguard.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/wireguard/wireguard.h b/src/plugins/wireguard/wireguard.h
index 70a692e602f..2c892a374b8 100755
--- a/src/plugins/wireguard/wireguard.h
+++ b/src/plugins/wireguard/wireguard.h
@@ -17,13 +17,17 @@
#include <wireguard/wireguard_index_table.h>
#include <wireguard/wireguard_messages.h>
-#include <wireguard/wireguard_peer.h>
+#include <wireguard/wireguard_timer.h>
+
+#define WG_DEFAULT_DATA_SIZE 2048
extern vlib_node_registration_t wg_input_node;
extern vlib_node_registration_t wg_output_tun_node;
-
-
+typedef struct wg_per_thread_data_t_
+{
+ u8 data[WG_DEFAULT_DATA_SIZE];
+} wg_per_thread_data_t;
typedef struct
{
/* convenience */
@@ -31,10 +35,14 @@ typedef struct
u16 msg_id_base;
- // Peers pool
- wg_peer_t *peers;
wg_index_table_t index_table;
+ u32 in_fq_index;
+ u32 out_fq_index;
+
+ wg_per_thread_data_t *per_thread_data;
+
+ tw_timer_wheel_16t_2w_512sl_t timer_wheel;
} wg_main_t;
extern wg_main_t wg_main;