From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 21E93156 for ; Fri, 22 Nov 2013 14:31:46 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 22 Nov 2013 05:32:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,752,1378882800"; d="scan'208";a="438019596" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 22 Nov 2013 05:32:23 -0800 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 22 Nov 2013 13:31:53 +0000 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.66]) by IRSMSX153.ger.corp.intel.com ([169.254.9.129]) with mapi id 14.03.0123.003; Fri, 22 Nov 2013 13:31:51 +0000 From: "Richardson, Bruce" To: Prashant Upadhyaya , "dev@dpdk.org" Thread-Topic: Query regarding multiple processes in DPDK Thread-Index: Ac7nf/izY2xhv9ftQ/6e54GzBsCm/QABo68Q Date: Fri, 22 Nov 2013 13:31:47 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01A976C1F@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Query regarding multiple processes in DPDK 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, 22 Nov 2013 13:31:47 -0000 Hi Prashant > =3D=3D=3D > The EAL also supports an auto-detection mode (set by EAL --proc-type=3Dau= to > flag), whereby an Intel(r) DPDK process is started as a secondary instanc= e if > a primary instance is already running. > =3D=3D=3D >=20 > So does this mean that if I have a DPDK exe foo.out, then when I run the > first instance of foo.out with -proc-type =3D auto, then foo.out will run= as a > primary process and when I spawn the second instance of foo.out (with fir= st > already running) again with -proc-type=3Dauto, then this second instance > automatically becomes secondary ? [BR] Yes, that is the idea. >=20 > Also is there any user code initialization change required or exactly the > same code will work for both the processes ? [BR] It will depend upon the application, but in most cases you probably wa= nt to have slightly different code paths for primary and secondary instance= s. For example, if a process is running as primary instance, it will probab= ly call rte_mempool_create or rte_ring_create. A secondary instance which w= ants to use these should instead call rte_mempool_lookup and rte_ring_looku= p instead.=20 For an example of how to write the one binary to be used as both primary an= d secondary process, I suggest looking at the symmetric_mp example applicat= ion in the examples/multi_process/ directory. Regards, /Bruce