Virtual SCSI minports - storage expert input requested

Before you give me the standard spiel about virtual miniports are
impossible, let me say that’s my belief too.

AND there may be some information that changes things. Specifically I’m
talking about the function StorPortIssueDpc. I worked on a virtual storage
miniport in the past and the root problem was getting SRB’s to complete
without calling into the miniport from the port wrapper. I used an ugly hack
of issuing the DPC that was stored in the device object (it was Gary’s idea,
with some fine tuning on my own). It worked, except on occasion wrote an
unpleasant message to the event log saying a DPC happened without an
interrupt.

I’ve been looking at how to make a virtual storage port/minport work on some
high speed fabric. The storage function is on a virtual bus for the fabric.

It seems like the storport function StorPortIssueDpc, assuming you can call
it from an arbitrary context, would solve the SRB completion problems. You
just queue the SRB you want completed, issue the DPC, and in the DPC
complete the SRB in a proper miniport context. Has anybody looked at this or
tried this. Are there any other intrinsic problems in making a virtual
miniport work?

Microsoft seems to be saying, use iscsiprt, and it seems like there are a
few issues to that approach, like how do you release a miniport+iscsiprt
install package before Longhorn. Actually finding real includes and libs for
iscsiprt is proving non-trivial (Jeff is helping me on that path)

So what do you storage experts say? Is a high performance virtual minport
still impossible with storport? I’m assuming without StorPortIssueDpc that
storport has the same issue as scsiport, of completed SRB’s not getting
really completed until a return from the miniport to the port wrapper
happens?

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,
there was a long fight between me an Jamey). Works fine, no ugly messages in
the event log, no
timeout delays. Comparing the performance of monilithic SCSI port and SCSI
miniport there’s something
like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both
DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really
suspect to have the same differerence between iscsiprt and monilithic SCSI
port as well.

It would be nice if Jeff or you would find some free minutes to help me with
iscsiprt headers/libraries :slight_smile:
I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to
compare the performance. Maybe
there’s no need in monolithic SCSI ports at all… Maybe there’s no need in
walking long road finding iscsiprt
headers/libraries :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 10:01 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual SCSI minports - storage expert input requested

Before you give me the standard spiel about virtual miniports are
impossible, let me say that’s my belief too.

AND there may be some information that changes things. Specifically I’m
talking about the function StorPortIssueDpc. I worked on a virtual storage
miniport in the past and the root problem was getting SRB’s to complete
without calling into the miniport from the port wrapper. I used an ugly hack
of issuing the DPC that was stored in the device object (it was Gary’s idea,
with some fine tuning on my own). It worked, except on occasion wrote an
unpleasant message to the event log saying a DPC happened without an
interrupt.

I’ve been looking at how to make a virtual storage port/minport work on some
high speed fabric. The storage function is on a virtual bus for the fabric.

It seems like the storport function StorPortIssueDpc, assuming you can call
it from an arbitrary context, would solve the SRB completion problems. You
just queue the SRB you want completed, issue the DPC, and in the DPC
complete the SRB in a proper miniport context. Has anybody looked at this or
tried this. Are there any other intrinsic problems in making a virtual
miniport work?

Microsoft seems to be saying, use iscsiprt, and it seems like there are a
few issues to that approach, like how do you release a miniport+iscsiprt
install package before Longhorn. Actually finding real includes and libs for
iscsiprt is proving non-trivial (Jeff is helping me on that path)

So what do you storage experts say? Is a high performance virtual minport
still impossible with storport? I’m assuming without StorPortIssueDpc that
storport has the same issue as scsiport, of completed SRB’s not getting
really completed until a return from the miniport to the port wrapper
happens?

  • Jan

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if
there are any serialized SRB’s, you can’t send new SRB’s until the
serialized one completes. There is a bit in the SRB that controls this, I
believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to
serialize SRB’s when they detect SCSI errors. Your systems basically get’s
stuck sometimes if your depending on sending new SRB’s to complete an
existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the
proper hoops to jump through to get them.

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in
the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI
miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI
port as well.

