Mellanox WinOF VPI Documentation v5.50.53000
Linux Kernel Upstream Release Notes v6.5

PacketDirect Provider Interface

As of v5.25, WinOF supports NDIS PacketDirect Provider Interface. PacketDirect extends NDIS with an accelerated I/O model, which can increase the number of packets processed per second by an order of magnitude and significantly decrease jitter when compared to the traditional NDIS I/O path.

Warning

PacketDirect is supported only on Ethernet ports.

  • Hypervisor OS: Windows Server 2016

  • Virtual Machine (VM) OS: Windows Server 2012 and above

  • Mellanox ConnectX-3 Pro Adapter Card family

  • Mellanox WinOF 5.25 or higher

  • Firmware version: 2.36.5150 or higher

To allow a VM to send/receive traffic in PacketDirect mode:

  1. Enable PacketDirect:
    • On the Ethernet adapter.

    Copy
    Copied!
                

    PS $ Enable-NetAdapterPacketDirect -Name <EthInterfaceName>

    • In the Device Manager:

    image2019-3-12_15-54-14.png

  2. Create a vSwitch with PacketDirect enabled.

    Copy
    Copied!
                

    PS $ New-VMSwitch <vSwitchName> -NetAdapterName <EthInterfaceName> -EnablePacketDirect $true -AllowManagementOS $true

  3. Enable VFP extension:
    • On the vSwitch.

    Copy
    Copied!
                

    PS $ Enable-VMSwitchExtension -VmSwitchName <vSwitchName> -Name "Windows Azure VFP Switch Extension"

    • In the Hyper-V Manager: Action->Virtual Switch Manager...

    image2019-3-12_15-52-35.png

  4. Shut down the VM.

    Copy
    Copied!
                

    PS $ Stop-VM -Name <VMName> -Force -Confirm

  5. Add a virtual network adapter for the VM.

    Copy
    Copied!
                

    PS $ Add-VMNetworkAdapter -VMName <VMName> -SwitchName <vSwitchName> -StaticMacAddress <StaticMAC Address>

  6. Start the VM.

    Copy
    Copied!
                

    PS $ Start-VM -Name <VMName>

    Since VFP is enabled, without any forwarding rules, it will block all traffic going through the VM.
    Follow the following steps to unblock the traffic:
    • Find the port name for the VM.

    Copy
    Copied!
                

    CMD > vfpctrl /list-vmswitch-port …... Port name : E431C413-D31F-40EB-AD96-0B2D45FE34AA Port Friendly name : Switch name : 8B288106-9DB6-4720-B144-6CC32D53E0EC Switch Friendly name : MlnxSwitch PortId : 3 VMQ Usage : 0 SR-IOV Usage : 0 Port type : Synthetic Port is Initialized. MAC Learning is Disabled. NIC name : bd65960d-4215-4a4f-bddc-962a5d0e2fa0--e7199a49-6cca-4d3c-a4cd-22907592527e NIC Friendly name : testnic MTU : 1500 MAC address : 00-15-5D-4C-46-00 VM name : vm ...... Command list-vmswitch-port succeeded!

  7. Disable the port to allow traffic.

    Copy
    Copied!
                

    CMD > vfpctrl /disable-port /port <PortName> Command disable-port succeeded!

    Warning

    The port should be disabled after each reboot of the VM to allow traffic.

© Copyright 2023, NVIDIA. Last updated on May 23, 2023.