Understanding and using SR-IOV
The SR-IOV concept is something that we already mentioned in Chapter 2, KVM as a Virtualization Solution. By utilizing SR-IOV, we can partition PCI resources (for example, network cards) into virtual PCI functions and inject them into a virtual machine. If we're using this concept for network cards, we're usually doing this with a single purpose – so that we can avoid using the operating system kernel and network stack while accessing a network interface card from our virtual machine. In order for us to be able to do this, we need to have hardware support, so we need to check if our network card actually supports it. On a physical server, we could use the lspci
command to extract attribute information about our PCI devices and then grep
out Single Root I/O Virtualization as a string to try to see if we have a device that's compatible. Here's an example from our server: