k8snetworkplumbingwg / sriov-cni

DPDK & SR-IOV CNI plugin
Apache License 2.0
298 stars 147 forks source link

Feature to specify VFs range to SRIOV #270

Closed sainath40 closed 1 year ago

sainath40 commented 1 year ago

What would you like to be added?

A Feature to specify VFs range so that a VF from the mentioned range will be allocated to the POD.

What is the use case for this feature / enhancement?

I have 8 vfs that are created from a PF. I want only first 4 vfs to be allocated by SRIOV to my datapath pods. And the remaining 4 vfs (5 to 8 ) to be managed by a user application.

SchSeba commented 1 year ago

this is possible using the sriov-operator or with only the sriov-device-plugin. you can put a range in the request.

sainath40 commented 1 year ago

I use sriov-device-plugin in my environment, can you share an example on how to do this ?

SchSeba commented 1 year ago

https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin#config-parameters

you can select by the PFname with a range

"pfNames": ["netpf0#0,2-7,9"]
sainath40 commented 1 year ago

Thanks @SchSeba , I was able to give VF range using "rootDevices": ["netpf0#0,2-7,9"]