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