On Mon, 15 Sep 2025 04:25:13 -0700 Khadem Ullah <14pwcse1...@uetpeshawar.edu.pk> wrote:
> +#ifndef RTE_EXEC_ENV_WINDOWS > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + printf("Stopping secondary process...\n"); > + struct eal_dev_mp_req req; > + memset(&req, 0, sizeof(req)); > + req.t = EAL_DEV_REQ_TYPE_STOP; > + eal_dev_hotplug_request_to_secondary(&req); > + } > +#endif > } This could be improved: 1. The structure can just be iniatialised as: struct eal_dev_mp_req req = { .t = EAL_DEV_REQ_TYPE_STOP }; 2. Check the result of sending request to secondary 3. This is really a different MP request path, please don't overload hotplug for this. Register a new type with rte_mp_action_register() 4. If done right, you should be able to drop the #ifdef around WINDOWS. For now, there will be no secondary on Windows so the request to send will just succeed as a nop. The other issue is that stopping the secondary would be faster if you used existing f_stop flag to break out of the forwarding loop.