DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Prashant Upadhyaya <prashant.upadhyaya@aricent.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Query regarding multiple processes in DPDK
Date: Fri, 22 Nov 2013 13:31:47 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B01A976C1F@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <C7CE7EEF248E2B48BBA63D0ABEEE700C45DFEF185F@GUREXMB01.ASIAN.AD.ARICENT.COM>

Hi Prashant

> ===
> The EAL also supports an auto-detection mode (set by EAL --proc-type=auto
> flag), whereby an Intel(r) DPDK process is started as a secondary instance if
> a primary instance is already running.
> ===
> 
> 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 = 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=auto, 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 want to have slightly different code paths for primary and secondary instances. For example, if a process is running as primary instance, it will probably call rte_mempool_create or rte_ring_create. A secondary instance which wants to use these should instead call rte_mempool_lookup and rte_ring_lookup instead. 
For an example of how to write the one binary to be used as both primary and secondary process, I suggest looking at the symmetric_mp example application in the examples/multi_process/ directory.

Regards,
/Bruce

  reply	other threads:[~2013-11-22 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 12:50 Prashant Upadhyaya
2013-11-22 13:31 ` Richardson, Bruce [this message]
2013-11-22 13:40   ` Prashant Upadhyaya
2013-11-22 13:46     ` Prashant Upadhyaya
2013-11-25  4:08       ` Prashant Upadhyaya
2013-11-25  9:29         ` Richardson, Bruce
2013-11-25 13:57           ` Prashant Upadhyaya
2013-11-25 19:55             ` Jeff Venable, Sr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AF69C657FD0841A61C55336867B5B01A976C1F@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=prashant.upadhyaya@aricent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).