SCSI SRB size

Hi

I am writing SRP driver (SCSI remote protocol) , I am actually writing
Stoport Miniport driver.

I am trying to tune the driver performance and as first step I want to
use large msg size for each IO operation.

My HW is support msg size of up to 2 GB and up to 64 s/g entries
I reported to the Storport :

NumberOfPhysicalBreaks = 64
MaximumTransferLength = UNLIMITED
SrbExtensionSize = 3552

But after profiling the data transfer I notice that the StorPort port
driver sending SRB of 32K bytes size.
Each IO use scatter list with 4K elements.
No matter what I try to config Windows keep sending SRB of 32K bytes

Does any one knows what define the SRB max size?
Where can I configure that ?

Yossi

Assuming aligned transfers, the maximum size you should see is 256KB on x86/x64 systems, 512KB on ia64.

From: Yossi Leybovich [mailto:xxxxx@mellanox.co.il]
Sent: Monday, December 04, 2006 10:13 AM
Subject: SCSI SRB size

Hi

I am writing SRP driver (SCSI remote protocol) , I am actually writing Stoport Miniport driver.

I am trying to tune the driver performance and as first step I want to use large msg size for each IO operation.

My HW is support msg size of up to 2 GB and up to 64 s/g entries
I reported to the Storport :

NumberOfPhysicalBreaks = 64
MaximumTransferLength = UNLIMITED
SrbExtensionSize = 3552

But after profiling the data transfer I notice that the StorPort port driver sending SRB of 32K bytes size.
Each IO use scatter list with 4K elements.
No matter what I try to config Windows keep sending SRB of 32K bytes

Does any one knows what define the SRB max size?
Where can I configure that ?

Yossi

But still StorPort port driver call my Miniport only with 32K bytes msg
.
What am I doing wrong ?
Where can I control the Maximum data that can be transfer in IO
operation ?


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jeff Goldner
Sent: Tuesday, December 05, 2006 7:04 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SCSI SRB size

Assuming aligned transfers, the maximum size you should see is
256KB on x86/x64 systems, 512KB on ia64.

From: Yossi Leybovich [mailto:xxxxx@mellanox.co.il]
Sent: Monday, December 04, 2006 10:13 AM
Subject: SCSI SRB size

Hi

I am writing SRP driver (SCSI remote protocol) , I am actually
writing Stoport Miniport driver.

I am trying to tune the driver performance and as first step I
want to use large msg size for each IO operation.

My HW is support msg size of up to 2 GB and up to 64 s/g entries

I reported to the Storport :

NumberOfPhysicalBreaks = 64

MaximumTransferLength = UNLIMITED

SrbExtensionSize = 3552

But after profiling the data transfer I notice that the StorPort
port driver sending SRB of 32K bytes size.

Each IO use scatter list with 4K elements.

No matter what I try to config Windows keep sending SRB of 32K
bytes

Does any one knows what define the SRB max size?

Where can I configure that ?

Yossi


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Build and run the spti tool in the DDK and take a look at the display, particularly TrueMaximumTransfer. If anything looks suspicious, post the output here. Note there is a very low ceiling on how large a transfer your miniport can report. It’s about 32MB for 32-bit Windows and even smaller for 64-bit Windows–about 16MB. If a miniport reports anything larger than this, it will cause problems. But with a max SGL of 64, you should be well under the limit.

eof

Hi

Thanks for the advice.
I see mismatch between the num of phyrBreaks I reported in the
port_configuration_info structure
And the MaximumPhysicalPages I see from spti

The first is 0x10
An in the spti report 0x8

Do you have any Idea ? Maybe because I report myself as Fiber device?

Both structure/outputs attached below

Thanks
Yossi

C:\trace>spti.exe f:

***** STORAGE ADAPTER DESCRIPTOR DATA *****
Version: 00000004
TotalSize: 00000004
MaximumTransferLength: ffffffff (bytes)
MaximumPhysicalPages: 00000008
TrueMaximumTransfer: 00007000 (bytes)
AlignmentMask: 00000000
AdapterUsesPio: True
AdapterScansDown: False
CommandQueueing: True
AcceleratedTransfer: True
Bus Type: Fibre
Bus Major Version: 0002
Bus Minor Version: 0000

