none
Shared memory usage between virtual NDIS miniport adapters RRS feed

  • Question

  • Hi,

    I need to use shared memory between NDIS virtual adapters. This contiguous block of shared memory is implemented with some defined protocol layout. I used  MmAllocateContigousMemory to allocate required amount of shared memory. And I implemented protocol layout in it. This same protocol layout should be mirrored between NDIS virtual miniport drivers/Adapters while data communication. I am thinking of using KDPC for synchronization.

    But I am seeing virtual miniport drivers are using VMQ for communication. Is it possible to replace VMQ by shared memory? If possible please suggest how do I achieve it?

    NOTE: There is no DMA in picture.

    Regards

    Ganapati

    Sunday, August 3, 2014 10:20 AM

Answers

  • once you have HW, you have DMA. When you have DMA you don't need physically contiguous memory anymore. It is best if you don't require it as physically contiguous memory is a resource that can't always be satisfied

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, August 4, 2014 1:43 PM

All replies

  • if it is a virtual miniport why do you need physically contiguous memory? If all you want to do is share km memory between instances, normal pool allocations is just fine

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, August 3, 2014 3:06 PM
  • Hi,

    I need physically contiguous memory because I need to implement a protocol layout in the shared memory using which the communication should happen. It is the protocol requirement to have physically contiguous memory.

    Sunday, August 3, 2014 4:27 PM
  • protocols unless you have HW directly accessing the shared memory, physical layout doesn't matter because software only accesses the virtual address. Virtually contiguous is simple and easy to satisfy

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, August 3, 2014 5:12 PM
  • Yes it is true. The plan is to have HW in future that access the shared memory directly. Hence I have this requirement.

    Ok let me continue as per your suggestion for virtual adapters. But once HW comes into picture, memory part of software would be rework. Hence I was thinking is there any possibility of implementing it in virtual environment itself.

    Monday, August 4, 2014 7:01 AM
  • once you have HW, you have DMA. When you have DMA you don't need physically contiguous memory anymore. It is best if you don't require it as physically contiguous memory is a resource that can't always be satisfied

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, August 4, 2014 1:43 PM