Fix a segmentation fault bug when used with DPDK.#429
Fix a segmentation fault bug when used with DPDK.#429boat0 wants to merge 2 commits intolkl:masterfrom
Conversation
When DPDK is used we have:
lkl_hijack_netdev_create()
--> lkl_netdev_dpdk_create()
--> rte_eal_init()
--> rte_eal_intr_init()
rte_eal_intr_init() creates threads to use lkl_ops, but lkl_ops will only
be initialized in later call to lkl_start_kernel(). So LKL crashes with
SIGSEGV received.
Fix by switching calls to lkl_hijack_netdev_create()/lkl_start_kernel().
Signed-off-by: Xiaozhou Liu <flyninja@126.com>
|
Can one of the admins verify this patch? |
|
Thanks for the patch ! btw, what dpdk version are you using in the case of crash ? |
|
I am using the default dpdk version-17.02 that comes with lkl. |
|
@boat0 sorry for the late response.
I can reproduce segfault and found that the crash is not due to Applying the following patch seems to fix the issue, but I need to think more about what's the right way to do this. Since I'm not yet able to run an app with dpdk, could you try this patch in your machine to see if it works or not ? thanks. |
When DPDK is used we have:
lkl_hijack_netdev_create()
--> lkl_netdev_dpdk_create()
--> rte_eal_init()
--> rte_eal_intr_init()
rte_eal_intr_init() creates threads to use lkl_ops, but lkl_ops will only
be initialized in later call to lkl_start_kernel(). So LKL crashes with
SIGSEGV received.
Fix by switching calls to lkl_hijack_netdev_create()/lkl_start_kernel().
Signed-off-by: Xiaozhou Liu flyninja@126.com
This change is