***** STORAGE DEVICE DESCRIPTOR DATA *****
Version: 00000028
TotalSize: 00000148
DeviceType: 00000000
DeviceTypeModifier: 00000000
RemovableMedia: False
CommandQueueing: True
Vendor Id: Mellanox
Product Id: IBSRP10-TGT
Product Revision: 1.46
Serial Number:
Bus Type: Fibre
Raw Properties: None

***** Detected Alignment Mask *****
***** was 00000000 *****

***** MODE SENSE – return all pages *****
***** with SenseInfo buffer *****

Scsi status: 00h, Bytes returned: 110h, Data buffer length: C0h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 00
010 02 00 00 00 50 00 00 00 30 00 00 00 1A 00 3F 00
020 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
050 23 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 10
060 00 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00 00
070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

***** MODE SENSE – return all pages *****
***** without SenseInfo buffer *****

Scsi status: 00h, Bytes returned: 110h, Data buffer length: C0h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 00
010 02 00 00 00 50 00 00 00 00 00 00 00 1A 00 3F 00
020 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
050 23 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 10
060 00 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00 00
070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

***** TEST UNIT READY *****
***** DataBufferLength = 0 *****

Scsi status: 00h, Bytes returned: 30h, Data buffer length: 0h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 00 00 00 00
010 02 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00
020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

***** MODE SENSE – return all pages *****
***** bad DataBufferOffset – should fail *****

Error: 87 The parameter is incorrect.

***** MODE SENSE *****
***** return caching mode sense page *****

Scsi status: 00h, Bytes returned: 110h, Data buffer length: C0h

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 00
010 02 00 00 00 50 00 00 00 30 00 00 00 1A 08 08 00
020 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
050 17 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 10
060 00 01 FF FF 00 00 00 00 00 00 00 00 00 00 00 00
070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

***** WRITE DATA BUFFER operation *****
Error: 1117 The request could not be performed because of an I/O device
error.

***** READ DATA BUFFER operation *****
Error: 1117 The request could not be performed because of an I/O device
error.

========================================================================

And here is the CONFIG structure from FindAdapter function:

0: kd> dt p_config
Local var @ 0xf78ee994 Type _PORT_CONFIGURATION_INFORMATION*
0x8978c8f0
+0x000 Length : 0x90
+0x004 SystemIoBusNumber : 0
+0x008 AdapterInterfaceType : 0 ( Internal )
+0x00c BusInterruptLevel : 0
+0x010 BusInterruptVector : 0
+0x014 InterruptMode : 1 ( Latched )
+0x018 MaximumTransferLength : 0xffffffff
+0x01c NumberOfPhysicalBreaks : 0x10
+0x020 DmaChannel : 0xffffffff
+0x024 DmaPort : 0xffffffff
+0x028 DmaWidth : 0 ( Width8Bits )
+0x02c DmaSpeed : 0 ( Compatible )
+0x030 AlignmentMask : 0
+0x034 NumberOfAccessRanges : 1
+0x038 AccessRanges : 0x898620a8 [0] _ACCESS_RANGE
+0x03c Reserved : (null)
+0x040 NumberOfBuses : 0x1 ‘’
+0x041 InitiatorBusId : [8] “???”
+0x049 ScatterGather : 0x1 ‘’
+0x04a Master : 0x1 ‘’
+0x04b CachesData : 0 ‘’
+0x04c AdapterScansDown : 0 ‘’
+0x04d AtdiskPrimaryClaimed : 0x1 ‘’
+0x04e AtdiskSecondaryClaimed : 0x1 ‘’
+0x04f Dma32BitAddresses : 0x1 ‘’
+0x050 DemandMode : 0 ‘’
+0x051 MapBuffers : 0x2 ‘’
+0x052 NeedPhysicalAddresses : 0x1 ‘’
+0x053 TaggedQueuing : 0x1 ‘’
+0x054 AutoRequestSense : 0x1 ‘’
+0x055 MultipleRequestPerLu : 0x1 ‘’
+0x056 ReceiveEvent : 0 ‘’
+0x057 RealModeInitialized : 0 ‘’
+0x058 BufferAccessScsiPortControlled : 0x1 ‘’
+0x059 MaximumNumberOfTargets : 0x1 ‘’
+0x05a ReservedUchars : [2] “”
+0x05c SlotNumber : 0
+0x060 BusInterruptLevel2 : 0
+0x064 BusInterruptVector2 : 0
+0x068 InterruptMode2 : 0 ( LevelSensitive )
+0x06c DmaChannel2 : 0
+0x070 DmaPort2 : 0
+0x074 DmaWidth2 : 0 ( Width8Bits )
+0x078 DmaSpeed2 : 0 ( Compatible )
+0x07c DeviceExtensionSize : 0
+0x080 SpecificLuExtensionSize : 0
+0x084 SrbExtensionSize : 0xde0
+0x088 Dma64BitAddresses : 0 ‘’
+0x089 ResetTargetSupported : 0 ‘’
+0x08a MaximumNumberOfLogicalUnits : 0xff ‘’
+0x08b WmiDataProvider : 0x1 ‘’
+0x08c SynchronizationModel : 1 ( StorSynchronizeFullDuplex )

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@email.com
Sent: Wednesday, December 06, 2006 5:46 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SCSI SRB size

