diff options
author | 2020-09-14 11:36:01 +0700 | |
---|---|---|
committer | 2020-09-24 18:54:26 +0000 | |
commit | 48d81b58dfc1b4c93a44e07ed61cbe73458623a2 (patch) | |
tree | 95a940c749902a0eb91a371bb81e6fddbbe0cba2 /src/plugins/wireguard/wireguard.h | |
parent | c359dfa1869d888d934fd0fd362ece21f9ffc26c (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>
(cherry picked from commit 8eb69407c8075e101b773d5a27ea21bd3fc906d7)
Diffstat (limited to 'src/plugins/wireguard/wireguard.h')
-rwxr-xr-x | src/plugins/wireguard/wireguard.h | 18 |
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; |