diff --git a/vslib/vpp/vppxlate/SaiVppXlate.c b/vslib/vpp/vppxlate/SaiVppXlate.c index 52ed7850..eda0f52a 100644 --- a/vslib/vpp/vppxlate/SaiVppXlate.c +++ b/vslib/vpp/vppxlate/SaiVppXlate.c @@ -1687,6 +1687,12 @@ int init_vpp_client() } dump_interface_table(vam); + /* Initialize the event queue before enabling any VPP event source, + * otherwise an early sw_interface_event from VPP can be dispatched + * to vl_api_sw_interface_event_t_handler -> vpp_ev_enqueue while + * vpp_evq_p is still NULL, causing a SIGSEGV. */ + vpp_evq_init(); + vpp_acl_counters_enable_disable(true); /* Enable LACP punt/xc in linux-cp */ @@ -1709,7 +1715,6 @@ int init_vpp_client() /* Enable BFD multihop support in VPP */ vpp_bfd_udp_enable_multihop(); - vpp_evq_init(); vpp_client_init = 1; return 0; } else {