public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] target: Add WRITE_STRIP + READ_INSERT support
@ 2015-02-28 10:35 Nicholas A. Bellinger
  2015-02-28 10:35 ` [PATCH 1/9] target: Convert DIF emulation to use cmd->prot_type Nicholas A. Bellinger
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Nicholas A. Bellinger @ 2015-02-28 10:35 UTC (permalink / raw)
  To: target-devel; +Cc: linux-scsi, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

Hi MKP, Sagi, & Co,

This series adds support for internal WRITE_STRIP + READ_INSERT
DIX operations using existing target_core_sbc.c DIF emulation.

It's useful in order for T10-PI fabrics to interoperate between
backend devices that don't have protection available or enabled yet.
This should be able to be done both internally using target DIF
emulation, or by the fabric driver's own HBA/NIC hardware offloads
outside of target_core_mod code.

This series includes initial tcm_loop support using a new endpoint
'fabric_prot_type' configfs attribute, and is able to successful
register SCSI LUNs and process I/Os in TYPE1 mode against a FILEIO
backend with pi_prot_type=0 set.

Here's how it looks in action:

scsi host6: TCM_Loopback
scsi 6:0:1:0: Direct-Access     LIO-ORG  FILEIO           4.0 PQ: 0 ANSI: 5
sd 6:0:1:0: [sda] Enabling DIF Type 1 protection
sd 6:0:1:0: Attached scsi generic sg1 type 0
sd 6:0:1:0: [sda] 4194304 512-byte logical blocks: (2.14 GB/2.00 GiB)
sd 6:0:1:0: [sda] Write Protect is off
sd 6:0:1:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 6:0:1:0: [sda] Enabling DIX T10-DIF-TYPE1-CRC protection
sd 6:0:1:0: [sda] DIF application tag size 2
sd 6:0:1:0: [sda] Attached SCSI disk

root@scsi-mq:~# cat /sys/kernel/config/target/loopback/naa.6001405973efc183/tpgt_1/attrib/fabric_prot_type
1
root@scsi-mq:~# cat
/sys/kernel/config/target/core/fileio_1/tmpfile/attrib/pi_prot_type
0

Please review as v4.1 material.

Thank you,

--nab

Nicholas Bellinger (9):
  target: Convert DIF emulation to use cmd->prot_type
  target: Add protected fabric + unprotected device support
  target: Update SPC/SBC emulation for sess_prot_type
  target: Move cmd->prot_op check into target_check_write_prot
  target: Add internal WRITE_STRIP support
  target: Move cmd->prot_op check into target_check_read_prot
  target: Add internal READ_INSERT support
  target/file: Add checks for backend DIF emulation
  loopback: Add fabric_prot_type attribute support

 drivers/target/loopback/tcm_loop.c     | 51 ++++++++++++++++++++-
 drivers/target/loopback/tcm_loop.h     |  1 +
 drivers/target/target_core_file.c      |  8 ++--
 drivers/target/target_core_sbc.c       | 73 ++++++++++++++++++++++--------
 drivers/target/target_core_spc.c       | 14 +++---
 drivers/target/target_core_transport.c | 82 +++++++++++++++++++++++++++-------
 include/target/target_core_base.h      |  1 +
 include/target/target_core_fabric.h    |  8 ++++
 8 files changed, 191 insertions(+), 47 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-02 11:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 10:35 [PATCH 0/9] target: Add WRITE_STRIP + READ_INSERT support Nicholas A. Bellinger
2015-02-28 10:35 ` [PATCH 1/9] target: Convert DIF emulation to use cmd->prot_type Nicholas A. Bellinger
2015-03-02 11:30   ` Sagi Grimberg
2015-02-28 10:35 ` [PATCH 2/9] target: Add protected fabric + unprotected device support Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 3/9] target: Update SPC/SBC emulation for sess_prot_type Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 4/9] target: Move cmd->prot_op check into target_check_write_prot Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 5/9] target: Add internal WRITE_STRIP support Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 6/9] target: Move cmd->prot_op check into target_check_read_prot Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 7/9] target: Add internal READ_INSERT support Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 8/9] target/file: Add checks for backend DIF emulation Nicholas A. Bellinger
2015-02-28 10:36 ` [PATCH 9/9] loopback: Add fabric_prot_type attribute support Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox