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 9F469A0583; Thu, 19 Mar 2020 14:45:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D85F41AFF; Thu, 19 Mar 2020 14:45:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 6A127F90; Thu, 19 Mar 2020 14:45:40 +0100 (CET) IronPort-SDR: g+Wa5iXznfmcuZ2hdxC5hi7IsDQr4cmv5pdrJmHXtOEfB+jfK8uAGtsbzJWiommYuCDyKYMTh8 +nXlczElqKvA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2020 06:45:39 -0700 IronPort-SDR: 4XahiB+W4Na1DHP5sbh5a+DwsfjzkWN1h03OvWXv6IeFkvjWj8YhrpXdNwfesxwmun1HDA0Nmk kIw+mVw1fHnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,571,1574150400"; d="scan'208";a="236942468" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga007.fm.intel.com with ESMTP; 19 Mar 2020 06:45:37 -0700 Date: Thu, 19 Mar 2020 21:42:44 +0800 From: Ye Xiaolong To: Andy Pei Cc: dev@dpdk.org, rosen.xu@intel.com, stable@dpdk.org, david.marchand@redhat.com, ferruh.yigit@intel.com Message-ID: <20200319134243.GD51165@intel.com> References: <1584338837-436345-1-git-send-email-andy.pei@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584338837-436345-1-git-send-email-andy.pei@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/ipn3ke: use ctrl thread to check link status X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 03/16, Andy Pei wrote: >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 > Applied to dpdk-next-net-intel, Thanks.