VMQ: Shared Memroy Allocation for VMQ

Hi,

I am implementing the VMQs in my driver for my card. I need to clarify some of the doubts

  1. While going to MSDN documentation I found :

“.NIC miniport drivers must not be dependent upon which address space NDIS will use to complete the shared memory allocation request. That is, the shared memory address space for lookahead or post-lookahead data is implementation specific and, in many cases, NDIS or the VM switch might, satisfy all the requests, including those for post-lookahead use, from host memory address space.”
Url:
http://msdn.microsoft.com/en-us/library/ff570746(VS.85).aspx

This paargraph says that NDIS or VM Switch might satisify all the allocation request from Host Memory space. Then Whats the use of VMQ, if it is from host memory space it will copy the data and hit the performance.

  1. How can we know that whether memory has been allocated form VM space or Host memory space

  2. During attaching the Network Adpater to VM I see some standard parameter in Microsoft Virtual Network Adapter created in VM. These include Jumbo Packet support and checksum offload fields. What I found If I change any field e.g. Jumbo Packet to 9014 then how the underlying driver will know what should be size of VMQ to recieve such large packet.

I dont find any OID which tell me to change the size of allocated VMQ to accomodate the large packets.

Can anybody let me know how to find this to modify the VMQ allocation accordingly.

regards

Perhaps, you should think this way ( that might help understand the idea behind it ) –

  1. One specific situation when multiple MAC addresses ( actually virtual MAC address, since not burned in inside the NIC !!) are used is to support virtualization.

  2. vSwitch in most VM implementation is virtual and in the host VM side under its control. It’s basic function is to associate a vNIC, hence provide a vMAC address and routing traffic to particular VM.

  3. VM memory manager abstract the Real memory to another layer. So at any given point in time, a physical page or a region ( a cluster of pages) could be mapped to a VM ( host or guest does not really matter for this discussion). They are under the control of VMM(virtual machine manager or hypervisor).

  4. VMQ can be thought of packet steering. Allocating buffers to VMQs handled by NDIS or any other systems software take cares of the memory mapped to VMs. So if a vMAC is associated with a guest VM, its associated VMQ queue will have buffer from its own mapped memory. So you really don’t need to worry about buffers being allocated from the host memory. Otherwise —

A more advanced approach, where sr-iov and mr-iov comes to play, the DMA-remapper, interrupt-remapper etc would fail miserably.

-pro

On Sep 24, 2010, at 5:18 AM, xxxxx@gmail.com wrote:

Hi,

I am implementing the VMQs in my driver for my card. I need to clarify some of the doubts

  1. While going to MSDN documentation I found :

“.NIC miniport drivers must not be dependent upon which address space NDIS will use to complete the shared memory allocation request. That is, the shared memory address space for lookahead or post-lookahead data is implementation specific and, in many cases, NDIS or the VM switch might, satisfy all the requests, including those for post-lookahead use, from host memory address space.”
Url:
http://msdn.microsoft.com/en-us/library/ff570746(VS.85).aspx

This paargraph says that NDIS or VM Switch might satisify all the allocation request from Host Memory space. Then Whats the use of VMQ, if it is from host memory space it will copy the data and hit the performance.

  1. How can we know that whether memory has been allocated form VM space or Host memory space

  2. During attaching the Network Adpater to VM I see some standard parameter in Microsoft Virtual Network Adapter created in VM. These include Jumbo Packet support and checksum offload fields. What I found If I change any field e.g. Jumbo Packet to 9014 then how the underlying driver will know what should be size of VMQ to recieve such large packet.

I dont find any OID which tell me to change the size of allocated VMQ to accomodate the large packets.

Can anybody let me know how to find this to modify the VMQ allocation accordingly.

regards


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer