From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5A3FB23B for ; Mon, 22 May 2017 05:35:51 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2017 20:35:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,377,1491289200"; d="scan'208";a="1133281507" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.238.224.122]) ([10.238.224.122]) by orsmga001.jf.intel.com with ESMTP; 21 May 2017 20:35:49 -0700 To: "Wu, Xiaoban" , "users@dpdk.org" References: From: "Tan, Jianfeng" Message-ID: <3fd5da5b-3a95-7be5-ba63-ffc5b7c9bd5d@intel.com> Date: Mon, 22 May 2017 11:35:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 22 May 2017 03:35:52 -0000 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 virtual 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=punix:$ovs-dir/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach > 3. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true > 4. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="512,512" > 5. ovs-vswitchd unix:$ovs-dir/var/run/openvswitch/db.sock --pidfile --detach --log-file=$ovs-dir/temp.log > > Setup bridge and ports > > 1. ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev > 2. ovs-vsctl add-port br0 vhost-user1 -- set Interface vhost-user1 type=dpdkvhostuser ofport_request=1 > 3. ovs-vsctl add-port br0 vhost-user2 -- set Interface vhost-user2 type=dpdkvhostuser ofport_request=2 > 4. ovs-ofctl add-flow br0 priority=1000,in_port=1,actions=output:2 > 5. ovs-ofctl add-flow br0 priority=1000,in_port=2,actions=output: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=128,0 --vdev=virtio_user0,path=/var/run/usvhost --file-prefix="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 >