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

Hi all,

In our devioctl call would this be all that is required to suspend the call,
before call the lines below kewait.

KeWaitForSingleObject(&event, Suspended, KernelMode, FALSE, NULL);

PUCHAR pucOutBuffer = static_cast(I.UserBuffer());
I.Information() = m_pTransmitQueue->PopPacket

or do we need to do a return status of pending and wait in the user mode app
on an event
with the driver completing the stored irp at some later stage.

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: Fernando, Robert
Sent: 21 November 2001 16:24
To: ‘NT Developers Interest List’
Subject: RE: [ntdev] RE: Setting a user mode visible event from kernel
mode 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: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com