From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 61C468DA3 for ; Fri, 14 Aug 2015 12:18:46 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 14 Aug 2015 03:18:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,676,1432623600"; d="scan'208";a="748510091" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by orsmga001.jf.intel.com with SMTP; 14 Aug 2015 03:18:44 -0700 Received: by (sSMTP sendmail emulation); Fri, 14 Aug 2015 11:18:42 +0025 Date: Fri, 14 Aug 2015 11:18:42 +0100 From: Bruce Richardson To: Rajesh R Message-ID: <20150814101842.GB8916@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Can pthread_create be called directly in a dpdk application? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 10:18:46 -0000 On Fri, Aug 14, 2015 at 06:13:46AM -0400, Rajesh R wrote: > I am relatively new to dpdk. I could make the examples work. > > Now I am experimenting with a traffic measurement application which capture > packets using dpdk. The application requires few other threads apart from > the rte_threads. > If I put the code for thread creation (pthread_create()) before calling > eal_rte_init and remote_launch, the rte_init/remote launch is not > proceeding. But if I put the eal_rte_init()/remote_launch first it is > working, but coee will wait there and would not proceed to the subsequent > lines > > How to do it correctly? > > -- Hi Rajesh there should be no issues with spawning extra threads using pthread_create in your application. Can you provide a few more specifics and perhaps snippets of code which exhibit the problem. For example, when spawning the threads before init and remote launch - can you clarify in what way it is "not proceding"? Does it do nothing, does it hang, does it crash etc.? Similarly, putting the pthread later, where exactly does it wait? Does gdb show anything of interest, or show more specifics as to what the thread is waiting on? Regards, /Bruce