Hi Shiv, Not sure about vhost interfaces, but should be doable with tap/veth pairs. Refer to below links:
https://wiki.fd.io/view/VPP/Configure_VPP_TAP_Interfaces_For_Container_Routing https://wiki.fd.io/view/VPP/Configure_VPP_As_A_Router_Between_Namespaces I had used veth pairs to communicate with each other via VPP instances running under different lxc containers. Procedure I followed was as below and i think same should work for docker as well: 1. Create Veth pair with command: sudo ip link add name <container1 interface> type veth peer name <container2 interface> 2. Findout the network namespace of conatiners and move the veth interfaces to corresponding namespaces: sudo lxc-info --name <container_name> | grep "PID:" | awk '{print $2}' ---> for lxc containers docker inspect -f '{{.State.Pid}}' <container_name> ----> for docker sudo ip link set netns <lxc-pid/docker-pid> dev <link to be moved to container> 3. Login to VPP within the container and take over the host interface with the command: create host-interface name <container interface> -- HTH, Akshaya N -----Original Message----- From: Shiv Dev <shivfs...@gmail.com> To: vpp-dev@lists.fd.io Subject: [vpp-dev] Docker containers Date: Thu, 28 Dec 2017 21:51:15 +0530 Hi VPP Team, I am trying to interface docker containers to VPP through an vhost-user device. The page here (https://wiki.fd.io/view/VPP/Use_VPP_to_connect_VMs_Using_Vhost-User_Interface) explains how to do it for VMs. Is there any page that explains it for docker containers ? As explained in the above page, I have setup the vhost-user interfaces in VPP. I am getting a problem when I try to pass the vhost information to the docker container. vpp# show vhost-user Virtio vhost-user interfaces .. Interface: VirtualEthernet0/0/0 (ifindex 1) virtio_net_hdr_sz 0 ... Interface: VirtualEthernet0/0/1 (ifindex 2) virtio_net_hdr_sz 0 .. shiv@shiv-lenovo-v310:~/work/docker$ docker run -it -v /tmp/sock1.sock:/tmp/sock1.sock -v /mnt/huge_vhost/:/mnt/huge_vhost dpdk_app_l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci --vdev=virtio-user0,path=/tmp/sock1.sock -- -p 0x1 EAL: Detected 4 lcore(s) EAL: No free hugepages reported in hugepages-1048576kB EAL: Cannot obtain physical addresses: Success. Only vfio will function. EAL: Failed to get current mempolicy: Operation not permitted. Assuming MPOL_DEFAULT. ERROR: failed to parse device "virtio-user0" EAL: Unable to parse device 'virtio-user0,path=/tmp/sock1.sock' EAL: Error - exiting with code: 1 Cause: Invalid EAL arguments Basically, how do we pass virtio-user devices to container app ? Is there any way to check if the virtio-user devices are available in the kernel ? Regards, Shiv _______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev -- Regards, Akshaya N
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev