}
if (internals->no_request_thread == 0) {
+ internals->stop_thread = 0;
+
ret = rte_ctrl_thread_create(&internals->thread,
"kni_handle_req", NULL,
kni_handle_request, internals);
struct pmd_internals *internals = dev->data->dev_private;
int ret;
- if (internals->no_request_thread == 0) {
+ if (internals->no_request_thread == 0 && internals->stop_thread == 0) {
internals->stop_thread = 1;
ret = pthread_cancel(internals->thread);
ret = pthread_join(internals->thread, NULL);
if (ret)
PMD_LOG(ERR, "Can't join the thread");
-
- internals->stop_thread = 0;
}
dev->data->dev_link.link_status = 0;