It would be nice if Jeff or you would find some free minutes to help me with
iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to
compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in
walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and
SRB_FLAGS_BYPASS_LOCKED_QUEUE
and described approach works just fine (with some of the tuning). However I
agree it’s a hack and going full blown
SCSI port or iSCSIprt miniport is correct approach (there are some issues
howerver if you want to make your
virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll
drop a reminder to Jeff right now :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if
there are any serialized SRB’s, you can’t send new SRB’s until the
serialized one completes. There is a bit in the SRB that controls this, I
believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to
serialize SRB’s when they detect SCSI errors. Your systems basically get’s
stuck sometimes if your depending on sending new SRB’s to complete an
existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the
proper hoops to jump through to get them.

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in
the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI
miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI
port as well.

It would be nice if Jeff or you would find some free minutes to help me with
iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to
compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in
walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

That’s a news for me. But I do not understand one thing what do we return from FindAdapter [Scsi Miniport /Stor Miniport] for this virtual disk driver since there is no hardware to claim.
You cannot return SP_RETURN_FOUND because you are not claiming any hardware.
The only thing you can return is SP_RETURN_FOUND. I have also seen that FindAdapter Not even getting called [for OSes > Win2000, I think].

My Understanding is that there has to be some kind of hardware that you need to claim in order to load the SxxxMiniport driver properly…or am I missing something here???

Please update me.

  • Thanks,
    Ajitabh

Anton Kolomyeytsev wrote:
Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and SRB_FLAGS_BYPASS_LOCKED_QUEUE
and described approach works just fine (with some of the tuning). However I agree it’s a hack and going full blown
SCSI port or iSCSIprt miniport is correct approach (there are some issues howerver if you want to make your
virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll drop a reminder to Jeff right now :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if there are any serialized SRB’s, you can’t send new SRB’s until the serialized one completes. There is a bit in the SRB that controls this, I believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to serialize SRB’s when they detect SCSI errors. Your systems basically get’s stuck sometimes if your depending on sending new SRB’s to complete an existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the proper hoops to jump through to get them.

- Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI port as well.

It would be nice if Jeff or you would find some free minutes to help me with iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

Correction… “The only thing you can return is SP_RETURN_NOT_FOUND” from FindAdapter when you have no hardware to claim.

Driver Coder wrote:
That’s a news for me. But I do not understand one thing what do we return from FindAdapter [Scsi Miniport /Stor Miniport] for this virtual disk driver since there is no hardware to claim.
You cannot return SP_RETURN_FOUND because you are not claiming any hardware.
The only thing you can return is SP_RETURN_FOUND. I have also seen that FindAdapter Not even getting called [for OSes > Win2000, I think].

My Understanding is that there has to be some kind of hardware that you need to claim in order to load the SxxxMiniport driver properly…or am I missing something here???

Please update me.
- Thanks,
Ajitabh

Anton Kolomyeytsev wrote:
Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and SRB_FLAGS_BYPASS_LOCKED_QUEUE
and described approach works just fine (with some of the tuning). However I agree it’s a hack and going full blown
SCSI port or iSCSIprt miniport is correct approach (there are some issues howerver if you want to make your
virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll drop a reminder to Jeff right now :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if there are any serialized SRB’s, you can’t send new SRB’s until the serialized one completes. There is a bit in the SRB that controls this, I believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to serialize SRB’s when they detect SCSI errors. Your systems basically get’s stuck sometimes if your depending on sending new SRB’s to complete an existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the proper hoops to jump through to get them.

- Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI port as well.

It would be nice if Jeff or you would find some free minutes to help me with iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@yahoo.com To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

It has been a while since I gave up on virtual scsi miniports, but the
one I had working pretended to be an ISA device and had an INF file that
had the one required IO resource that made this appear legitimate.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Driver Coder
Sent: Thursday, October 06, 2005 1:55 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input
requested

Correction… “The only thing you can return is SP_RETURN_NOT_FOUND”
from FindAdapter when you have no hardware to claim.

Driver Coder wrote:

That’s a news for me. But I do not understand one thing what do
we return from FindAdapter [Scsi Miniport /Stor Miniport] for this
virtual disk driver since there is no hardware to claim.

You cannot return SP_RETURN_FOUND because you are not claiming
any hardware.

The only thing you can return is SP_RETURN_FOUND. I have also
seen that FindAdapter Not even getting called [for OSes > Win2000, I
think].

My Understanding is that there has to be some kind of hardware
that you need to claim in order to load the SxxxMiniport driver
properly…or am I missing something here???

Please update me.

- Thanks,

Ajitabh

Anton Kolomyeytsev wrote:

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE
and SRB_FLAGS_BYPASS_LOCKED_QUEUE

and described approach works just fine (with some of the
tuning). However I agree it’s a hack and going full blown

SCSI port or iSCSIprt miniport is correct approach
(there are some issues howerver if you want to make your

virtual storage driver bootable - it’s what we’re busy
with right now).

If you’d find a way to share headers/libraries it would
be just great! I’ll drop a reminder to Jeff right now :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage
expert input requested

Hi Anton,

What you describe I once tried, and does not always
work. Specifically, if there are any serialized SRB’s, you can’t send
new SRB’s until the serialized one completes. There is a bit in the SRB
that controls this, I believe SRB_FLAGS_DISABLE_DISCONNECT. The storage
class drivers like to serialize SRB’s when they detect SCSI errors. Your
systems basically get’s stuck sometimes if your depending on sending new
SRB’s to complete an existing one.

So far, I don’t have iscsiprt headers, although Jeff is
looking into the proper hoops to jump through to get them.

- Jan

Just use SCSIPORT and send SRB to yourself to complete
the request (try searching the archives,

there was a long fight between me an Jamey). Works fine,
no ugly messages in the event log, no

timeout delays. Comparing the performance of monilithic
SCSI port and SCSI miniport there’s something

like 10-20% difference (SCSI port is faster of course)
depending of the lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what
kind of architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt
and monilithic SCSI port as well.

It would be nice if Jeff or you would find some free
minutes to help me with iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI
initiator to MS iscsiprt to compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe
there’s no need in walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown
lmsubst tag argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown
lmsubst tag argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com



Yahoo! for Good
Click here to donate http:</http:>
to the Hurricane Katrina relief effort. — Questions? First check the
Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are
currently subscribed to ntdev as: xxxxx@yahoo.com To unsubscribe
send a blank email to xxxxx@lists.osr.com

________________________________

Yahoo! for Good
Click here to donate http:</http:> to the
Hurricane Katrina relief effort. — Questions? First check the Kernel
Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are
currently subscribed to ntdev as: xxxxx@stratus.com To unsubscribe
send a blank email to xxxxx@lists.osr.com

Do you need a virtual scsi miniport in the first place?


http://www.cristalink.com

“Jan Bottorff” wrote in message news:xxxxx@ntdev…
Before you give me the standard spiel about virtual miniports are
impossible, let me say that’s my belief too.

AND there may be some information that changes things. Specifically I’m
talking about the function StorPortIssueDpc. I worked on a virtual storage
miniport in the past and the root problem was getting SRB’s to complete
without calling into the miniport from the port wrapper. I used an ugly hack
of issuing the DPC that was stored in the device object (it was Gary’s idea,
with some fine tuning on my own). It worked, except on occasion wrote an
unpleasant message to the event log saying a DPC happened without an
interrupt.

I’ve been looking at how to make a virtual storage port/minport work on some
high speed fabric. The storage function is on a virtual bus for the fabric.

It seems like the storport function StorPortIssueDpc, assuming you can call
it from an arbitrary context, would solve the SRB completion problems. You
just queue the SRB you want completed, issue the DPC, and in the DPC
complete the SRB in a proper miniport context. Has anybody looked at this or
tried this. Are there any other intrinsic problems in making a virtual
miniport work?

Microsoft seems to be saying, use iscsiprt, and it seems like there are a
few issues to that approach, like how do you release a miniport+iscsiprt
install package before Longhorn. Actually finding real includes and libs for
iscsiprt is proving non-trivial (Jeff is helping me on that path)

So what do you storage experts say? Is a high performance virtual minport
still impossible with storport? I’m assuming without StorPortIssueDpc that
storport has the same issue as scsiport, of completed SRB’s not getting
really completed until a return from the miniport to the port wrapper
happens?

- Jan

Jan,

Nice to know someone was able to use my pontifications. :slight_smile:


The personal opinion of
Gary G. Little

neither bypass flag will get you past a request that’s marked for
DISABLE_DISCONNECT. the flags you mentioned override the queueing
behavior at the LUN level, while DISABLE_DISCONNECT modifies the
behavior at the adapter level (it should really be the bus level, but
that’s a different issue)

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anton
Kolomyeytsev
Sent: Thursday, October 06, 2005 3:56 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input
requested

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and
SRB_FLAGS_BYPASS_LOCKED_QUEUE
and described approach works just fine (with some of the tuning).
However I agree it’s a hack and going full blown
SCSI port or iSCSIprt miniport is correct approach (there are some
issues howerver if you want to make your
virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great!
I’ll drop a reminder to Jeff right now :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input
requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically,
if there are any serialized SRB’s, you can’t send new SRB’s until the
serialized one completes. There is a bit in the SRB that controls this,
I believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like
to serialize SRB’s when they detect SCSI errors. Your systems basically
get’s stuck sometimes if your depending on sending new SRB’s to complete
an existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the
proper hoops to jump through to get them.

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly
messages in the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and
SCSI miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic
SCSI port as well.

It would be nice if Jeff or you would find some free minutes to help me
with iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt
to compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need
in walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Yep…totally forgot about ISA…never tried this but surely would do it in near future.
But this means that Virtual Storport is not possible because it does not support legacy buses.
We run in to same problem here.

“Roddy, Mark” wrote:
v:* {behavior:url(#default#VML);}o:* {behavior:url(#default#VML);}w:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1:*{behavior:url(#default#ieooui) }
It has been a while since I gave up on virtual scsi miniports, but the one I had working pretended to be an ISA device and had an INF file that had the one required IO resource that made this appear legitimate.

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Driver Coder
Sent: Thursday, October 06, 2005 1:55 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Correction… “The only thing you can return is SP_RETURN_NOT_FOUND” from FindAdapter when you have no hardware to claim.

Driver Coder wrote:

That’s a news for me. But I do not understand one thing what do we return from FindAdapter [Scsi Miniport /Stor Miniport] for this virtual disk driver since there is no hardware to claim.

You cannot return SP_RETURN_FOUND because you are not claiming any hardware.

The only thing you can return is SP_RETURN_FOUND. I have also seen that FindAdapter Not even getting called [for OSes > Win2000, I think].

My Understanding is that there has to be some kind of hardware that you need to claim in order to load the SxxxMiniport driver properly…or am I missing something here???

Please update me.

- Thanks,

Ajitabh

Anton Kolomyeytsev wrote:

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and SRB_FLAGS_BYPASS_LOCKED_QUEUE

and described approach works just fine (with some of the tuning). However I agree it’s a hack and going full blown

SCSI port or iSCSIprt miniport is correct approach (there are some issues howerver if you want to make your

virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll drop a reminder to Jeff right now :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if there are any serialized SRB’s, you can’t send new SRB’s until the serialized one completes. There is a bit in the SRB that controls this, I believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to serialize SRB’s when they detect SCSI errors. Your systems basically get’s stuck sometimes if your depending on sending new SRB’s to complete an existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the proper hoops to jump through to get them.

- Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI port as well.

It would be nice if Jeff or you would find some free minutes to help me with iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@yahoo.com To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@stratus.com To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

Hi Peter,

What you describe is exactly my experience. I eventually abandoned the
strategy.

Any opinion on calling StorPortIssueDpc from an arbitrary context (like
calling it from the DPC of another driver)?

  • Jan

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Thursday, October 06, 2005 1:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

neither bypass flag will get you past a request that’s marked for
DISABLE_DISCONNECT. the flags you mentioned override the queueing behavior
at the LUN level, while DISABLE_DISCONNECT modifies the behavior at the
adapter level (it should really be the bus level, but that’s a different
issue)

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anton Kolomyeytsev
Sent: Thursday, October 06, 2005 3:56 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and
SRB_FLAGS_BYPASS_LOCKED_QUEUE

and described approach works just fine (with some of the tuning). However I
agree it’s a hack and going full blown

SCSI port or iSCSIprt miniport is correct approach (there are some issues
howerver if you want to make your

virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll
drop a reminder to Jeff right now :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if
there are any serialized SRB’s, you can’t send new SRB’s until the
serialized one completes. There is a bit in the SRB that controls this, I
believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to
serialize SRB’s when they detect SCSI errors. Your systems basically get’s
stuck sometimes if your depending on sending new SRB’s to complete an
existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the
proper hoops to jump through to get them.

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in
the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI
miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI
port as well.

It would be nice if Jeff or you would find some free minutes to help me with
iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to
compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in
walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Do you need a virtual scsi miniport in the first place?

It sure seems like it. I have some fabric hardware controlled by it’s own
driver. You can essentially issue read/writes to the fabric, and it let’s
you know it’s done via a completion callback. I also have multiple functions
talking to the fabric like storage, networking, and a few others. A virtual
bus driver above the fabric hardware driver creates PDO’s for each function,
with PnP id’s designating different functions, so an appropriate stack gets
built.

One suggestion by a developer was to take the interrupt resource for the
fabric hardware and clone it to every virtual PDO, and get EVERY function
driver to install an ISR. All the ISR’s except the last one return false, so
the next ISR in the chain gets control. I personally am skeptical about this
working (well), but also am looking into it. Is that what you meant?

  • Jan

“Jan Bottorff” wrote in message
> news:xxxxx@ntdev…
> Before you give me the standard spiel about virtual miniports are
> impossible, let me say that’s my belief too.
>
> AND there may be some information that changes things. Specifically I’m
> talking about the function StorPortIssueDpc. I worked on a virtual storage
> miniport in the past and the root problem was getting SRB’s to complete
> without calling into the miniport from the port wrapper. I used an ugly
> hack
> of issuing the DPC that was stored in the device object (it was Gary’s
> idea,
> with some fine tuning on my own). It worked, except on occasion wrote an
> unpleasant message to the event log saying a DPC happened without an
> interrupt.
>
> I’ve been looking at how to make a virtual storage port/minport work on
> some
> high speed fabric. The storage function is on a virtual bus for the
> fabric.
>
> It seems like the storport function StorPortIssueDpc, assuming you can
> call
> it from an arbitrary context, would solve the SRB completion problems. You
> just queue the SRB you want completed, issue the DPC, and in the DPC
> complete the SRB in a proper miniport context. Has anybody looked at this
> or
> tried this. Are there any other intrinsic problems in making a virtual
> miniport work?
>
> Microsoft seems to be saying, use iscsiprt, and it seems like there are a
> few issues to that approach, like how do you release a miniport+iscsiprt
> install package before Longhorn. Actually finding real includes and libs
> for
> iscsiprt is proving non-trivial (Jeff is helping me on that path)
>
> So what do you storage experts say? Is a high performance virtual minport
> still impossible with storport? I’m assuming without StorPortIssueDpc that
> storport has the same issue as scsiport, of completed SRB’s not getting
> really completed until a return from the miniport to the port wrapper
> happens?
>
> - Jan
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@pmatrix.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

We solved the exact same issue by using iscsiprt.sys for our multi-protocol
(TOE/iSCSI/RDMA) offload nic. It’s going to be a huge amount of work
depending how many protocol your chip supports. An NDIS TCP chimney driver
alone is troublesome enough.

May I know what hardware it is?

Good luck,
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com

----- Original Message -----
From: “Jan Bottorff”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 06, 2005 10:52 PM
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

>> Do you need a virtual scsi miniport in the first place?
>
> It sure seems like it. I have some fabric hardware controlled by it’s own
> driver. You can essentially issue read/writes to the fabric, and it let’s
> you know it’s done via a completion callback. I also have multiple
> functions
> talking to the fabric like storage, networking, and a few others. A
> virtual
> bus driver above the fabric hardware driver creates PDO’s for each
> function,
> with PnP id’s designating different functions, so an appropriate stack
> gets
> built.
>
> One suggestion by a developer was to take the interrupt resource for the
> fabric hardware and clone it to every virtual PDO, and get EVERY function
> driver to install an ISR. All the ISR’s except the last one return false,
> so
> the next ISR in the chain gets control. I personally am skeptical about
> this
> working (well), but also am looking into it. Is that what you meant?
>
> - Jan
>
>>
>> “Jan Bottorff” wrote in message
>> news:xxxxx@ntdev…
>> Before you give me the standard spiel about virtual miniports are
>> impossible, let me say that’s my belief too.
>>
>> AND there may be some information that changes things. Specifically I’m
>> talking about the function StorPortIssueDpc. I worked on a virtual
>> storage
>> miniport in the past and the root problem was getting SRB’s to complete
>> without calling into the miniport from the port wrapper. I used an ugly
>> hack
>> of issuing the DPC that was stored in the device object (it was Gary’s
>> idea,
>> with some fine tuning on my own). It worked, except on occasion wrote an
>> unpleasant message to the event log saying a DPC happened without an
>> interrupt.
>>
>> I’ve been looking at how to make a virtual storage port/minport work on
>> some
>> high speed fabric. The storage function is on a virtual bus for the
>> fabric.
>>
>> It seems like the storport function StorPortIssueDpc, assuming you can
>> call
>> it from an arbitrary context, would solve the SRB completion problems.
>> You
>> just queue the SRB you want completed, issue the DPC, and in the DPC
>> complete the SRB in a proper miniport context. Has anybody looked at this
>> or
>> tried this. Are there any other intrinsic problems in making a virtual
>> miniport work?
>>
>> Microsoft seems to be saying, use iscsiprt, and it seems like there are a
>> few issues to that approach, like how do you release a miniport+iscsiprt
>> install package before Longhorn. Actually finding real includes and libs
>> for
>> iscsiprt is proving non-trivial (Jeff is helping me on that path)
>>
>> So what do you storage experts say? Is a high performance virtual minport
>> still impossible with storport? I’m assuming without StorPortIssueDpc
>> that
>> storport has the same issue as scsiport, of completed SRB’s not getting
>> really completed until a return from the miniport to the port wrapper
>> happens?
>>
>> - Jan
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@pmatrix.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hotpop.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

2Peter: of course yoy’re correct! Sorry, too much time passed since I’ve
looked at this topic last time.

2Jan: there are other underwater stones in this approach except the frozen
queue :slight_smile: So combination
of timer + “fast completion” must be used.

However I don’t understand why you want to stick with miniports? Only to
make your driver bootable?
You could go the way emBoot guys went: they have SCSI miniport with TDI
lower edge to boot (low performance,
boot support and some basic features only) and full blown SCSI port to do
true work when the machine is
up and running. So you can have your protocol isolated in DLL or LIB and
shared between two storage
drivers and you don’t need to do hacks to make SCSI miniport fast (who cares

  • would machine boot 1 minute
    or 36 seconds - the difference in performance is not that large) and don’t
    need to do hacks to make full
    blown SCSI port bootable (it’s a nightmare - trust me).

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Friday, October 07, 2005 8:39 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Peter,

What you describe is exactly my experience. I eventually abandoned the
strategy.

Any opinion on calling StorPortIssueDpc from an arbitrary context (like
calling it from the DPC of another driver)?

  • Jan

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Thursday, October 06, 2005 1:05 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

neither bypass flag will get you past a request that’s marked for
DISABLE_DISCONNECT. the flags you mentioned override the queueing behavior
at the LUN level, while DISABLE_DISCONNECT modifies the behavior at the
adapter level (it should really be the bus level, but that’s a different
issue)

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anton Kolomyeytsev
Sent: Thursday, October 06, 2005 3:56 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Jan,

you need to set both flags SRB_FLAGS_BYPASS_FROZEN_QUEUE and
SRB_FLAGS_BYPASS_LOCKED_QUEUE

and described approach works just fine (with some of the tuning). However I
agree it’s a hack and going full blown

SCSI port or iSCSIprt miniport is correct approach (there are some issues
howerver if you want to make your

virtual storage driver bootable - it’s what we’re busy with right now).

If you’d find a way to share headers/libraries it would be just great! I’ll
drop a reminder to Jeff right now :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Thursday, October 06, 2005 12:18 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Virtual SCSI minports - storage expert input requested

Hi Anton,

What you describe I once tried, and does not always work. Specifically, if
there are any serialized SRB’s, you can’t send new SRB’s until the
serialized one completes. There is a bit in the SRB that controls this, I
believe SRB_FLAGS_DISABLE_DISCONNECT. The storage class drivers like to
serialize SRB’s when they detect SCSI errors. Your systems basically get’s
stuck sometimes if your depending on sending new SRB’s to complete an
existing one.

So far, I don’t have iscsiprt headers, although Jeff is looking into the
proper hoops to jump through to get them.

  • Jan

Just use SCSIPORT and send SRB to yourself to complete the request (try
searching the archives,

there was a long fight between me an Jamey). Works fine, no ugly messages in
the event log, no

timeout delays. Comparing the performance of monilithic SCSI port and SCSI
miniport there’s something

like 10-20% difference (SCSI port is faster of course) depending of the
lower edge you use (we used both

DISPATCH_LEVEL TDI and reading local disk, not sure what kind of
architecture you’ll have…). I really

suspect to have the same differerence between iscsiprt and monilithic SCSI
port as well.

It would be nice if Jeff or you would find some free minutes to help me with
iscsiprt headers/libraries :slight_smile:

I’d love to have experimental port of our iSCSI initiator to MS iscsiprt to
compare the performance. Maybe

there’s no need in monolithic SCSI ports at all… Maybe there’s no need in
walking long road finding iscsiprt

headers/libraries :slight_smile:

Regards,

Anton Kolomyeytsev

CEO, Rocket Division Software


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com