diff options
author | Elias Rudberg <elias.rudberg@bahnhof.net> | 2020-05-07 14:29:21 +0200 |
---|---|---|
committer | Elias Rudberg <elias.rudberg@bahnhof.net> | 2020-05-07 14:29:21 +0200 |
commit | 92e1b83a39458f98ff649883334b153f03af603b (patch) | |
tree | fe7a6accac254a3151081b5fccc27c7933d9e273 /src/plugins/lacp/tx_machine.c | |
parent | a1e03d4da71a2452c1e5da399d96c51f1b487cad (diff) |
lacp: fix regarding vm arg for vlib_time_now calls
Use thread-specific vlib_main_t *vm pointers to avoid problems with
different threads accessing the same vlib_main_t data structure.
This avoids assertion failure when vlib_time_now() is called with a vm
corresponding to a different thread.
Type: fix
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I359596ecff86e03d57aa8d2330f77bf9a913485f
Diffstat (limited to 'src/plugins/lacp/tx_machine.c')
-rw-r--r-- | src/plugins/lacp/tx_machine.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/lacp/tx_machine.c b/src/plugins/lacp/tx_machine.c index 73ca4862fe8..3377da86422 100644 --- a/src/plugins/lacp/tx_machine.c +++ b/src/plugins/lacp/tx_machine.c @@ -40,8 +40,7 @@ lacp_tx_action_transmit (void *p1, void *p2) { vlib_main_t *vm = p1; slave_if_t *sif = p2; - lacp_main_t *lm = &lacp_main; - f64 now = vlib_time_now (lm->vlib_main); + f64 now = vlib_time_now (vm); if (!lacp_timer_is_running (sif->periodic_timer)) return 0; @@ -53,7 +52,7 @@ lacp_tx_action_transmit (void *p1, void *p2) if (sif->ntt) { lacp_send_lacp_pdu (vm, sif); - lacp_schedule_periodic_timer (lm->vlib_main, sif); + lacp_schedule_periodic_timer (vm, sif); } sif->ntt = 0; |