DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [README]:Running DPDK in a LXC-based Container
@ 2015-06-17  6:01 Mohit Saxena
  0 siblings, 0 replies; 8+ messages in thread
From: Mohit Saxena @ 2015-06-17  6:01 UTC (permalink / raw)
  To: dev

Hi All,

I am trying to run DPDK application on Ubuntu based Conatiner, I had
followed the steps as described by "Krishnamurthy Jambur" in his earlier
post

lxc.cgroup.devices.allow = c 249:* rwm
mknod /dev/uio0 c 249 0
lxc.mount.entry = /mnt/huge mnt/huge none bind,create=dir 0 0

But after starting the application inside container I am getting the below
error

EAL: Master lcore 4 is ready (tid=7491b900;cpuset=[4])
PMD: ENICPMD trace: rte_enic_pmd_init
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 rte_igb_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1521 rte_igb_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:02:00.2 on NUMA socket 0
EAL:   probe driver: 8086:1521 rte_igb_pmd
EAL: Cannot open /sys/class/uio/uio0/device/config: Permission denied
EAL: Error - exiting with code: 1
  Cause: Requested device 0000:02:00.2 cannot be used

Any pointers to resolve this error?

-- 
Thanks & Regards,
Mohit Prakash Saxena
Citrix R & D India Pvt. Ltd.
Mb: +91 90368 98569 <#UNIQUE_ID_SafeHtmlFilter_>
Email: mohit.saxena@citrix.com <mohitprakash.saxena@citrix.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [README]:Running DPDK in a LXC-based Container
@ 2016-02-11  5:01 Pushpasis Sarkar
  2016-02-11 12:04 ` Alejandro Lucero
       [not found] ` <1455193461352.1476199754@boxbe>
  0 siblings, 2 replies; 8+ messages in thread
From: Pushpasis Sarkar @ 2016-02-11  5:01 UTC (permalink / raw)
  To: dev, krishna.j.murthy

Hi Krishna,

Off-late I have been investigating DPDK on Linux containers.. I came across
this thread and found it very helpful.. But I still find some issues when I
try to run the same DPDK application simultaneously on more than one LXC
containers..

Even when following the example provided in this thread. I am unable to run
the same application simultaneously in both host and more than one LXC
containers..
Is there any way to achieve the same..

The basic issue I see in the DPDK design that kit assumes that it will use
/mnt/huge/ file-path before using it.. making it unavailable to any other
process.. Can this be changed to use the sub-directory /mnt/huge/$(uname
-n)/<PID>. That way it cannot stop other process running on host/lxc from
using the hugepages.. I have donot have much knowledge about how the
hugepage filesystem works.. so pardon my ignorance... :)

Looking forward to some help on this.

Regards,
-Pushpasis

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [dpdk-dev] [README]:Running DPDK in a LXC-based Container
@ 2014-10-08 13:44 Murthy, Krishna J
  2014-10-10  0:26 ` Xie, Huawei
  0 siblings, 1 reply; 8+ messages in thread
From: Murthy, Krishna J @ 2014-10-08 13:44 UTC (permalink / raw)
  To: dev

                 Running DPDK in a LXC-based Container 
================================================================================
Author: Krishnamurthy Jambur

Note: This README assumes you have the a LXC based container running on 
      the IA platform. This was tested on Windriver OVP Linux 6.0 

In this README we are will go through some of the unique steps involved 
in attaching a NIC to the LXC-based Container and the running a sample 
DPDP application in the container. 

1. Attaching NIC device to the container
----------------------------------------
Let's assume for this example that you would like to have a management interface
and then separate dedicated 10G NIC to run DPDK. With this requirement your LXC 
config file should have one networking sections one for veth. For the 10G NIC we
need to use uio device file system 

veth uses a paired set of network interfaces, one inside the container specified 
by the option lxc.network.name, and one in the host specified by the option 
lxc.network.pair. The latter is attached automatically to a bridge in the host 
if the name of the bridge is specified by the option lxc.network.link.

# networking-veth
lxc.network.type = veth
lxc.network.link = virbr0
lxc.network.veth.pair = vc0
lxc.network.name = eth0
lxc.network.hwaddr = ac:de:48:34:01:01
lxc.network.flags = up
lxc.network.ipv4 = 192.168.122.12/24
lxc.network.ipv4.gateway = 192.168.122.1
 
once you have this your LXC container will have an IP using bridge. Next step 
is to install DPDK igb_uio on the host and then bind it to the the 10G Niantic 
NIC ports as usual. Once installed do ls -l /dev/uio* on the host. These are the
uioX interface corresponding to the the NIC ports to which DPDK igb_uio is 
binded. DPDK application will use these device files. In order to provide access
to these device files inside the LXC container not down the major number [e.g. 
in this case 249] and add this config to the LXC config file 

lxc.cgroup.devices.allow = c 249:* rwm

once you start the container then you need to create these uio0, uio1,... 
devices nodes inside the container file system using mknod command as usual 
with the same major and minor numbers. 

mknod /dev/uio3 c 249 0
mknod /dev/uio3 c 249 3
mknod /dev/uio2 c 249 2
mknod /dev/uio1 c 249 1

2. Host allocated Huge page access inside container
----------------------------------------------------
For this set it is assumes that you would have pre-allocated hugepages and 
mounted on the on the host. Once you have this set-up then you need to provide 
access to hugetlbfs file system to the container using the LXC config file. 

lxc.mount.entry = /mnt/huge mnt/huge none bind,create=dir 0 0

once you have this DPDK application will be able to use the host mounted huge 
pages in the container. 

Next step is run the DPDK application as usual in the LXC Container

Regards,
Krishna 

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

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

end of thread, other threads:[~2016-02-11 16:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17  6:01 [dpdk-dev] [README]:Running DPDK in a LXC-based Container Mohit Saxena
  -- strict thread matches above, loose matches on Subject: below --
2016-02-11  5:01 Pushpasis Sarkar
2016-02-11 12:04 ` Alejandro Lucero
     [not found] ` <1455193461352.1476199754@boxbe>
2016-02-11 12:56   ` Pushpasis Sarkar
2016-02-11 13:08     ` Bruce Richardson
     [not found]     ` <1455197317303.1476199754@boxbe>
2016-02-11 16:19       ` Pushpasis Sarkar
2014-10-08 13:44 Murthy, Krishna J
2014-10-10  0:26 ` Xie, Huawei

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).