From: Andy Pei Date: Mon, 16 Mar 2020 06:07:17 +0000 (+0800) Subject: net/ipn3ke: use control thread to check link status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e5791726338ea4b83e329fd59e9d1af7066b7c0b;p=dpdk.git net/ipn3ke: use control thread to check link status ipn3ke driver creates a thread to check link status. Before this patch, pthread_create() is used to create thread, leaving the new thread unrestrained wrt cpu affinity. After this patch, rte_ctrl_thread_create() is used to create thread. The affinity of the new thread is based on the CPU affinity retrieved at the time rte_eal_init() was called, the dataplane and service lcores are then excluded. Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor") Cc: stable@dpdk.org Signed-off-by: Andy Pei Reviewed-by: Rosen Xu --- diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 80122e3fc5..b673c49149 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -2598,7 +2598,8 @@ ipn3ke_rpst_scan_check(void) int ret; if (ipn3ke_rpst_scan_num == 1) { - ret = pthread_create(&ipn3ke_rpst_scan_thread, + ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread, + "ipn3ke scanner", NULL, ipn3ke_rpst_scan_handle_request, NULL); if (ret) {