Build and run the spti tool in the DDK and take a look at the
display, particularly TrueMaximumTransfer. If anything looks
suspicious, post the output here. Note there is a very low
ceiling on how large a transfer your miniport can report.
It’s about 32MB for 32-bit Windows and even smaller for
64-bit Windows–about 16MB. If a miniport reports anything
larger than this, it will cause problems. But with a max SGL
of 64, you should be well under the limit.

eof


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

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

If your adapter is capable of handling 64-bit physical addresses in its
DMA transfers then you need to set DMA64BitAddresses in the
PORT_CONFIGURATION_INFORMATION. As is you state that you only handle
32-bit addresses, and the HAL is only guaranteeing enough bounce buffers
to handle 8 pages in any given transfer (hence your 32K
restriction).xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yossi
Leybovich<unksent: thursday december am windows>System Software Devs Interest List<unksubject: re: scsi srb>sizethe num of phyrBreaks I reported in the<unkport_configuration_info>structure first is 0x10Maybe because I report myself as Fiber device?structure/outputs attached belowC:\trace>spti.exe f:DATA 00000004<unkmaximumtransferlength: ffffffff>MaximumPhysicalPages: 00000008(bytes)TrueAcceleratedTransfer: TrueMajor Version: 0002 STORAGE DEVICE DESCRIPTOR DATA 0000002800000000FalseMellanox1.46Raw Properties: NoneAlignment Mask C0h0D 0E 0F---------------------------------------------------------------2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 0002 00 00 00 50 00 00 00 30 00 00 00 1A 00 3F 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0023 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 1000 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
without SenseInfo buffer Bytes returned: 110h, Data buffer length: C0h02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F---------------------------------------------------------------2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 0002 00 00 00 50 00 00 00 00 00 00 00 1A 00 3F 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0023 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 1000 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
DataBufferLength = 0 returned: 30h, Data buffer length: 0h04 05 06 07 08 09 0A 0B 0C 0D 0E 0F---------------------------------------------------------------2C 00 00 00 00 00 06 00 01 00 00 00 00 00 00 0002 00 00 00 00 00 00 00 30 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
MODE SENSE return caching mode sense page status: 00h, Bytes returned: 110h, Data buffer length: C0h00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F---------------------------------------------------------------2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00 0002 00 00 00 50 00 00 00 30 00 00 00 1A 08 08 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0017 00 00 00 08 12 00 00 FF FF 00 00 00 10 00 1000 01 FF FF 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
<unkerror: the request could not be performed because of an>I/O device<unkerror. read data buffer>operation ***** <unkerror: the request could not be>performed because of an I/O
device<unkerror.>========================structure from FindAdapter function: dt
p_config_PORT_CONFIGURATION_INFORMATION*: 0x90AdapterInterfaceType : 0 ( Internal )0( Latched )NumberOfPhysicalBreaks : 0x100xffffffffDmaWidth : 0 ( Width8Bits )Compatible )NumberOfAccessRanges : 1_ACCESS_RANGENumberOfBuses : 0x1 ‘’+0x049 ScatterGather : 0x1 ‘’‘’0 ‘’AtdiskSecondaryClaimed : 0x1 ‘’‘’0x2 ‘’TaggedQueuing : 0x1 ‘’+0x055 MultipleRequestPerLu : 0x1 ‘’‘’BufferAccessScsiPortControlled : 0x1 ‘’MaximumNumberOfTargets : 0x1 ‘’“”0( LevelSensitive )DmaPort2 : 0)DeviceExtensionSize : 0+0x084 SrbExtensionSize : 0xde0‘’MaximumNumberOfLogicalUnits : 0xff ‘’0x1 ‘’) -----Original
Message----- From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@email.com Sent: Wednesday, December 06, 2006 5:46 AM
To: Windows System Software Devs Interest List Subject: RE:[ntdev]
SCSI SRB size Build and run the spti tool in the DDK and take
a look at the display, particularly TrueMaximumTransfer. If
anything looks suspicious, post the output here. Note there is a
very low ceiling on how large a transfer your miniport can report.
It’s about 32MB for 32-bit Windows and even smaller for
64-bit Windows–about 16MB. If a miniport reports anything larger
than this, it will cause problems. But with a max SGL of 64, you
should be well under the limit. eof —
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe,
visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http://www.osronline.com/article.cfm?id=256the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</unkerror.></unkerror:></unkerror.></unkerror:></unkmaximumtransferlength:></unkport_configuration_info></unksubject:></unksent:>

