Re: [PATCH] iscsi-target: Disable Immediate + Unsolicited Data with ISER Protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2014-05-15 at 10:23 +0300, Sagi Grimberg wrote:
> On 5/14/2014 11:35 PM, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> >
> > This patch explicitly disables Immediate + Unsolicited Data for ISER
> > connections during login in iscsi_login_zero_tsih_s2() when protection
> > has been enabled for the session by the underlying hardware.
> >
> > This is currently required because protection / signature memory regions
> > (MRs) expect T10 PI to occur on RDMA READs + RDMA WRITEs transfers, and
> > not on a immediate data payload associated with ISCSI_OP_SCSI_CMD, or
> > unsolicited data-out associated with a ISCSI_OP_SCSI_DATA_OUT.
> 
> Hey Nic,
> 
> Thanks for this one. see comments below.
> 
> > Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> > Cc: Or Gerlitz <ogerlitz@xxxxxxxxxxxx>
> > Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> > ---
> >   drivers/target/iscsi/iscsi_target_login.c |   21 +++++++++++++++++++++
> >   1 file changed, 21 insertions(+)
> >
> > diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
> > index b72d855..9e99b63 100644
> > --- a/drivers/target/iscsi/iscsi_target_login.c
> > +++ b/drivers/target/iscsi/iscsi_target_login.c
> > @@ -452,6 +452,27 @@ static int iscsi_login_zero_tsih_s2(
> >   				ISCSI_LOGIN_STATUS_NO_RESOURCES);
> >   			return -1;
> >   		}
> > +		/*
> > +		 * ISER currently requires that ImmediateData + Unsolicited
> > +		 * Data be disabled when protection / signature MRs are enabled.
> > +		 */
> > +		if (sess->se_sess->sup_prot_ops &
> > +		   (TARGET_PROT_DOUT_STRIP | TARGET_PROT_DOUT_PASS)) {
> 
> We should condition with TARGET_PROT_DOUT_INSERT as well. when working 
> in T10-PI mode (expose a T10-PI backstore)
> against legacy initiators we want the HBA to offload T10-PI generation. 
> In this case the prot_op will be
> TARGET_PROT_DOUT_INSERT and we need RDMA transfer for that.

Yes, of course.   Added to the original patch.

> 
> > +
> > +			sprintf(buf, "ImmediateData=No");
> 
> I think a debug/warning print is appropriate in this case.
> something of the following:
> pr_warn("T10-PI mode is active, Setting ImmediateData=No, 
> InitialR2T=Yes\n");

Done.

The updated patch is here, which also includes a goto to avoid the
MDRSL alignment check from returning too early.

https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=5f0a6156ff65eb3c9a134b3c88e13b48a8a95ce6

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux