diff options
author | Artem Glazychev <artem.glazychev@xored.com> | 2020-09-14 11:36:01 +0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-09-23 10:11:13 +0000 |
commit | 8eb69407c8075e101b773d5a27ea21bd3fc906d7 (patch) | |
tree | fe6dffcf1865882a1c32a86d083a68e6c4f7e0af /src/plugins/wireguard/wireguard.c | |
parent | 6a3d4cc9a11efbe73a1cda35a64c619eebde0b24 (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.c')
-rwxr-xr-x | src/plugins/wireguard/wireguard.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/wireguard/wireguard.c b/src/plugins/wireguard/wireguard.c index 00921811e4a..9510a0ad385 100755 --- a/src/plugins/wireguard/wireguard.c +++ b/src/plugins/wireguard/wireguard.c @@ -32,7 +32,17 @@ wg_init (vlib_main_t * vm) wg_main_t *wmp = &wg_main; wmp->vlib_main = vm; - wmp->peers = 0; + + wmp->in_fq_index = vlib_frame_queue_main_init (wg_input_node.index, 0); + wmp->out_fq_index = + vlib_frame_queue_main_init (wg_output_tun_node.index, 0); + + vlib_thread_main_t *tm = vlib_get_thread_main (); + + vec_validate_aligned (wmp->per_thread_data, tm->n_vlib_mains, + CLIB_CACHE_LINE_BYTES); + + wg_timer_wheel_init (); return (NULL); } |