DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Keren Hochman <keren.hochman@lightcyber.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Running 2 process on the same machine
Date: Mon, 7 Nov 2016 22:36:37 +0000	[thread overview]
Message-ID: <60A9A962-53C9-4050-8D84-74AD13CCE09B@intel.com> (raw)
In-Reply-To: <CAJq3SQ6Okz8ZzK2fEymgf9SoDLznBUf52QBzAHVJL=k6RaCrxQ@mail.gmail.com>


> On Nov 7, 2016, at 7:28 AM, Keren Hochman <keren.hochman@lightcyber.com> wrote:
> 
> Hi,
> I need to run 2 process that uses dpdk on the same machine. One uses dpdk
> drivers, and the other just read from a pcap file.  If I disable hugepages
> in the second process rte_mempool_create fails. What is the correct way to
> handle this?

If you look at the two scripts in Pktgen pktgen-master.sh and pktgen-slave.sh these two scripts setup two instances of pktgen on the same machine. Plus you can read the README.md file.

http://dpdk.org/browse/apps/pktgen-dpdk/refs/

You have to make sure you have enough memory (huge pages) allocated for both instances to run.

Then use —file-prefix XX to give each instance a different prefix for the huge page files in /dev/hugepages if that is the location of the files on your system. I would remove any files in that directory to free up the memory.

Use the —socket-mem to allocate the correct amount of memory for each instances this way DPDK does not consume all the pages for a given instance.

Make sure you blacklist the ports you do not want on the first instance using -b option and then blacklist the ports from the first instance while allowing the other ports to be used on the second one.

That should do it for most cases.

> 
> Thanks, Keren

Regards,
Keith


  reply	other threads:[~2016-11-07 22:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 15:28 Keren Hochman
2016-11-07 22:36 ` Wiles, Keith [this message]
2016-11-08  9:44   ` Keren Hochman
2016-11-08 12:02     ` Keren Hochman
2016-11-14 15:44       ` Bruce Richardson

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=60A9A962-53C9-4050-8D84-74AD13CCE09B@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=keren.hochman@lightcyber.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).