[dpdk-dev] [PATCH] net/ipn3ke: use ctrl thread to check link status
Andy Pei
andy.pei at intel.com
Mon Mar 16 07:07:17 CET 2020
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: rosen.xu at intel.com
Cc: stable at dpdk.org
Signed-off-by: Andy Pei <andy.pei at intel.com>
---
Cc: david.marchand at redhat.com
Cc: xiaolong.ye at intel.com
Cc: ferruh.yigit at intel.com
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 80122e3..b673c49 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2598,7 +2598,8 @@ struct rte_eth_xstat_name *xstats_names,
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) {
--
1.8.3.1
More information about the dev
mailing list