Thanks.
My HW support 64 bit DMA address and I will change that filed to TRUE.
But on my testing system I use 32 bit CPU (and 32 bit OS) so I don’t
understand why this will change the OS behavior.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Thursday, December 07, 2006 5:49 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] SCSI SRB size

If your adapter is capable of handling 64-bit physical
addresses in its DMA transfers then you need to set
DMA64BitAddresses in the PORT_CONFIGURATION_INFORMATION. As
is you state that you only handle 32-bit addresses, and the
HAL is only guaranteeing enough bounce buffers to handle 8
pages in any given transfer (hence your 32K
restriction).> xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Yossi
> Leybovich<unksent: thursday december>> AM<unkto: windows system software devs interest>> List<unksubject: re: scsi srb>> size> mismatch between the num of phyrBreaks I reported in
> the<unkport_configuration_info structure the>> MaximumPhysicalPages I see from spti> 0x10> Maybe because I report myself as Fiber device?> structure/outputs attached below> C:\trace>spti.exe f:> DESCRIPTOR
> DATA > TotalSize:
> 00000004<unkmaximumtransferlength: ffffffff>> MaximumPhysicalPages: 00000008> (bytes)> True> CommandQueueing: True> AcceleratedTransfer: True> Major Version: 0002>
STORAGE DEVICE DESCRIPTOR DATA > 00000028> 00000000> False> Mellanox> Product Revision:
> 1.46> Raw Properties: None> Alignment Mask
> > > > buffer length:
> C0h> 0A 0B 0C
> 0D 0E 0F> --------------------------------------------------------------
> -> 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00
> 00> 02 00 00 00 50 00 00 00 30 00 00 00 1A 00 3F
> 00> C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 23 00 00 00 08 12 00 00 FF FF 00 00 00 10 00
> 10> 00 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> pages
> without SenseInfo buffer > Bytes returned: 110h, Data buffer length: C0h> 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F> --------------------------------------------------------------
> -> 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00
> 00> 02 00 00 00 50 00 00 00 00 00 00 00 1A 00 3F
> 00> C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 23 00 00 00 08 12 00 00 FF FF 00 00 00 10 00
> 10> 00 01 FF FF 00 00 00 00 0A 0A 00 10 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> DataBufferLength = 0 > returned: 30h, Data buffer length: 0h> 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F> --------------------------------------------------------------
> -> 2C 00 00 00 00 00 06 00 01 00 00 00 00 00 00
> 00> 02 00 00 00 00 00 00 00 30 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> > > MODE SENSE > return caching mode sense page > status: 00h, Bytes returned: 110h, Data buffer length: C0h> 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F> --------------------------------------------------------------
> -> 2C 00 00 00 00 00 06 00 01 00 00 00 C0 00 00
> 00> 02 00 00 00 50 00 00 00 30 00 00 00 1A 08 08
> 00> C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 17 00 00 00 08 12 00 00 FF FF 00 00 00 10 00
> 10> 00 01 FF FF 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00> <unkerror: the request could not be performed because of an>> I/O device<unkerror. read data buffer>> operation <unkerror: the request could not be>> performed because of an I/O
> device<unkerror.>> ==========
> ========================> CONFIG structure from FindAdapter function:
> dt p_config> _PORT_CONFIGURATION_INFORMATION*> : 0x90> AdapterInterfaceType : 0 ( Internal )> 0> InterruptMode : 1
> ( Latched )> 0xffffffff> NumberOfPhysicalBreaks : 0x10> 0xffffffff> DmaWidth : 0 ( Width8Bits )> : 0 (
> Compatible )> NumberOfAccessRanges : 1> 0x898620a8 [0]
> _ACCESS_RANGE> NumberOfBuses : 0x1 ‘’> “???”> +0x049 ScatterGather : 0x1 ‘’> ‘’> AdapterScansDown :
> 0 ‘’> AtdiskSecondaryClaimed : 0x1 ‘’> ‘’> MapBuffers :
> 0x2 ‘’> TaggedQueuing : 0x1 ‘’> +0x055 MultipleRequestPerLu : 0x1 ‘’> ‘’> BufferAccessScsiPortControlled : 0x1 ‘’> MaximumNumberOfTargets : 0x1 ‘’> “”> 0> InterruptMode2 : 0
> ( LevelSensitive )> DmaPort2 : 0> )> DeviceExtensionSize : 0> +0x084 SrbExtensionSize : 0xde0> ‘’> MaximumNumberOfLogicalUnits : 0xff ‘’> 0x1 ‘’> StorSynchronizeFullDuplex
> )
> -----Original Message----- From:
> xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
> xxxxx@email.com Sent: Wednesday, December 06, 2006
> 5:46 AM
> To: Windows System Software Devs Interest List Subject:
> RE:[ntdev] SCSI SRB size Build and run the spti
> tool in the DDK and take a look at the display,
> particularly TrueMaximumTransfer. If anything looks
> suspicious, post the output here. Note there is a very low
> ceiling on how large a transfer your miniport can report.
> It’s about 32MB for 32-bit Windows and even smaller for
> 64-bit Windows–about 16MB. If a miniport reports
> anything larger than this, it will cause problems. But
> with a max SGL of 64, you should be well under the
> limit. eof — Questions?
> First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To
> unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
> > at http://www.osronline.com/article.cfm?id=256> unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
></unkerror.></unkerror:></unkerror.></unkerror:></unkmaximumtransferlength:></unkport_configuration_info></unksubject:></unkto:></unksent:>

