On Jul 26, 2011, at 11:34 PM, Hannes Reinecke wrote:
> On 07/26/2011 09:44 PM, Mike Christie wrote:
>> On 07/26/2011 01:38 AM, Hannes Reinecke wrote:
>>> Hi Eddie,
>>>
>>> you beat me to it ...
>>>
>>> On 07/26/2011 02:28 AM, Eddie Wai wrote:
>>>> Hello Mike,
>>>>
>>>> The following snippet from the 39d4ceb04f051c208ae7509d268a3871ffa194c5
>>>> commit is preventing bnx2i from being able to offload when connecting
>>>> through the iscsi_sysfs_get_hostinfo_by_host_no code path where the
>>>> session argument == NULL.  The initiatorname sysfs inquiry failed but
>>>> this is expected since it does not exist in the iscsi_host for bnx2i.
>>>>
>>>> Perhaps the error return code should only be propagated upward when
>>>> session != NULL specifically for hbas like qla4xxx?
>>>>
>>>> Thanks,
>>>> Eddie
>>>>
>>>> ----- 8<   ----- 8<   -----
>>>> @@ -527,7 +528,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec
>>>> *iface, int host_no,
>>>>                                            iface_str(iface));
>>>>                  }
>>>>          }
>>>> -       return ret;
>>>> +       if (ret)
>>>> +               return ISCSI_ERR_SYSFS_LOOKUP;
>>>> +       else
>>>> +               return 0;
>>>>   }
>>>> ----- 8<   ----- 8<   -----
>>> Actually, this is the patch I have:
>>>
>>> diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
>>> index e82fe80..145816d 100644
>>> --- a/usr/iscsi_sysfs.c
>>> +++ b/usr/iscsi_sysfs.c
>>> @@ -489,7 +489,7 @@ static int iscsi_sysfs_read_iface(struct iface_rec
>>> *iface, int host_no,
>>>         if (ret) {
>>>                 ret = sysfs_get_str(id, ISCSI_HOST_SUBSYS, "initiatorname",
>>>                                     iface->iname, sizeof(iface->iname));
>>> -               if (ret)
>>> +               if (ret) {
>>>                         /*
>>>                          * default iname is picked up later from
>>>                          * initiatorname.iscsi if software/partial-offload.
>>> @@ -499,6 +499,8 @@ static int iscsi_sysfs_read_iface(struct iface_rec
>>> *iface, int host_no,
>>>                          */
>>>                         log_debug(7, "Could not read initiatorname for "
>>>                                   "host%d\n", host_no);
>>> +                       ret = 0;
>>> +               }
>>>         }
>>>
>>>         /*
>>>
>>> (Well, of course it got line-wrapped, but should get you the idea).
>>>
>>> I'll be sending the proper patch to the mailing-list shortly.
>>> But yes, that is a real issue.
>>
>> Yeah, this is right. That is the behavior we had before. I can just fix
>> this up and merge it if there were no other changes needed.
> Not in this area, no.
>
> I've got some minor patches to the SUSE init script but they still
> need further testing.
>
> And actually I'm working on an 'iscsi_offload' scripts which
> configures the interface definitions for the various offload
> engines. If there is enough interest maybe we should include it in
> the open-iscsi tarball.
>
I think this is a good idea.

Ravi



This message and any attached documents contain information from QLogic 
Corporation or its wholly-owned subsidiaries that may be confidential. If you 
are not the intended recipient, you may not read, copy, distribute, or use this 
information. If you have received this transmission in error, please notify the 
sender immediately by reply e-mail and then delete this message.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to