From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58C05A0563 for ; Mon, 16 Mar 2020 07:25:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 438A71C02D; Mon, 16 Mar 2020 07:25:06 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4D1373B5; Mon, 16 Mar 2020 07:25:02 +0100 (CET) IronPort-SDR: T1c/tVDPhDRkbTPh5ZRHd2wGzfXgVZCv86oOoBftVweHpLC/0js85oxy0SE45A3gPhk7fvlZ70 CO2412dpaF3w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2020 23:25:00 -0700 IronPort-SDR: jXoRN2r3yC6kEWjXWJJeZHkkHopKg3Wh0QIsXB0kzsOJOAKwso6EUCFvckX2VHWK/D2Ji2TrRC KFsB8wXGPjkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,559,1574150400"; d="scan'208";a="354927260" Received: from dpdk-dipei.sh.intel.com ([10.67.110.224]) by fmsmga001.fm.intel.com with ESMTP; 15 Mar 2020 23:24:59 -0700 From: Andy Pei To: dev@dpdk.org Cc: andy.pei@intel.com, rosen.xu@intel.com, stable@dpdk.org, david.marchand@redhat.com, xiaolong.ye@intel.com, ferruh.yigit@intel.com Date: Mon, 16 Mar 2020 14:07:17 +0800 Message-Id: <1584338837-436345-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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@intel.com Cc: stable@dpdk.org Signed-off-by: Andy Pei --- Cc: david.marchand@redhat.com Cc: xiaolong.ye@intel.com Cc: ferruh.yigit@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