Hello Proxmox Community,
I'm new to Proxmox and SR-IOV. So, I've been exploring the configuration options for SR-IOV passthrough and span port monitoring within my virtualized environment. Despite following the documentation and attempting various troubleshooting steps, I've encountered an issue where span port traffic isn't being properly captured within the virtual machine. I'm sure the switch the switch's span port configuration is correct because I can see the mirrored traffic with
Here's a summary of my current setup:
Proxmox info:
What I've done / my configuration:
1. Check BIOS and make sure VT-d and SR-IOV is enabled (already enabled by default)
2. Enable
4. Create virtual function (vf) interface,
8. On VM, check and make sure no firewall is enabled
9. On VM, add
11. On VM, set
13. I also tried adding vlan 4095 and disable spoof check at
Could someone kindly assist me in understanding if there are any additional steps or considerations I might have missed? Or maybe I did any unnecessary steps? Any insights or guidance would be greatly appreciated.
Also, here's the detailed hardware info (for flags & capabilities):
CPU info:
Thanks
I'm new to Proxmox and SR-IOV. So, I've been exploring the configuration options for SR-IOV passthrough and span port monitoring within my virtualized environment. Despite following the documentation and attempting various troubleshooting steps, I've encountered an issue where span port traffic isn't being properly captured within the virtual machine. I'm sure the switch the switch's span port configuration is correct because I can see the mirrored traffic with
tcpdump -i
from the proxmox shell, but I'm unable to capture anything beyond broadcast traffic (like LLDP) when using tcpdump -i
within the VM.Here's a summary of my current setup:
Proxmox info:
PVE version: pve-manager/8.1.4/ec5affc9e41f1d79 (kernel: 6.5.11-8-pve)
Ethernet: (I only list related interface only)
Interface Name: ens21f0
PCI Name: Intel Corporation I350 Gigabit Network Connection (rev 01)
PCI ID: 0000:b1:00.0
Support SR-IOV: yes
Configured(desired) VFs: 6
Total VFs: 8
Interface Name: ens21f0v0
PCI Name: Intel Corporation I350 Ethernet Controller Virtual Function (rev 01)
PCI ID: 0000:b1:10.0
Mac: e2:4d:71:f9:34:84
VM (Ubuntu) info:OS: Ubuntu 22.04.3 LTS (kernel 5.15.0-92-generic)
Ethernet: (I only list related interface only)
Interface Name: ens16
PCI Name: Intel Corporation I350 Ethernet Controller Virtual Function (rev 01)
PCI ID (from within VM): 0000:00:10.0
Mac: e2:4d:71:f9:34:84
Span port configuration (from switch): direct span port with ethernet as destination (no bonds, specific ip and vlans)What I've done / my configuration:
1. Check BIOS and make sure VT-d and SR-IOV is enabled (already enabled by default)
2. Enable
intel_iommu=on iommu=pt
, dmesg
output:3. Enable modules likeDMAR: IOMMU enabled
DMAR: Intel(R) Virtualization Technology for Directed I/O
DMAR-IR: Enabled IRQ remapping in x2apic mode
igbvf: Intel(R) Gigabit Virtual Function Network Driver
igbvf 0000:b1:10.0: enabling device (0000 -> 0002)
igbvf 0000:b1:10.0: Assigning random MAC address.
igbvf 0000:b1:10.0: Intel(R) I350 Virtual Function
igbvf 0000:b1:10.0: Address: e2:4d:71:f9:34:84
vfio
, lsmode | grep vfio
output:(also reboot services/modules and proxmox itself to apply the changes)vfio_pci 16384 1
vfio_pci_core 86016 1 vfio_pci
irqbypass 12288 76 vfio_pci_core,kvm
vfio_iommu_type1 49152 1
vfio 57344 7 vfio_pci_core,vfio_iommu_type1,vfio_pci
iommufd 77824 1 vfio
4. Create virtual function (vf) interface,
cat /sys/bus/pci/devices/0000:b1:00.0/sriov_numvfs
output:5. Set interface# cat /sys/bus/pci/devices/0000:b1:00.0/sriov_numvfs
6
promisc
and trust
on
6. Assign# ip link set ens21f0 promisc on
# ip link set dev ens21f0 vf 0 trust on
# ip link show ens21f0
2: ens21f0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 9c:c2:c4:5c:da:cf brd ff:ff:ff:ff:ff:ff
vf 0 link/ether e2:4d:71:f9:34:84 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onvf 1 link/ether 6a:93:84:67:4f:8b brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onvf 2 link/ether 5a:05:2b:6c:fc:43 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onvf 3 link/ether 7e:33:d8:08:5a:49 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onvf 4 link/ether 5e:55:1f:05:cd:7f brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onvf 5 link/ether 7e:ba:dd:88:8c:ce brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust onaltname enp177s0f0
vf0
as Raw PCI device to Ubuntu VM7. Turn on Ubuntu VM# cat /etc/pve/qemu-server/<vmid>.conf | grep -e cpu -e hostpci
cpu: host
hostpci0: 0000:b1:10.0
8. On VM, check and make sure no firewall is enabled
9. On VM, add
ens16
to netplan
and do netplan apply
10. On VM, doens16:
dhcp4: no
tcpdump -i ens16 -nn
, but only got broadcast traffic like LLDP11. On VM, set
promisc on
12. On VM, do another# ip link set ens16 promisc on
# ip link show ens16
2: ens16: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether e2:4d:71:f9:34:84 brd ff:ff:ff:ff:ff:ffaltname enp0s16
tcpdump -i ens16 -nn
, but still only got broadcast traffic like LLDP13. I also tried adding vlan 4095 and disable spoof check at
ens21f0
vf
0
but still same result# ip link set dev ens21f0 vf 0 vlan 4095
# ip link set dev ens21f0 vf 0 spoof off
Could someone kindly assist me in understanding if there are any additional steps or considerations I might have missed? Or maybe I did any unnecessary steps? Any insights or guidance would be greatly appreciated.
Also, here's the detailed hardware info (for flags & capabilities):
CPU info:
Ethernet info
- model name: Intel(R) Xeon(R) Silver 4310 CPU @ 2.10GHz
- flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
- vmx flags: vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs pml ept_mode_based_exec tsc_scaling
lspci -vv
: (omitted some info due to words limit)Please let me know if you need other infob1:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
Subsystem: Inspur Electronic Information Industry Co., Ltd. 1G base-T QP EP014Ti1 AdapterPhysical Slot: 21Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Latency: 0, Cache Line Size: 32 bytesInterrupt: pin A routed to IRQ 18NUMA node: 1IOMMU group: 8Capabilities: [40] Power Management version 3Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+Address: 0000000000000000 Data: 0000Masking: 00000000 Pending: 00000000Capabilities: [70] MSI-X: Enable+ Count=10 Masked-Vector table: BAR=3 offset=00000000PBA: BAR=3 offset=00002000Capabilities: [140 v1] Device Serial Number 9c-c2-c4-ff-ff-5c-da-cfCapabilities: [150 v1] Alternative Routing-ID Interpretation (ARI)ARICap: MFVC- ACS-, Next Function: 1ARICtl: MFVC- ACS-, Function Group: 0Capabilities: [160 v1] Single Root I/O Virtualization (SR-IOV)IOVCap: Migration- 10BitTagReq- Interrupt Message Number: 000IOVCtl: Enable+ Migration- Interrupt- MSE+ ARIHierarchy+ 10BitTagReq-IOVSta: Migration-Initial VFs: 8, Total VFs: 8, Number of VFs: 6, Function Dependency Link: 00VF offset: 128, stride: 4, Device ID: 1520Supported Page Size: 00000553, System Page Size: 00000001Region 0: Memory at 0000207fffee0000 (64-bit, prefetchable)Region 3: Memory at 0000207fffec0000 (64-bit, prefetchable)VF Migration: offset: 00000000, BIR: 0Capabilities: [1a0 v1] Transaction Processing HintsDevice specific mode supportedSteering table in TPH capability structureCapabilities: [1c0 v1] Latency Tolerance ReportingMax snoop latency: 0nsMax no snoop latency: 0nsCapabilities: [1d0 v1] Access Control ServicesACSCap: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-Kernel driver in use: igbKernel modules: igb
b1:10.0 Ethernet controller: Intel Corporation I350 Ethernet Controller Virtual Function (rev 01)
Subsystem: Inspur Electronic Information Industry Co., Ltd. I350 Ethernet Controller Virtual FunctionControl: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Latency: 0NUMA node: 1IOMMU group: 193Region 0: Memory at 207fffee0000 (64-bit, prefetchable) [virtual] [size=16K]Region 3: Memory at 207fffec0000 (64-bit, prefetchable) [virtual] [size=16K]Capabilities: [70] MSI-X: Enable+ Count=3 Masked-Vector table: BAR=3 offset=00000000PBA: BAR=3 offset=00002000Capabilities: [150 v1] Alternative Routing-ID Interpretation (ARI)ARICap: MFVC- ACS-, Next Function: 0ARICtl: MFVC- ACS-, Function Group: 0Capabilities: [1a0 v1] Transaction Processing HintsDevice specific mode supportedNo steering table availableCapabilities: [1d0 v1] Access Control ServicesACSCap: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-Kernel driver in use: vfio-pciKernel modules: igbvf
Thanks
Last edited: