* [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device
@ 2017-05-21 3:53 Wu, Xiaoban
2017-05-22 3:35 ` Tan, Jianfeng
2017-05-23 20:21 ` Neeraj Tandon (netandon)
0 siblings, 2 replies; 4+ messages in thread
From: Wu, Xiaoban @ 2017-05-21 3:53 UTC (permalink / raw)
To: users
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
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device
2017-05-21 3:53 [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device Wu, Xiaoban
@ 2017-05-22 3:35 ` Tan, Jianfeng
2017-05-23 3:44 ` Wu, Xiaoban
2017-05-23 20:21 ` Neeraj Tandon (netandon)
1 sibling, 1 reply; 4+ messages in thread
From: Tan, Jianfeng @ 2017-05-22 3:35 UTC (permalink / raw)
To: Wu, Xiaoban, users
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device
2017-05-22 3:35 ` Tan, Jianfeng
@ 2017-05-23 3:44 ` Wu, Xiaoban
0 siblings, 0 replies; 4+ messages in thread
From: Wu, Xiaoban @ 2017-05-23 3:44 UTC (permalink / raw)
To: Tan, Jianfeng, users
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 <jianfeng.tan@intel.com>
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 virtio_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 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device
2017-05-21 3:53 [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device Wu, Xiaoban
2017-05-22 3:35 ` Tan, Jianfeng
@ 2017-05-23 20:21 ` Neeraj Tandon (netandon)
1 sibling, 0 replies; 4+ messages in thread
From: Neeraj Tandon (netandon) @ 2017-05-23 20:21 UTC (permalink / raw)
To: Wu, Xiaoban, users
Check the /var/run/usvhost . Do you have the socket created there ? Is that visible from docker.
Sometime back when I used a container, I passed a mac address for DPDK Parameters when starting the dpdk test_pmd application in container.
Regards,
Neeraj
On 5/20/17, 8:53 PM, "users on behalf of Wu, Xiaoban" <users-bounces@dpdk.org on behalf of Xiaoban_Wu@student.uml.edu> 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
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-23 20:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-21 3:53 [dpdk-users] docker container, EAL: failed to initialize virtio_user0 device Wu, Xiaoban
2017-05-22 3:35 ` Tan, Jianfeng
2017-05-23 3:44 ` Wu, Xiaoban
2017-05-23 20:21 ` Neeraj Tandon (netandon)
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).