Hi all,
I am able to load newly developed VF NDIS miniport driver successfully in the guest operating system win2k12 R2, but unable to get the network traffic run over VF data path.
i.e VFDataPathActive is always False in ?Get-VMNetworkAdapter | fl? output, in the host machine (win2k12R2)
When I enabled NDIS debugging, I see the below debug logs. NETVSCVFPP binding to the
VF NDIS miniport driver fails, as OID_SRIOV_VF_SERIAL_NUMBER fails within NDIS.
I appreciate your help to debug this further. i.e. to find what is missing in VF NDIS miniport driver causing OID_SRIOV_VF_SERIAL_NUMBER to fail.
Please let me know, in case you need more details, logs etc
Thanks in advance
ndiskd!miniport output
BINDINGS
Protocol list Driver Open Context
(NETVSCVFPP) ffffcf80006e2c10 Declined with NDIS_STATUS_NOT_SUPPORTED
Filter list Driver Module Context
No filters are bound to this miniport
Ndis WPP trace output
[0]0004.00BC::03/11/2015-05:13:36.455 [mp]==>ndisCreateDefaultNicSwitch: Miniport FFFFE00002EA51A0
[0]0004.00BC::03/11/2015-05:13:36.458 [mp]<==ndisCreateDefaultNicSwitch: Miniport FFFFE00002EA51A0, Status 0
[0]0004.03F0::03/11/2015-05:13:37.166 [mp]==>ndisIovGetNicSwitchList: Miniport FFFFE00002EA51A0
[0]0004.03F0::03/11/2015-05:13:37.168 [mp]<==ndisIovGetNicSwitchList: Miniport FFFFE00002EA51A0, Status 0
[0]0004.03F0::03/11/2015-05:13:37.171 [mp]==>ndisOidPreIovVfSerialNumber: Miniport FFFFE00002EA51A0, Request FFFFCF8004D50EE0
[0]0004.03F0::03/11/2015-05:13:37.172 [mp]<==ndisOidPreIovVfSerialNumber: Miniport FFFFE00002EA51A0, bComplete 1, Status c00000bb
I’m not an IOV expert, so forgive me if I’m not helpful.
That STATUS_NOT_SUPPORTED can come from that function in any of these cases:
-
Miniport doesn’t have IOV enabled. Check !ndiskd.miniport -iov to see what it says under “Current Configuration:”. Make sure to set NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES with HardwareSriovCapabilities.
-
Miniport doesn’t claim to be VF driver. Make sure to set NDIS_SRIOV_CAPS_SRIOV_SUPPORTED | NDIS_SRIOV_CAPS_VF_MINIPORT flags.
-
Miniport isn’t enumerated by a vPCI aware bus driver. Make sure that the VF is enumerated by vpci.sys (if on Microsoft’s hypervisor).
I’d poke around a bit with !ndiskd.miniort -iov, and also devmgmt.msc to see if anything looks out-of-place.
Thanks Jeffrey.
-
& 2. I think SRIOV capabilities are set correctly. Please see below output.
-
windbg output of !devnode shows that VF is enumerated by vpci.sys.
output
!ndiskd.miniport ffffe0000010b1a0 -iov
SRIOV
Hardware Capabilities:
Revision 1
Flags 0
SRIOV Capabilities SRIOV_SUPPORTED, IS_VF
Current Configuration:
Revision 1
Flags 0
SRIOV Capabilities SRIOV_SUPPORTED, IS_VF
Additional note is VF miniport driver is able to attach to the hardware and get the link up.
It shows up correctly in devmgmt.msc.
The only issue is VF Data Path not getting enabled.
That does look correct. But unfortunately that also means we’ve exhausted all I know about SRIOV.
Your log snippet indicates that things fail in ndisOidPreIovVfSerialNumber. That function can’t fail in many ways, and doesn’t call out to anything. Given that !ndiskd found a SRIOV and VF flags on the miniport, that limits possible failures further. The only remaining possibility is a problem querying GUID_VPCI_INTERFACE_STANDARD from the bus driver. NDIS caches that in the miniport block. Do you see anything in “dt ndis!_NDIS_MINIPORT_BLOCK ffffe0000010b1a0 VpciInterfaceContext” ? NDIS gets that through textbook calls to IRP_MN_QUERY_INTERFACE for the VPCI interface.
dt ndis!_NDIS_MINIPORT_BLOCK ffffe0000010b1a0 VpciInterfaceContext
_NDIS_MINIPORT_BLOCK
+0x1330 VpciInterfaceContext : (null)
One more point to note is this VF miniport driver is NDIS_WDM that sits on top of VF VBD driver.
Thanks
Oh, that is a very relevant point. Your VBD is going to need to proxy GUID_VPCI_INTERFACE_STANDARD from the NIC’s PDO down to the vPCI PDO.
There’s not a comprehensive checklist of things that your VBD needs to do, because there just aren’t very many vendors who do SRIOV in the first place, and especially with the added challenge of interposing a VBD. Instead it’ll probably be a matter of trial-and-error, adding bits and bobs to the VBD until scenarios seem to work.
After proxying GUID_VPCI_INTERFACE_STANDARD in VBD, I am able to get the network traffic over VF data path.
Thanks Jeffrey for the timely help.
I’m glad to hear it’s working. Thanks for reporting back with your results; we both learned something new from this.