From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D59397E6A for ; Wed, 8 Oct 2014 15:37:42 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 08 Oct 2014 06:44:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,677,1406617200"; d="scan'208";a="602285652" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 08 Oct 2014 06:44:45 -0700 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 8 Oct 2014 14:44:31 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.21]) by IRSMSX153.ger.corp.intel.com ([169.254.9.42]) with mapi id 14.03.0195.001; Wed, 8 Oct 2014 14:44:31 +0100 From: "Murthy, Krishna J" To: "dev@dpdk.org" Thread-Topic: [README]:Running DPDK in a LXC-based Container Thread-Index: Ac/i/d7CMa29CAo4TmS5JsGqVnrlHw== Date: Wed, 8 Oct 2014 13:44:30 +0000 Message-ID: <910C5016C9E77747B5B12EF34B54ADA92A3FA2CE@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [README]:Running DPDK in a LXC-based Container 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: Wed, 08 Oct 2014 13:37:43 -0000 Running DPDK in a LXC-based Container = =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=3D 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 inte= rface 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 N= IC we need to use uio device file system = veth uses a paired set of network interfaces, one inside the container spec= ified = 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 h= ost = if the name of the bridge is specified by the option lxc.network.link. # networking-veth lxc.network.type =3D veth lxc.network.link =3D virbr0 lxc.network.veth.pair =3D vc0 lxc.network.name =3D eth0 lxc.network.hwaddr =3D ac:de:48:34:01:01 lxc.network.flags =3D up lxc.network.ipv4 =3D 192.168.122.12/24 lxc.network.ipv4.gateway =3D 192.168.122.1 = once you have this your LXC container will have an IP using bridge. Next st= ep = is to install DPDK igb_uio on the host and then bind it to the the 10G Nian= tic = NIC ports as usual. Once installed do ls -l /dev/uio* on the host. These ar= e 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 a= ccess 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 =3D 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 prov= ide = access to hugetlbfs file system to the container using the LXC config file. = lxc.mount.entry =3D /mnt/huge mnt/huge none bind,create=3Ddir 0 0 once you have this DPDK application will be able to use the host mounted hu= ge = 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 s= ole use of the intended recipient(s). Any review or distribution by others = is strictly prohibited. If you are not the intended recipient, please conta= ct the sender and delete all copies.