]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r367044: Introduce support of SCSI Command Priority.
authorAlexander Motin <mav@FreeBSD.org>
Tue, 24 Nov 2020 13:17:12 +0000 (13:17 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 24 Nov 2020 13:17:12 +0000 (13:17 +0000)
commit4b74fa5dd5aef9786aee4f9359be15b9da9a096d
tree48565475979accca6e12d75e13747e791b9bfe9f
parentca128d1881eeb8fc9b322c5754dbd20452bbd6bc
MFC r367044: Introduce support of SCSI Command Priority.

SAM-3 specification introduced concept of Task Priority, that was renamed
to Command Priority in SAM-4, and supported by all modern SCSI transports.
It provides 15 levels of relative priorities: 1 - highest, 15 - lowest and
0 - default.  SAT specification for SATA devices translates priorities 1-3
into NCQ high priority.

This change adds new "priority" field into empty spots of struct ccb_scsiio
and struct ccb_accept_tio of CAM and struct ctl_scsiio of CTL.  Respective
support is added into iscsi(4), isp(4), mpr(4), mps(4) and ocs_fc(4) drivers
for both initiator and where applicable target roles.  Minimal support was
added to CTL to receive the priority value from different frontends, pass it
between HA controllers and report in few places.

This patch does not add consumers of this functionality, so nothing should
really change yet, since the field is still set to 0 (default) on initiator
and not actively used on target.  Those are to be implemented separately.

I've confirmed priority working on WD Red SATA disks connected via mpr(4)
and properly transferred to CTL target via iscsi(4), isp(4) and ocs_fc(4).

While there, added missing tag_action support to ocs_fc(4) initiator role.
19 files changed:
sys/cam/cam_ccb.h
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl_frontend_cam_sim.c
sys/cam/ctl/ctl_frontend_iscsi.c
sys/cam/ctl/ctl_io.h
sys/cam/ctl/ctl_util.c
sys/cam/ctl/scsi_ctl.c
sys/dev/iscsi/iscsi.c
sys/dev/isp/isp.c
sys/dev/isp/isp_freebsd.c
sys/dev/isp/isp_freebsd.h
sys/dev/isp/isp_stds.h
sys/dev/isp/ispvar.h
sys/dev/mpr/mpr_sas.c
sys/dev/mps/mps_sas.c
sys/dev/ocs_fc/ocs_cam.c
sys/dev/ocs_fc/ocs_scsi.c
sys/dev/ocs_fc/ocs_scsi.h
sys/dev/ocs_fc/ocs_unsol.c