Docker Community Forums

Share and learn in the Docker community.

Can docker containers connect to SRIOV VFs


(Nishant80) #1

It would be awesome to make use of existing SR-IOV capable NICs. I would like to understand if a docker containers can be attached to Virtual Functions such that they communicate over the NICs hardware bridge (instead of the virtual docker0 bridge).

To be more specific, consider this scenario:
Container A is attached to VF#1
Container B is attached to VF#2

A and B are linked together and when they exchange data it should happen over the hardware bridge on NIC (instead of docker0). The goal is to have better networking performance.

Is the above supported natively in docker?

If not, can pipework help here? (I have heard pipework can do amazing things)

Examples would be very helpful


(Nishant80) #2

I made it work by modifying pipework script so that it assigns the VF to container’s net namespace instead of creating a macvlan subinterface. More details here:


(Nishant80) #3

An in-depth discussion on this topic here:
https://groups.google.com/forum/#!topic/docker-user/wg7LUMuvtbY


(Rakurai) #4

The work and discussion by nishant80 and others in the above links was very helpful in the work I did for a recent paper on the network performance of Docker containers with SR-IOV, macvlan, and software switches. I wrote a blog post with the implementation details here and the paper is here, which should be a good start for anyone trying to get it working.