RE: Setting a user mode visible event from kernel mod- e dr iver

Yes, once I solved very similar problem this way (build reliable transport
layer over raw packet interface). Note it is possible to pass several
receive and send IRP in parallel, wait for all at once (using overlapped
events) and when waiting completes, process given IRP and pass a new one to
kernel. It allows to maximize throughput, no receive is lost because you’re
just processing another one in user mode and there aren’t buffers in kernel.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]


From: xxxxx@stratus.com[SMTP:xxxxx@stratus.com]
Reply To: xxxxx@lists.osr.com
Sent: Wednesday, November 21, 2001 5:42 PM
To: xxxxx@lists.osr.com
Subject: [ntdev] RE: Setting a user mode visible event from kernel
mod e dr iver

What I meant was that the win32 asynchronous IO interface is equivalent to
‘wait for an event and then send an ioctl’. You just reverse the process:
send the ioctl(s) and then wait for the completion event(s). Your code
loop
below should not change much. You would post a ‘receive ioctl’ and a ‘send
ioctl’ to your network driver, both using asynchronous io, and your ‘wait
for multiple objects’ would wait for io completion events for each of your
io requests.

-----Original Message-----
From: Fernando, Robert [mailto:xxxxx@anitetelecoms.com]
Sent: Wednesday, November 21, 2001 11:24 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Setting a user mode visible event from kernel mod e
dr
iver

Hi Mark,

Why do we wish to do this ?

We are trying to do the following style of data transfers

In a separate thread from the user mode app.

while (!quit)
{
wait for multiple object
case receive:
call receive data code
case send:
call send data code
case quit
return
}

We wish to do it this way to reduce loaded on CPU and allow us to spend
more
time processing the data in other parts of our app.

The current network drive which I did not write returns straight away even
if there is no packet received.

Our current app has the send and receive code inside a while loop which on
either receiving a buffer of length >0 from the user mode app sends it to
the network card via the driver devioctl call. or on receiving a buffer of
length >0 from the driver sends it on to the user mode app to process.
(this
currently is in the same thread as the data processing code). We notice
that
a lot of CPU time is spent processing the while loop and wished to reduce
this to allow faster data transfer rate and consequently the increased
rate
of data transfer. (400kb/s or even faster)

We have a separate thread to handle GUI interactions, so these respond
quickly.

Hence from your email you are suggesting we re- write the receive from
driver devioctl call to block , with pending status until a buffer of
length
>0 is detected, and then return the data.

Thanks

Robert Fernando
Anite Telecoms Ltd
110 Fleet Road
Fleet
Hampshire GU51 4BL
United Kingdom
Tel: +44 (0) 1252 775200
Fax: +44 (0) 1252 775 321
Email: xxxxx@anitetelecoms.com

Anite Telecoms Limited Registered in England No. 1721900 Registered
Office: 100 Longwater Avenue, GreenPark, Reading, Berkshire RG2 6GP,
United
Kingdom

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: 21 November 2001 15:40
To: NT Developers Interest List
Subject: [ntdev] RE: Setting a user mode visible event from kernel mode dr
iver

Well if you are going to do the ioctl anyway, why not issue the ioctl and
let it pend in the driver until data is available, and have the app wait
for
the completion event? Then you don’t have to worry about where or why or
how
this event is created, named, etc.

-----Original Message-----
From: Fernando, Robert [mailto:xxxxx@anitetelecoms.com]
Sent: Wednesday, November 21, 2001 10:28 AM
To: NT Developers Interest List
Subject: [ntdev] Setting a user mode visible event from kernel mode driver

Hi all,

If we create a kevent in kernel mode (from inside a network driver), will
it
be visible to user mode apps. If not what is the best way to allow this to
happen.

We are arming to use this event flag to say data available at network
card,
we then do devioctl call to collect it and send it to our user mode app.

thanks

Robert Fernando
Anite Telecoms Ltd
110 Fleet Road
Fleet
Hampshire GU51 4BL
United Kingdom
Tel: +44 (0) 1252 775200
Fax: +44 (0) 1252 775 321
Email: xxxxx@anitetelecoms.com

Anite Telecoms Limited Registered in England No. 1721900 Registered
Office: 100 Longwater Avenue, GreenPark, Reading, Berkshire RG2 6GP,
United
Kingdom


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as:
xxxxx@anitetelecoms.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: michal.vodicka@st.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com