From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0077.outbound.protection.outlook.com [104.47.41.77]) by dpdk.org (Postfix) with ESMTP id A891B23B for ; Tue, 23 May 2017 05:44:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=studentuml.onmicrosoft.com; s=selector1-student-uml-edu; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8vsCMg+eIikm2RH9kFwKBxyvKZy4uaiJR3Q5BpL4pQc=; b=znJiuMjFoOLYJLVAnA46rnhlVZFL6DrM8dbivQNcJIu2seC2revMJB6gbU1nZCsTqLwv5lfZp9bYEDngeDzQyoAMolzsS+W0S33XQGgRI1/azdCVgQVesqlNunqJ8SVvdo8XBWPfYK62KVcCaFmzEHeg/VdB5hWPt7+uBvWL/Rk= Received: from BN6PR02MB2706.namprd02.prod.outlook.com (10.175.95.20) by BN6PR02MB2707.namprd02.prod.outlook.com (10.175.95.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 03:44:56 +0000 Received: from BN6PR02MB2706.namprd02.prod.outlook.com ([10.175.95.20]) by BN6PR02MB2706.namprd02.prod.outlook.com ([10.175.95.20]) with mapi id 15.01.1101.019; Tue, 23 May 2017 03:44:56 +0000 From: "Wu, Xiaoban" To: "Tan, Jianfeng" , "users@dpdk.org" Thread-Topic: [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device Thread-Index: AQHS0eW1+CBYoW4Uc0S8vnojCg47O6H/tTaAgAGT3aM= Date: Tue, 23 May 2017 03:44:56 +0000 Message-ID: References: , <3fd5da5b-3a95-7be5-ba63-ffc5b7c9bd5d@intel.com> In-Reply-To: <3fd5da5b-3a95-7be5-ba63-ffc5b7c9bd5d@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=student.uml.edu; x-originating-ip: [2603:10b6:404:f5:cafe::dc] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BN6PR02MB2707; 7:6z9ONRcE+4Y5W2Ziez0vrlDMvONXFjgqriUUdXsHj4svvj86A1O250BTPGpXKYzxs/B18lyLziFQ7asbua/F0qLst/y+xPLQHd2LCOVWzzPPBdX44AhN05CWalfzGjgLEF5OgBR+8I5lM9BDVtyEZB4OwBtqXuNxrY1YICKv7SOnblOYOw6zKz+IUc9J2Y9lUoQ8K0SmRWDE65sKOH1mG1HDM8rpWT6ZtpIlB2iYa9xYzaAGonkKxvKe0hH+9H3gMpXAeaI+uPdFuOYKhx8VPOGBj1Vfk+AhhhP8Og7aYUlEFcM+BCNry6gO3WLh2igbWmbzHR7JaErIRdYn9FRB6A== x-ms-traffictypediagnostic: BN6PR02MB2707: x-ms-office365-filtering-correlation-id: 235fc087-9dc9-4bda-fa03-08d4a18e1447 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR02MB2707; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(21532816269658)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123564025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(6072148); SRVR:BN6PR02MB2707; BCL:0; PCL:0; RULEID:; SRVR:BN6PR02MB2707; x-forefront-prvs: 0316567485 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(45914002)(377454003)(24454002)(6506006)(6116002)(72206003)(2501003)(8676002)(3280700002)(86362001)(2900100001)(81166006)(8936002)(3660700001)(5660300001)(122556002)(33656002)(53936002)(229853002)(102836003)(54356999)(7736002)(50986999)(75432002)(2906002)(74316002)(76176999)(88552002)(7696004)(54896002)(25786009)(6436002)(2950100002)(9686003)(478600001)(77096006)(42882006)(38730400002)(99286003)(53546009)(6246003)(189998001)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB2707; H:BN6PR02MB2706.namprd02.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: student.uml.edu X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2017 03:44:56.2751 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4c25b8a6-17f7-46f9-83f0-54734ab81fb1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2707 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 03:44:59 -0000 Hi Jianfeng, Thanks very much for your reply. I have checked the log file of ovs, it did= show that the port had failed to be added to the bridge. So I manually removed the auto-generated socket file and started over again= the ovs, now everything works pretty well. Best wishes, Xiaoban ________________________________ From: Tan, Jianfeng Sent: Sunday, May 21, 2017 11:35:49 PM To: Wu, Xiaoban; users@dpdk.org Subject: Re: [dpdk-users] docker container, EAL: failed to initialize virti= o_user0 device Hi, On 5/21/2017 11:53 AM, Wu, Xiaoban wrote: > Hi DPDK Users, > > > I am trying to use docker container and ovs(2.6.0)-dpdk(16.07) to setup a= test. I want to setup two docker containers, each of them will use a virtu= al device (socket) created by the ovs-dpdk. The final purpose would let the= two containers talk to each other. > > > Setup ovs-dpdk > > 1. ovsdb-tool create $ovs-dir/etc/openvswitch/conf.db $ovs-dir/share/= openvswitch/vswitch.ovsschema > 2. ovsdb-server --remote=3Dpunix:$ovs-dir/var/run/openvswitch/db.sock= --remote=3Ddb:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach > 3. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=3Dtr= ue > 4. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-me= m=3D"512,512" > 5. ovs-vswitchd unix:$ovs-dir/var/run/openvswitch/db.sock --pidfile = --detach --log-file=3D$ovs-dir/temp.log > > Setup bridge and ports > > 1. ovs-vsctl add-br br0 -- set bridge br0 datapath_type=3Dnetdev > 2. ovs-vsctl add-port br0 vhost-user1 -- set Interface vhost-user1 ty= pe=3Ddpdkvhostuser ofport_request=3D1 > 3. ovs-vsctl add-port br0 vhost-user2 -- set Interface vhost-user2 ty= pe=3Ddpdkvhostuser ofport_request=3D2 > 4. ovs-ofctl add-flow br0 priority=3D1000,in_port=3D1,actions=3Doutpu= t:2 > 5. ovs-ofctl add-flow br0 priority=3D1000,in_port=3D2,actions=3Doutpu= t:1 > > Run the docker container > > 1. docker run -it --privileged -v $ovs-dir/var/run/openvswitch/vhost-= user1:/var/run/usvhost -v /mnt/huge/:/dev/hugepages/ $docker-image bash > > Run the dpdk application in the docker container > > 1. $dpdk-app -c 0x01 --socket-mem=3D128,0 --vdev=3Dvirtio_user0,path= =3D/var/run/usvhost --file-prefix=3D"docker1" > > However, I encountered this error > PMD: vhost_user_setup(): connect error, Connection refused Seems that OVS is not listening on this unix socket. Could you check OVS log to see if the vhost-user ports are created successfully? Thanks, Jianfeng > PMD: virtio_user_dev_init(): backend set up fails > PMD: virtio_user_pmd_devinit(): virtio_user_dev_init fails > EAL: failed to initialize virtio_user0 device > > It seems like the application in the docker container cannot connect the = socket created by the ovs-dpdk. > > Can anybody please help me and point out some possible solutions? Looking= forward to your reply. Thanks very much for your help. > > Best wishes, > Xiaoban >