Direct Copying To Share Memory In NDIS ProtocolReceive
- From: "Le Chaud Lapin" <jaibuduvin@xxxxxxxxx>
- Date: 28 Feb 2007 21:59:51 -0800
I have an NDIS driver based on NDISPROT.
I am wondering if I can obviate much of the NDIS packet allocation by
copying indicated packets in ProtocolReceive directly to user-mode
+kernel-mode shared memory section. I would call
KeWaitForSingleObject in ProtocolReceive on a semaphore to wait (0
seconds) for one of, say, 64 fixed-size packet (frame) slots in the
shared section, and copy the packet directly, taking note which slots
were filled. If the wait breaks because there are no slots, then I
would simply return NDIS_STATUS_NOT_ACCEPTED. When ReadFile is called,
I would complete the IRP by receiving not the packet data, but an
array of indexes showing which slots were filled in.
I was wondering two things:
1. What is the computational cost of KeWaitForSingleObject with
timeout of 0? (relatively of course)
2. What kind of performance improvement can I expect using this
method, if any.
I was trying to come up with a way of batching receives, and this
seemed reasonable.
-Le Chaud Lapin-
.
- Follow-Ups:
- Re: Direct Copying To Share Memory In NDIS ProtocolReceive
- From: Thomas F. Divine
- Re: Direct Copying To Share Memory In NDIS ProtocolReceive
- Prev by Date: Re: A Basic question about NDIS Filter IM drivers
- Next by Date: Re: Using signed Vista driver on XP
- Previous by thread: Re: A Basic question about NDIS Filter IM drivers
- Next by thread: Re: Direct Copying To Share Memory In NDIS ProtocolReceive
- Index(es):
Loading