diff options
author | Steven <sluong@cisco.com> | 2018-02-27 14:43:40 -0800 |
---|---|---|
committer | Steven <sluong@cisco.com> | 2018-02-27 15:15:02 -0800 |
commit | ac0932d26c17b8d82af1a7d033e1abdccb6f7209 (patch) | |
tree | 7a6425d010fef937b6ff6c39c76708b897dc78b7 | |
parent | 0aa14ed8f56cda4135766471d32755392f92bda7 (diff) |
vnet/interface: vnet_(put|get)frame_to_sw_interface is not worker thread aware
When heavy traffic is running using worker threads, it may crash here
DBGvpp# 0: /home/sluong/vpp3/vpp/build-data/../src/vlib/main.c:1128 (dispatch_pending_node) assertion `f->flags & VLIB_FRAME_PENDING' fails
Thread 1 "vpp_main" received signal SIGABRT, Aborted.
0x00007ffff5d50428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
No crash was observed if only main thread was used.
Change-Id: I96f8b02ec23accc85c0f1ddecfeff6043b5e3c2b
Signed-off-by: Steven <sluong@cisco.com>
-rw-r--r-- | src/vnet/interface_funcs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h index 5aecaff9b27..9c96027b705 100644 --- a/src/vnet/interface_funcs.h +++ b/src/vnet/interface_funcs.h @@ -245,7 +245,7 @@ always_inline vlib_frame_t * vnet_get_frame_to_sw_interface (vnet_main_t * vnm, u32 sw_if_index) { vnet_hw_interface_t *hw = vnet_get_sup_hw_interface (vnm, sw_if_index); - return vlib_get_frame_to_node (vnm->vlib_main, hw->output_node_index); + return vlib_get_frame_to_node (vlib_get_main (), hw->output_node_index); } always_inline void @@ -253,7 +253,7 @@ vnet_put_frame_to_sw_interface (vnet_main_t * vnm, u32 sw_if_index, vlib_frame_t * f) { vnet_hw_interface_t *hw = vnet_get_sup_hw_interface (vnm, sw_if_index); - return vlib_put_frame_to_node (vnm->vlib_main, hw->output_node_index, f); + return vlib_put_frame_to_node (vlib_get_main (), hw->output_node_index, f); } /* Change interface flags (e.g. up, down, enable, disable). */ |