All of lore.kernel.org
 help / color / mirror / Atom feed
* Run 2 different testpmd from the same machine
@ 2016-09-12 11:18 Keren Hochman
  2016-09-12 13:29 ` Wiles, Keith
  0 siblings, 1 reply; 3+ messages in thread
From: Keren Hochman @ 2016-09-12 11:18 UTC (permalink / raw)
  To: dev

Hi,
I tried to run 2 instances of testpmd from the same machine but received a
message:  Cannot get hugepage information when I tried to run the second
instance. Is there a way to disable hugepages or allow to instances to
access it ? Thanks. keren

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Run 2 different testpmd from the same machine
  2016-09-12 11:18 Run 2 different testpmd from the same machine Keren Hochman
@ 2016-09-12 13:29 ` Wiles, Keith
  2016-09-28  7:36   ` Keren Hochman
  0 siblings, 1 reply; 3+ messages in thread
From: Wiles, Keith @ 2016-09-12 13:29 UTC (permalink / raw)
  To: Keren Hochman; +Cc: dev


Regards,
Keith

> On Sep 12, 2016, at 6:18 AM, Keren Hochman <keren.hochman@lightcyber.com> wrote:
> 
> Hi,
> I tried to run 2 instances of testpmd from the same machine but received a
> message:  Cannot get hugepage information when I tried to run the second
> instance. Is there a way to disable hugepages or allow to instances to
> access it ? Thanks. keren

Running two instances or more DPDK applications you need to make sure the resources are split up correctly. You did not supply your command lines being used, but I will try to state how it is done.

First memory or huge pages must to allocated to each instance using the —socket-mem 128,128 or —socket-men 128 if you only have one socket in your system. Make sure you have enough huge pages allocated in the /etc/sysctl.conf file for both instances. In the —socket-mem 128,128 you are giving 256 huge pages to one instance and if the second instance used —socket-mem 256,256 then 512 pages, which means you need 256+512 huge pages in the system.

Next the huge page files in the /dev/hugepage directory must have different prefixes by using the —file-prefix option giving different file prefixes for each instance. If you have already run DPDK instance once without the option please ‘sudo rm -fr /dev/hupages/*’ to release the current huge pages.

Next you need to make sure you blacklist the port using the -b option on the command line of the ports not used by this instance. Each instance needs to blacklist the ports not being used. This seems to be the easiest for me, but you could look into use the whitelist option as well.

Next make sure you allocate different cores to each instance using the -c or -l option, the -l option is a bit easier to read IMO.

Next use the —proc-type auto in both instances just to be clear. This could be optional I think.

I hope this helps. You can also pull down Pktgen and look at the pktgen-master.sh and pktgen-slave.sh scripts and modify them for your needs. http://dpdk.org/download <http://dpdk.org/download>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Run 2 different testpmd from the same machine
  2016-09-12 13:29 ` Wiles, Keith
@ 2016-09-28  7:36   ` Keren Hochman
  0 siblings, 0 replies; 3+ messages in thread
From: Keren Hochman @ 2016-09-28  7:36 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

Is there any way to connect to the same pci from 2 different applications?
Both applications do not transmit any data, and one application only uses
rte_eal_init and rte_eth_link?
Thank you,
Keren

On Mon, Sep 12, 2016 at 4:29 PM, Wiles, Keith <keith.wiles@intel.com> wrote:

>
> Regards,
> Keith
>
> > On Sep 12, 2016, at 6:18 AM, Keren Hochman <keren.hochman@lightcyber.com>
> wrote:
> >
> > Hi,
> > I tried to run 2 instances of testpmd from the same machine but received
> a
> > message:  Cannot get hugepage information when I tried to run the second
> > instance. Is there a way to disable hugepages or allow to instances to
> > access it ? Thanks. keren
>
> Running two instances or more DPDK applications you need to make sure the
> resources are split up correctly. You did not supply your command lines
> being used, but I will try to state how it is done.
>
> First memory or huge pages must to allocated to each instance using the
> —socket-mem 128,128 or —socket-men 128 if you only have one socket in your
> system. Make sure you have enough huge pages allocated in the
> /etc/sysctl.conf file for both instances. In the —socket-mem 128,128 you
> are giving 256 huge pages to one instance and if the second instance used
> —socket-mem 256,256 then 512 pages, which means you need 256+512 huge pages
> in the system.
>
> Next the huge page files in the /dev/hugepage directory must have
> different prefixes by using the —file-prefix option giving different file
> prefixes for each instance. If you have already run DPDK instance once
> without the option please ‘sudo rm -fr /dev/hupages/*’ to release the
> current huge pages.
>
> Next you need to make sure you blacklist the port using the -b option on
> the command line of the ports not used by this instance. Each instance
> needs to blacklist the ports not being used. This seems to be the easiest
> for me, but you could look into use the whitelist option as well.
>
> Next make sure you allocate different cores to each instance using the -c
> or -l option, the -l option is a bit easier to read IMO.
>
> Next use the —proc-type auto in both instances just to be clear. This
> could be optional I think.
>
> I hope this helps. You can also pull down Pktgen and look at the
> pktgen-master.sh and pktgen-slave.sh scripts and modify them for your
> needs. http://dpdk.org/download <http://dpdk.org/download>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-28  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 11:18 Run 2 different testpmd from the same machine Keren Hochman
2016-09-12 13:29 ` Wiles, Keith
2016-09-28  7:36   ` Keren Hochman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.