Skip to content

tcm/pscsi: Add support for BIDI-COMMAND passthrough

Nicholas A. Bellinger linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tcm: Add support for BIDI-COMMAND passthroughdrivers/target/target_core_transport.c include/target/target_core_base.h+92 -142 replies
2/3tcm/pscsi: Add proper BIDI-COMMAND passthrough to SCSI MidLayerdrivers/target/target_core_pscsi.c drivers/target/target_core_pscsi.h+86 -265 replies
3/3tcm: Add XDWRITEREAD_10 passthrough supportdrivers/target/target_core_transport.c+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] tcm/pscsi: Add support for BIDI-COMMAND passthrough

From: Nicholas Bellinger <[email protected]>

Greetings Boaz and Co,

This patch series adds proper support to TCM Core for XDWRITEREAD_32 and XDWRITEREAD_10 to allow for TCM/pSCSI plugin -> SCSI ML via struct request.

This first patch adds the necessary pieces to TCM Core for handling the transparent memory mapping using the new struct se_task->task_sg_bidi[], and other necessary bits for the underlying per new se_task BIDI context into TCM/pSCSI.

The second patch adds support in TCM/pSCSI plugin code to handle the extra struct request allocation, setup and release for the additional BIDI SCSI READ SCSI READ payload going into struct se_task->task_sg_bidi[] memory.

And the third patch adds the same passthrough option as above with TCM/pSCSI for XDWRITEREAD_10 CDBs in TCM Core.

So far this has been tested with TCM_Loop -> TCM_core -> TCM/pSCSI -> scsi_debug on v2.6.36-rc4 in x86 HVM.

Many thanks to Boaz for his comments with BIDI-COMMANDs and > 16 byte CDBs!

Nicholas Bellinger (3):
tcm: Add support for BIDI-COMMAND passthrough tcm/pscsi: Add proper BIDI-COMMAND passthrough to SCSI MidLayer
tcm: Add XDWRITEREAD_10 passthrough support

 drivers/target/target_core_pscsi.c     |  111 ++++++++++++++++++++++++-------
 drivers/target/target_core_pscsi.h     |    1 +
 drivers/target/target_core_transport.c |  112 ++++++++++++++++++++++++++++----
 include/target/target_core_base.h      |    1 +
 4 files changed, 185 insertions(+), 40 deletions(-)