Got it

SR-IOV Technology

Latest reply: Jan 26, 2022 15:14:34 1381 31 19 0 0

Dear all, 


Today we will discuss about the SR-IOV technology. Please check out the below sections for more information on the topic.

 

SR-IOV TECHNOLOGY INTRODUCTION

 

The SR-IOV technology is a hardware-based virtualization solution. It allows the efficient sharing of PCIe devices between VMs and is implemented on the hardware to obtain I/O performance comparable to that of the local host.


The following introduces the architecture and disadvantages of the software sharing solution and then analyzes how the SR-IOV helps implement the hardware sharing solution.


SOFTWARE I/O SHARING ARCHITECTURE

 

1

 

Software-based I/O sharing uses the simulation technology to provide every VM with logical hardware devices. The simulation layer is located between the VM OS and the actual physical devices.


The virtual device can parse I/O commands and translate VM addresses into physical addresses of hosts. The software must be able to combine parallel I/O operations of multiple VMs into a single I/O data stream. This task is implemented by the software virtual switch.


The advantage of software-based I/O sharing is that multiple types of physical devices can be supported by means of software simulation. However, software simulation can implement functional subsets of physical devices and may fail to use advanced functions of physical devices.


When the software virtual switch implemented by VMM routes packets between physical devices and multiple VMs, a certain amount of CPU overhead is incurred, which may decrease the throughput of the I/O device. For example, when a 10 Gbit/s physical network adapter works in software sharing mode, its throughput may be only 4.5 to 6.5 Gbit/s.


SR-IOV HARDWARE SHARING ARCHITECTURE


2 

 

The SR-IOV architecture allows one physical device to support multiple virtual functions. The SR-IOV introduces two new function types:


  • physical functions (PFs) - used to support the PCI functions among the SR-IOV functions. PFs contain the SR-IOV functional structure, which is used to manage the SR-IOV functions. PFs can be detected and managed like other PCIe devices. The PF owns complete configuration resources, which can be used to configure or control PCIe devices;


  • virtual functions (VF) - VFs are a type of light-weight PCIe functions. A VF can share one or more physical resources with physical functions or other VFs associated with the same physical functions. VFs own the configuration resources that are applicable only to their own behavior.


Through configuration, a device with the SR-IOV function can present multiple functions in the configuration space. The number of independent VFs supported by this device is configurable and each function has its own configuration space. By means of configuration space matching, the VMM can assign one or more VFs for a VM.


The SR-IOV technology implements direct DMA transmission between VMs and multiple VFs of physical devices, without software interference.


MAIN COMPONENTS OF SR-IOV


3

 

PF driver

  • The Hypervisor uses the PF driver to manage global functions of SR-IOV devices.


  • The PF can be used by the Hypervisor as a device with common I/O functions. As shown in the figure, the PF functions as a common network adapter to connect to the virtual switch.


  • The Hypervisor invokes the PF driver to configure the VFs of virtual devices.


VF driver

  • The VF driver is a semi-virtual driver installed in the guest OS.


  • Through the VF driver, the guest OS communicates with and transmits data to VFs on the physical network adapter.


PF

  •  A PF can be treated as a complete I/O device. Functionally, a PF is equivalent to a complete physical network adapter.


  • The PF has independent Base Address Registers (BARs), which are used to store the current data transmission status.


  •  The PF has independent transmission queues, including the send and receive queues.


  • The PF owns complete configuration resources, which can be used to configure or control PCIe devices and to manage VFs.


 VF

  • VFs are a type of light-weight PCIe functions. A VF can share one or more physical resources with physical functions or other VFs associated with the same physical functions.


  • VFs own the configuration resources that are applicable only to their own behavior.


  • The VF has independent Base Address Registers (BARs), which are used to store the current data transmission status.


  • The VF has independent transmission queues, including the Tx and Rx queues.

 

Bridge and classifier

  •  All PF and VF transmission queues are connected to the bridge and classifier.


  • The bridge is used for the interaction between VMs within a physical host.


  • The classifier is used to identify the VM to which packets are sent based on the MAC address and place the packets into the receive queues of related VFs when receiving data.

 

DATA SENDING PROCESS OF THE SR-IOV NETWORK ADAPTER

 

4

 

  1. The VM puts the Ethernet packet into the VF driver, sends the interrupt signal and starts to transmit data.


  2. The interrupt signal arrives at the VMM and the VMM notifies the VF to retrieve the data.


  3. The DMA operation is initialized. The memory address of the DMA operation has been configured by the VF driver.


  4. The DMA operation arrives at the chip. The Inter VT-d technology implements DMA address conversion from the virtual host address to the physical host address. After DMA operation is completed, the packet is transferred from the VM memory space to the VF memory space and put into the queue.


  5. The packet arrives at the bridge from the queue.


  6. Based on MAC or VLAN, the bridge forwards the packet to another VF or a physical network port on the local host.


  7. The physical network port sends the packet to the physical network.

 

 DATA RECEIVING PROCESS OF THE SR-IOV NETWORK ADAPTER

 

5


  1. An Ethernet packet arrives at the physical network adapter.


  2. The packet is sent to the classifier.


  3. Based on the MAC address of VLAN, the classifier puts the packet into the Rx queue of the target VF.


  4. The DMA operation is initialized. The target memory address of the DMA operation has been configured by the VF driver.


  5. The DMA operation arrives at the chip. The Inter VT-d technology implements DMA address conversion from the virtual host address to the physical host address. After DMA operation is completed, the packet arrives at the VM memory space.


  6. The physical network adapter generates an interrupt signal, indicating that the data has arrived. The VMM processes this interrupt.


  7. The VMM generates a virtual interrupt for the VM, and notifies the VM that the packet has arrived.


