k8snetworkplumbingwg / sriov-network-device-plugin

SRIOV network device plugin for Kubernetes
Apache License 2.0
390 stars 174 forks source link

Add vDPA support #305

Closed amorenoz closed 2 years ago

amorenoz commented 3 years ago

vDPA technology allows Pods to consume accelerated device interfaces while using standard virtio / vhost drivers. This is possible because vdpa-capable devices implement the standard VirtIO ring layout that is used for the datapath. As for the control path, a framework was added to the linux kernel (first introduced in 5.7 and enhanced in 5.8 and 5.9) to translate virtio/vhost commands to vendor specific operations.

The vdpa kernel framework is exposed to userspace as a system bus (/sys/bus/vdpa). Vendor drivers, once bound to their VFs, create vdpa devices (that can be listed under /sys/bus/vdpa/devices). Currently two vdpa drivers are available (under /sys/bus/vdpa/drivers): vhost_vdpa and virtio_vdpa

What would you like to be added?

vdpa support should be added to the SR-IOV Device Plugin so Pods can consume vdpa devices that are created on top of SR-IOV VFs

What is the use case for this feature / enhancement?

vDPA has many usecases, mainly the capability to consume accelerated network devices (which theoretically could be as performant as direct SR-IOV devices) using standard drivers (e.g: virtio-net or virtio-user PMD driver in DPDK)

arunsharma75 commented 3 years ago

Hey Adrián Moreno, I have recently (today) signed-up on this repository. I am interested in this project as I want to make virtio devices available in K8s pod. Could you please let me know how I can understand and contribute?

amorenoz commented 3 years ago

Hi @arunsharma75. Welcome! The work is still ongoing but close to being in a good shape. Review are wellcome on both Device Plugin and CNI PRs. Also, checkout this repo containing instructions on how to test the E2E solution.

arunsharma75 commented 3 years ago

Thanks a lot Adrián Just wondering if the solution will work for Kernel 3.10? is there any IFCVF driver available for kernel 3.10? I wanted to test with PAC N3000 card.

amorenoz commented 3 years ago

@arunsharma75, the vDPA kernel framework was introduced in 5.7. If you need to work with an old kernel, you can try to make it work with the DPDK framework. It's still WIP but we have made it work on PoCs. Shoot me an email or ping me on slack if you need assistance setting it up