Re: sync/async NdisTransferData()



As others already said, there is now way around implementing
ProtocolReceive(). This is *not* a question of how the NIC (i.e.
miniport) driver passes received packets to NDIS. You will encounter
your ProtocolReceive() handler getting invoked even if the underlying
NIC driver does never call NdisIndicateReceive()! One reason is
because of loopback packets.

Anyway, the heart of your question is if and when
ProtocolTransferDataComplete() is called asynchronously. Actually,
that will happen if the underlying miniport driver needs to retrieve
received packet data from the NIC asynchronously, e.g. via DMA. The
card then usually requests an interrupt upon completion of the DMA
transfer, which will in turn lead to the driver calling
NdisMTransferDataComplete() and thus eventually
ProtocolTransferDataComplete().

The Microsoft NDIS Tester, which is part of the HCT (Hardware
Compatibility Test), can be used to test NDIS miniports and IMs, but
it cannot test NDIS protocols (see also
http://www.wd-3.com/archive/NDISTest.htm).

Stephan
---
On Tue, 5 Apr 2005 01:03:01 -0700, "Peter"
<Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi,
It would help me to hear one thing from programmer who has experiences
with behaviour of many NIC types in NDIS environment.

The problem is relating to NIC-s that uses old style of received packet
indicating.
In DDK doc is written that if NdisTransferData() returns NDIS_STATUS_PENDING,
miniport driver after copying data calls ProtocolTransferDataComplete().

I have tried only small amount of NIC types
and by my small expierences NdisTransferData() always was executed
synchronously.
My question is:
When NIC driver cannot copy all data in NdisTransferData() ?
Is it depending on NIC type ? Or it is depending on lack of system resources
? or something other ?
Or only old scrap taiwan NIC-s cannot catch to copy all data synchronously ?
(Consider only on W2K/XP/2003 and up)

The answer can help with my design/implementation.

Thanks !
Peter
.



Relevant Pages

  • Re: sync/async NdisTransferData()
    ... miniport) driver passes received packets to NDIS. ... NIC driver does never call NdisIndicateReceive! ... ProtocolTransferDataComplete() is called asynchronously. ... received packet data from the NIC asynchronously, ...
    (microsoft.public.development.device.drivers)
  • SMSC9118 NDIS ethernet driver, to connect LAN9115 directly to a PXA270 (no glue logic like cpld)
    ... I am trying to integrate in windows ce5.0 smsc driver for 911x family. ... adapter, then the pointer turns into a hour glass forever. ... ndisMInitializeAdapter: Miniport 0003B9C0, ... Miniport 0003B9C0, MiniBlock 0003B620, rc ...
    (microsoft.public.windowsce.embedded)
  • Re: Tcpip.sys bug: FTP Upload. MiniportHalt isnt called untill it has
    ... cancel packets on the miniport driver. ... driver, this bug would have been discovered long, long ago. ... handler and that does return all unsent packets to Ndis. ... hanging the PnP manager with device ...
    (microsoft.public.development.device.drivers)
  • Re: Tcpip.sys bug: FTP Upload. MiniportHalt isnt called untill it has
    ... NetEventQueryRemoveDevice query - instead, it can simply stop sending new ... call NdisCompletePnPEvenafter all packets that have been fowarded to ... cancel packets on the miniport driver. ... driver, this bug would have been discovered long, long ago. ...
    (microsoft.public.development.device.drivers)
  • Re: Miniport: DriverObject->DriverUnload should be Chained? or Rep
    ... once your driver is miniport one that is not supposed to ... hardware - the user-mode app plays the role of the hardware. ... communicating with an app via IRPs (apparently, it has a pool of outstanding ...
    (microsoft.public.development.device.drivers)

Loading