On 6/2/2023 4:33 AM, 王志宏 wrote:
Apologize that I have to go directly to function names to explain :)
  - rte_eal_intr_init creates eal_intr_thread_main which starts eal_intr_handle_interrupts   - rte_mp_channel_init creates mp_handle which processes messages registered by rte_mp_action_register   - then, eal_mp_dev_hotplug_init calls rte_mp_action_register to register handle_primary_request for EAL_DEV_MP_ACTION_REQUEST

At this point the whole messaging mechanism starts to function: When primary attaches/detaches devices, it sends EAL_DEV_MP_ACTION_REQUEST, and handle_primary_request invokes __handle_primary_request, which calls local_dev_probe/remove. In the end it goes to for example rte_eth_dev_attach_secondary.

Now, if secondary is somewhere after eal_mp_dev_hotplug_init but before memory init done, it will crash due to memory access violation.

Thanks
Zhihong

Hi,

I went into the code for IPC and you're right: we're only ignoring requests from *unregistered* callbacks, but if they were already registered, we handle them, which would cause your issue.

--
Thanks,
Anatoly

Reply via email to