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 From: "Burakov, Anatoly" Date: Thu, Jun 1, 2023, 20:26 Subject: [External] Re: [PATCH] eal/linux: register mp hotplug callback after memory init To: "Zhihong Wang", , < qi.z.zhang@intel.com> On 5/31/2023 7:55 AM, Zhihong Wang wrote: > Secondary would crash if it tries to handle mp requests before memory > init, since globals such as eth_dev_shared_data_lock are not accessible > to it at this moment. > --- Please correct me if I'm wrong, but if init is not completed, none of the IPC stuff is initialized either, and any hotplug requests would not trigger any callbacks in the first place? -- Thanks, Anatoly