From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from jaguar.aricent.com (jaguar.aricent.com [121.241.96.11]) by dpdk.org (Postfix) with ESMTP id 7BB25156 for ; Fri, 22 Nov 2013 14:39:25 +0100 (CET) Received: from jaguar.aricent.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 85C0336B7B; Fri, 22 Nov 2013 19:10:05 +0530 (IST) Received: from GUREXHT02.ASIAN.AD.ARICENT.COM (gurexht02.asian.ad.aricent.com [10.203.171.138]) by jaguar.aricent.com (Postfix) with ESMTP id 6FD3F36B4A; Fri, 22 Nov 2013 19:10:05 +0530 (IST) Received: from GUREXMB01.asian.ad.aricent.com ([10.203.171.134]) by GUREXHT02.ASIAN.AD.ARICENT.COM ([10.203.171.138]) with mapi; Fri, 22 Nov 2013 19:10:05 +0530 From: Prashant Upadhyaya To: "Richardson, Bruce" , "dev@dpdk.org" Date: Fri, 22 Nov 2013 19:10:03 +0530 Thread-Topic: Query regarding multiple processes in DPDK Thread-Index: Ac7nf/izY2xhv9ftQ/6e54GzBsCm/QABo68QAABRxpA= Message-ID: References: <59AF69C657FD0841A61C55336867B5B01A976C1F@IRSMSX103.ger.corp.intel.com> In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A976C1F@IRSMSX103.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TM-AS-MML: No 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:39:25 -0000 Hi Bruce, Thanks. Regarding your comment -- [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. 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. I was really hoping that the --proc-type=3Dauto, would make the DPDK librar= ies internally resolving all this stuff, is that not the case ? I have not = started reading the code for all this yet. I must launch the same executable twice in my usecase. Even if the executab= le code has to make different calls when it comes up as secondary, is there= a way for the usercode to know that it has really come up as secondary whe= n the --proc-type=3Dauto is used ? Regards -Prashant -----Original Message----- From: Richardson, Bruce [mailto:bruce.richardson@intel.com] Sent: Friday, November 22, 2013 7:02 PM To: Prashant Upadhyaya; dev@dpdk.org Subject: RE: Query regarding multiple processes in DPDK Hi Prashant > =3D=3D=3D > The EAL also supports an auto-detection mode (set by EAL > --proc-type=3Dauto flag), whereby an Intel(r) DPDK process is started as > a secondary instance if a primary instance is already running. > =3D=3D=3D > > 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 first already running) again with -proc-type=3Dauto, then > this second instance automatically becomes secondary ? [BR] Yes, that is the idea. > > 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. 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D Please refer to http://www.aricent.com/legal/email_disclaimer.html for important disclosures regarding this electronic communication. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D