SR-IOV Single root I/O virtualization 使用说明,待验证
sr-iov功能介绍:https://www.cnblogs.com/mrwuzs/p/8075932.html
首先 硬件上需要支持,biso开启cpu的vt-x(hyper-v等虚拟化平台需要),网卡(物理上要支持这个特性)biso中开启sr-iov
需要虚拟化程序支持,包括但不限于 hyper-v 、vmware exsi、linux qemu等
注意win2008 server hyper-v不支持sr-iov,win2012 server才开始支持。
附上网卡的情况:
主要有broadcom网卡和intel网卡,参考 如何配置BroadCOM网卡的SR-IOV功能:http://kms2.h3c.com/View.aspx?id=59149
以上摘录部分如下:
手动配置网卡的MAC地址,根据不同型号的网卡可能会有差异。
上面是在设置Broadcom网卡,芯片型号为BCM57810时所执行的命令,我们可以看到这款卡的特点是每个VF都有自己的端口名称相比其他型号网卡,比如intel,可能会有些差异,所有的VF是挂在某个PF下,且没有单独的网卡名称。这时需要执行如下的命令#ip link set eth2 vf 1 mac 00:52:44:11:22:33 所以要根据实际情况进行修改
疑问:realtek网卡的sr-iov支持情况呢??
1)RTL9075AA Series
2)RTL8125 2.5GB Ethernet 在linux中
I tried kernel 5.4.0-rc1 on the desktop equipped with Realtek RTL8125
2.5GB Ethernet.
$ sudo lspci -nnvs 04:00.0
[sudo] password for dev:
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.
Device [10ec:8125] (rev 01)
Subsystem: Acer Incorporated [ALI] Device [1025:1354]
Flags: bus master, fast devsel, latency 0, IRQ 17
I/O ports at 3000 [size=256]
Memory at a4200000 (64-bit, non-prefetchable) [size=64K]
Memory at a4210000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Virtual Channel
Capabilities: [168] Device Serial Number 01-00-00-00-68-4c-e0-00
Capabilities: [178] Alternative Routing-ID Interpretation (ARI)
Capabilities: [188] Single Root I/O Virtualization (SR-IOV)
Capabilities: [1c8] Transaction Processing Hints
Capabilities: [254] Latency Tolerance Reporting
Capabilities: [25c] L1 PM Substates
Capabilities: [26c] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
Kernel driver in use: r8169
Kernel modules: r8169