TDI IRQLs

What are the IRQL requirements for working with TDI and sending TDI
IRPs?
Can I do this from DISPATCH_LEVEL?
I need to access TCP from the kernel mode code running at
DISPATCH_LEVEL. Can I do this directly or must I queue work items to do
this?

Maxim Shatskih
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.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

I don’t see any documentation about IRQL specifically for TDI.

Since most use IoCallDriver you must have IRQL <= DISPATCH_LEVEL.

Regards,

Thomas

----- Original Message -----
From: Maxim S. Shatskih
To: NT Developers Interest List
Sent: Wednesday, April 25, 2001 3:44 PM
Subject: [ntdev] TDI IRQLs

> What are the IRQL requirements for working with TDI and sending TDI
> IRPs?
> Can I do this from DISPATCH_LEVEL?
> I need to access TCP from the kernel mode code running at
> DISPATCH_LEVEL. Can I do this directly or must I queue work items to do
> this?
>
> Maxim Shatskih
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.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

It is my experience that you can only send IRP’s to TDI at IRQL’s <
DISPATCH_LEVEL.

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, April 25, 2001 3:45 PM
To: NT Developers Interest List
Subject: [ntdev] TDI IRQLs

What are the IRQL requirements for working with TDI and sending TDI
IRPs?
Can I do this from DISPATCH_LEVEL?
I need to access TCP from the kernel mode code running at
DISPATCH_LEVEL. Can I do this directly or must I queue work items to do
this?

Maxim Shatskih
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


You are currently subscribed to ntdev as: xxxxx@osr.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

Mark,

What about thread context? Must it be system thread context
or it can be arbitrary one?

Regards,
Anton

On 04/26/01, “Mark Cariddi ” wrote:
> It is my experience that you can only send IRP’s to TDI at IRQL’s <
> DISPATCH_LEVEL.
>
> Mark J. Cariddi
> Consulting Associate
> Open Systems Resources, Inc.
> http://www.osr.com/
>
>
> -----Original Message-----
> From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
> Sent: Wednesday, April 25, 2001 3:45 PM
> To: NT Developers Interest List
> Subject: [ntdev] TDI IRQLs
>
>
> What are the IRQL requirements for working with TDI and sending TDI
> IRPs?
> Can I do this from DISPATCH_LEVEL?
> I need to access TCP from the kernel mode code running at
> DISPATCH_LEVEL. Can I do this directly or must I queue work items to do
> this?
>
> Maxim Shatskih
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@osr.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


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

The ZwCreateFile that you do to create a TDI address object should be done
in the context of the system process. Once you get the handle back, then
you can convert it to a FILE_OBJECT for use in your subsequent calls to TDI
(yes, you’ll have to build your own IRPS and put the FILE_OBJECT you got
into it).

–Mark

Mark J. Cariddi
Consulting Associate
Open Systems Resources, Inc.
http://www.osr.com/

-----Original Message-----
From: xxxxx@hotmail.com
[mailto:xxxxx@hotmail.com]
Sent: Wednesday, April 25, 2001 9:01 PM
To: NT Developers Interest List
Subject: [ntdev] RE: TDI IRQLs

Mark,

What about thread context? Must it be system thread context
or it can be arbitrary one?

Regards,
Anton

On 04/26/01, “Mark Cariddi ” wrote:
> It is my experience that you can only send IRP’s to TDI at IRQL’s <
> DISPATCH_LEVEL.
>
> Mark J. Cariddi
> Consulting Associate
> Open Systems Resources, Inc.
> http://www.osr.com/
>
>
> -----Original Message-----
> From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
> Sent: Wednesday, April 25, 2001 3:45 PM
> To: NT Developers Interest List
> Subject: [ntdev] TDI IRQLs
>
>
> What are the IRQL requirements for working with TDI and sending TDI
> IRPs?
> Can I do this from DISPATCH_LEVEL?
> I need to access TCP from the kernel mode code running at
> DISPATCH_LEVEL. Can I do this directly or must I queue work items to do
> this?
>
> Maxim Shatskih
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@osr.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@osr.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@osr.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

No. The requirement is <= DISPATCH_LEVEL. For example, I’ve worked on
web-server-accelerator code that has TdiBuildConnect and then IoCallDriver,
both done at IRQL 2.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258


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

> The ZwCreateFile that you do to create a TDI address object should be done

in the context of the system process.

That’s what I do. I create the a TDI address object at DriverEntry(). As I
understand DriverEntry() is called at PASSIVE_LEVEL and in the context of
the system thread.

Once you get the handle back, then
you can convert it to a FILE_OBJECT for use in your subsequent calls to TDI
(yes, you’ll have to build your own IRPS and put the FILE_OBJECT you got
into it).

I create the thread and pass the requests to that thread. And the thread
passes the requests to the system worker thread by the call to
ExQueueWorkItem()() so execution is done in the context of the system
thread. As we do support only one request at a time (TDI driver is called
by the SCSI miniport) that’s not a problem right now. But now we’re moving
to the port driver model and I’d like the remove ExQueueWorkItem() code.
Can I do this safely?


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