Re: do discovery through SW transports too

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

 



On Tue, 2013-06-18 at 18:35 +0300, Or Gerlitz wrote:
> On 15/06/2013 11:25, Nicholas A. Bellinger wrote:
> > Hi Or & Mike,
> >
> > On Tue, 2013-06-11 at 08:04 +0300, Or Gerlitz wrote:
> >> On 06/06/2013 18:01, Mike Christie wrote:
> >>> However, above I am not talking about that or doing discovery over a
> >>> normal session in general. I was just trying to get clarification for
> >>> what you wanted. I was not sure if there was some new iser spec stuff
> >>> that I missed and you wanted to implement.
> >> Hi Mike,
> >>
> >> Its not new spec stuff, its just environments where plain TCP services
> >> might be out of hand for either of the sides and we don't want that to
> >> be an obstacle to deploy iser.
> > No luck yet generating discovery ib_iser session traffic with mnc's
> > initial patch + latest open-iscsi.git userspace.
> >
> > iscsiadm is currently defaulting to tcp for all sendtargets discovery:
> >
> > root@barret:# /sbin/iscsiadm -m discovery -t sendtargets --portal 10.100.0.1:3261 -I iser -d 4

<SNIP>

> > Following the debug pointer, CAP_TEXT_NEGO appears to be missing from
> > session->t->caps during iscsi_create_session() setup usage:
> >
> > iscsiadm: iscsi_create_session discovery ep connect iser, caps: 0x00000009
> >
> > Any reason why userspace would not matching iscsi_iser_transport->caps
> > w/ CAP_TEXT_NEGO set (0x00000089)..?
> 
> Hi Nic, Mike
> 
> in my environment (user space running latest open-iscsi tools, kernel in 
> both initiator and target based on your "queue" branch (3.10-rc5) + 
> Nic'sLIO patches to enable TEXT / Sendtargets support by iser + the 
> initiator patch  that advertizes CAP_TEXT_NEGO --the user space 
> initiator tools do see the text cap and attempt to issue the discovery 
> session through iser, but this somehow fails with LIO, with the 
> following print which I have already reported earlier:
> 
> xena017-3 kernel: i_buf: iqn.1994-05.com.redhat:308a2565a30, s_buf: 
> Discovery, t_buf: (null)
> xena017-3 kernel: Unable to accept text parameter length: 16greater than 
> MaxXmitDataSegmentLength 0.
> 
> 

So I'm pretty sure this is due to iscsi_target_parameters.c:
iscsi_set_keys_irrelevant_for_discovery() currently clearing
INITIATORRECVDATASEGMENTLENGTH and TARGETRECVDATASEGMENTLENGTH for
all discovery scenarios..

As I'm still not yet able to force iser discovery to occur on the
initiator side, can you give the following patch a shot on your setup..?

--nab

diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index bb5d5c5..f42eb84 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -369,7 +369,7 @@ static int iscsi_login_zero_tsih_s2(
 
        if (sess->sess_ops->SessionType)
                return iscsi_set_keys_irrelevant_for_discovery(
-                               conn->param_list);
+                               conn->param_list, iser);
 
        na = iscsit_tpg_get_node_attrib(sess);
 
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_para
index e382221..0b8c819 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -545,7 +545,8 @@ int iscsi_set_keys_to_negotiate(
 }
 
 int iscsi_set_keys_irrelevant_for_discovery(
-       struct iscsi_param_list *param_list)
+       struct iscsi_param_list *param_list,
+       bool iser)
 {
        struct iscsi_param *param;
 
@@ -582,10 +583,15 @@ int iscsi_set_keys_irrelevant_for_discovery(
                        param->state &= ~PSTATE_NEGOTIATE;
                else if (!strcmp(param->name, RDMAEXTENSIONS))
                        param->state &= ~PSTATE_NEGOTIATE;
-               else if (!strcmp(param->name, INITIATORRECVDATASEGMENTLENGTH))
+               else if (!strcmp(param->name, INITIATORRECVDATASEGMENTLENGTH)) {
+                       if (!iser)
+                               continue;
                        param->state &= ~PSTATE_NEGOTIATE;
-               else if (!strcmp(param->name, TARGETRECVDATASEGMENTLENGTH))
+               } else if (!strcmp(param->name, TARGETRECVDATASEGMENTLENGTH)) {
+                       if (!iser)
+                               continue;
                        param->state &= ~PSTATE_NEGOTIATE;
+               }
        }
 
        return 0;
diff --git a/drivers/target/iscsi/iscsi_target_parameters.h b/drivers/target/iscsi/iscsi_target_para
index a47046a..76d2fdf 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.h
+++ b/drivers/target/iscsi/iscsi_target_parameters.h
@@ -30,7 +30,7 @@ extern void iscsi_dump_sess_ops(struct iscsi_sess_ops *);
 extern void iscsi_print_params(struct iscsi_param_list *);
 extern int iscsi_create_default_params(struct iscsi_param_list **);
 extern int iscsi_set_keys_to_negotiate(struct iscsi_param_list *, bool);
-extern int iscsi_set_keys_irrelevant_for_discovery(struct iscsi_param_list *);
+extern int iscsi_set_keys_irrelevant_for_discovery(struct iscsi_param_list *, bool);
 extern int iscsi_copy_param_list(struct iscsi_param_list **,
                        struct iscsi_param_list *, int);
 extern int iscsi_change_param_value(char *, struct iscsi_param_list *, int);

--
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