>But on my testing system I use 32 bit CPU (and 32 bit OS) so I don’t

understand why this will change the OS behavior.

This setting is useful with >4GB of RAM, even on 32bit OS on 32bit CPU.

This setting allows the DMA engine to skip double-buffering the MDL’s pages if
they are >4GB.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim
S. Shatskih
Sent: Saturday, December 09, 2006 2:38 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SCSI SRB size

>But on my testing system I use 32 bit CPU (and 32 bit OS) so I don’t
>understand why this will change the OS behavior.

This setting is useful with >4GB of RAM, even on 32bit OS on
32bit CPU.

I changed that and still I get only IO of 32K (6-8 s/g list elements),
while I use Iometer with 64K,128K packets.

This setting allows the DMA engine to skip double-buffering
the MDL’s pages if they are >4GB.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

Hi

I ran spti tool over my driver (Scsi Rdma driver)

I don’t understand who answer the spti queries , but I am sure that my
driver (which is storport miniport) does not answer the query .

From the data I can understand that MaximumPhysicalPages is 8 although I
report 16 to the FindAdapter routine

Does anybody know from where this info is retrieve ? How can I control
this query ?
10x
Yossi

***** STORAGE ADAPTER DESCRIPTOR DATA *****
Version: 00000004
TotalSize: 00000004
aximumTransferLength: ffffffff (bytes)
MaximumPhysicalPages: 00000008
TrueMaximumTransfer: 00007000 (bytes)
AlignmentMask: 00000000
AdapterUsesPio: True
AdapterScansDown: False
CommandQueueing: True
AcceleratedTransfer: True
Bus Type: Fibre
Bus Major Version: 0002
Bus Minor Version: 0000

***** STORAGE DEVICE DESCRIPTOR DATA *****
Version: 00000028
TotalSize: 00000148
DeviceType: 00000000
DeviceTypeModifier: 00000000
RemovableMedia: False
CommandQueueing: True
Vendor Id: Mellanox
Product Id: IBSRP10-TGT
Product Revision: 1.46
Serial Number:
Bus Type: Fibre
Raw Properties: None

There may be an unexpected 8 page limit if you don’t specify PCIBus for the AdapterInterfaceType. The way your adapter gets reported right now with a 28K transfer limit will cause problems with applications that try to leverage this field. If you can’t solve it by trial and error, ultimately you may need to step into scsiport’s call to IoGetDmaAdapter to get to the bottom of it.

eof