Skip to content

Commit

Permalink
[vioscsi] Programatically determine max_segments
Browse files Browse the repository at this point in the history
Refactors VioScsiFindAdapter() to:

1. Use new mnemonic adaptExt->max_segments to replace adaptExt->max_physical_breaks
   (also used in the VioScsiBuildIo() and VioScsiReadExtendedData() functions)
2. Enable Registry lookup for max_segments in neo value "MaxPhysicalSegments" or
   the legacy value "PhysicalBreaks". New value defined by REGISTRY_MAX_PH_SEGMENTS.
3. Also derive max_segments from adaptExt->scsi_config.seg_max and also from
   the adaptExt->scsi_config.max_sectors value
4. Choose from among best candidates and check within limits
5. Enforce legacy StorPort NOPB off-by-one behaviour and provide explanation
6. Improves relevant instrumentation
7. Use new mnemonic PHYS_SEGMENTS_LIMIT to replace MAX_PHYS_SEGMENTS
8. Update VIRTIO_MAX_SG to (PHYS_SEGMENTS_LIMIT + 1)
9. Update VIRTIO_SCSI_QUEUE_LAST to (MAX_CPU - VIRTIO_SCSI_REQUEST_QUEUE_0)

Note: This commit enables the use of max_segments greater than
      adaptExt->scsi_config.seg_max (max = 254) up to
      PHYS_SEGMENTS_LIMIT (presently 512).

Signed-off-by: benyamin-codez <[email protected]>
  • Loading branch information
benyamin-codez committed Feb 18, 2025
1 parent 2bcf04f commit 7fe7d16
Show file tree
Hide file tree
Showing 2 changed files with 406 additions and 46 deletions.
Loading

0 comments on commit 7fe7d16

Please sign in to comment.