Single Root Input/Output Virtualisation:
SRIOV

Single Root Input/Output Virtualisation:

Single Root Input/Output Virtualisation:

One PCI device acts as multiple virtual devices. Physical PCI Devices are??referred as PFs (Physical Functions) and when virtualisation enabled in that physical devices VFs (Virtual Functions) will be created.

??Each VFs are associated with Bus, Device, Function Number and has PCI Memory??space.

??Enable and Disable of VFs can be done changing the configuration as shown below

?/sys/class/net/<Physical_Interface_Name>/devices/sriov_numvfs

eg:
  
  echo 4 > /sys/class/net/eth10/devices/sriov_numvfs        

Some of the following steps explains about enabling VFs:

1) Get the list of PCI Devices are connecting in system

$ lspci

# This will provide the information about the interfaces(PCI) devices list

$ lspci -s $BUS_ID -v

#Provide detailed information of BUS_ID and we can see the SR-IO in capabilities


mstconfig -d <BUS ID> query SRIOV_EN 

#Provide the information SRIOV capabilities
# Output: SRIOV_EN  True(1)        

2) Creating the virtual functions for the PCI device only in case of SRIOV enabled

/sys/class/net/$inteface_name/devices/sriov_numvfs

# Update the number of VF required for the functionality        

3) Make the virtual functions persistent by execution the creation scripts in udev rules.

  1. ??create the custom rules in /etc/udev/rules.d/
  2. add the service which helps to creates VFs

11_sriov_enable.rules

TAG+="systemd", ENV{SYSTEMD_WANTS}+="initiate_sriov_vf.services"        

3. Prepare the service file:

[Service]

Type=oneshot

RemainAfterExit=yes

ExecStart=/home/initiate_vf_service start

        
ExecStop=/home/initiate_vf_service stop
        

4) After rebooting the machine, we can see the rules will be invoked to execute??initialisation VF script and creates the specified VFs.

Note: Assignment and TC rules definitions for VFs are based on Project Requirement.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了