CHARACTERISTICS OF VIRTUAL SWITCHING IMPLEMENTED BY A PHYSICAL ADAPTER

 

Compared with the virtual switch (software VEB), virtual switching implemented by a physical adapter reduces the CPU usage and uses the network adapter to implement the switching function. The CPU is not required to participate in virtual switching.


When a physical network adapter is used to implement the virtual direct connection function, the delay in processing packets from the VM to the physical network adapter is significantly reduced because the VM directly accesses and operates on the PCIe device.


A traditional network adapter does not support hot migration, has few functions and cannot support features such as flexible security isolation. In addition, it is difficult to implement function expansion.


The iNIC smart network adapter hardware developed by Huawei allows the VM virtual network adapter to directly connect to the virtual queues of iNIC smart network adapter and also supports hot migration and security isolation.

 

Thanks,


Kashif Ali

  • x
  • convention:

Kashif
HCIE MVE Author Created Dec 26, 2021 08:40:41

@olive.zhao @Irina @dragos_v @BAZ @wissal @umaryaqub @Rumana @ander.sanchez @Lan59 @nuchi @Vlada85 @hemin88 @Unicef @little_fish @gzzz @nochhie @chantha @smileymind @Navin_kay @user_4358465 @Majdi.Chebil @AndresMoreno @shakeela @phuta @Ayeshaali @user_4001805 @VinceD @lucian2003 @dengdengdeng @Sara_Obaid @AL_93 @MahMush @Y_T_Z @Kevin_Thomas @Saqib123 @bobi @richie9999 @user_4359501 @MesayW. @Khalid_Gul @LilStylz237 @MMshaikh @Laiheang @Chanbora @Sokrin @simchamnan @user_4237671 @Abdussamed @andersoncf1 @Herediano @Vesper_EvenStar @taha_29four @user_4326135 @Assis_bsb @Serges_armel @sachandio @hamza11 @mouh1991 @Tiplu @Null_0 @Tongun @Haseeb_Haris @Diego.Silva @Caroline_Herrera @kunthea @Somemeow @Anno7 @chenhui @jason_hu @Popeye_Wang @alopez @Chenxintao @E.DR_91 @stephen.xu @DDSN @Malik3000 @Zemo_Mccracken @adrian_alucard @Precious @Kwesi @imransumayari @abdul_basit7233 @Andre_G @Murat87 @LucianoNhantumbo @Vien @titusmahwe @DragonVN @Zebra @thisu @Funstuf @DKetrari @4TEch @rkahya_4 @scidox @faysalji @user_3134129 @SamB @mustafa211 @rimon @RajK @Funstuff @Abrar_Akbar @Kh_Elias65 @James_Nel @Zonger @Hurr @15393597009 @safecity @LeeMARK @jerry_zhuzi @bruno.guedes @Kashif @DrDoom @mrppa @sliawatimena @daniellima @thibay @maithi @hanhcao @wonderj @mytruc @huyvan @manpham @Imnh @hugu @nagu @sam_san @NTan33 @Faridrami @I_Am_Batman @amr_rashedy @Ignatius @Saqibaz @user_4252339 @Satya_Syam @Vijji @user_4413531 @Wieczorekcool @user_4400653 @Sirajs @Dia0205 @abdelali @Irshadhussain @cmarban @javaid100 @Natan_Oliveira @backwaves @alexander.grosello @Confucius @Soliman_Mohammed @sohaib.ansar @csk99 @OneDan @bek7 @Farah_O @AymanOT @Asimsaad @Salah @gabo.lr @Mr.Jack @Steffy @h89151 @Alibaba8000 @SidzHuawei
View more
  • x
  • convention:

Ayeshaali
Ayeshaali Created Dec 26, 2021 17:55:01 (0) (0)
 
lucian2003
lucian2003 Created Dec 26, 2021 21:04:11 (0) (0)
Thanks  
little_fish
little_fish Created Dec 27, 2021 00:40:12 (0) (0)
 
user_4396693
user_4396693 Created Feb 10, 2022 08:36:19 (0) (0)
 
Saqib123
Moderator Created Dec 26, 2021 11:05:45

Thanks for sharing valuable information SR-IOV Technology-4560487-1
View more
  • x
  • convention:

user_4396693
user_4396693 Created Feb 10, 2022 08:36:45 (0) (0)
 
DragonVN
Created Dec 26, 2021 11:23:42

Great share
View more
  • x
  • convention:

user_4463975
user_4463975 Created Feb 10, 2022 08:37:22 (0) (0)
 
Vlada85
MVE Author Created Dec 26, 2021 17:34:36

Thank you
View more
  • x
  • convention:

user_4463975
user_4463975 Created Feb 10, 2022 08:37:28 (0) (0)
 
GhaziAsad
Created Dec 26, 2021 17:54:06

good
View more
  • x
  • convention:

GhaziAsad
Created Dec 26, 2021 17:54:17

Thank you
View more
  • x
  • convention:

Ayeshaali
Created Dec 26, 2021 17:55:15

Thanks for sharing
View more
  • x
  • convention:

Anno7
Moderator Author Created Dec 26, 2021 19:25:29

nicely explained
View more
  • x
  • convention:

BAZ
MVE Author Created Dec 26, 2021 19:40:09

SR IOV
View more
  • x
  • convention:

123
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.