On 12/20/2016 12:28 PM, Andrew Patterson wrote:
> On 12/20/2016 12:13 PM, Mike Christie wrote:
>> On 12/20/2016 12:15 PM, Andrew Patterson wrote:
>>> On 12/12/2016 02:38 PM, Andrew Patterson wrote:
>>>>
>>>>
>>>> On Friday, December 9, 2016 at 3:33:57 PM UTC-7, Mike Christie wrote:
>>>>
>>>>     On 12/08/2016 10:55 AM, [email protected] <javascript:> wrote:
>>>>     > I am trying to get iSCSI boot working on a debian-based system
>>>>     > using built-in uEFI iSCSI initiator firmware and broadcom
>>>>     > NICs (bnx2x).
>>>>     >
>>>>     > The debian initramfs uses the ibft support in iscsistart to log
>>>>     > into the root volume. The initramfs script uses iscsistart -N to
>>>>     > bring up the NICs before logging in with iscsstart -b. This
>>>>     > process works fine when using non-offload NICs, but fails when
>>>>     > using NICs using the bnx2, bnx2x, cxgb3, and cxgb4 drivers due to
>>>>     > the following code in
>>>>     > utils/fwparam_ibft/fw_entry.c:fw_setup_nics():
>>>>     >
>>>>     >         list_for_each_entry(context, &targets, list) {          
>>>>     >             /* if it is a offload nic ignore it */
>>>>     >             if (!net_get_transport_name_from_netdev(context->iface,
>>>>     >                                 transport))
>>>>     >                 continue
>>>>     >
>>>>     >
>>>>     > Which does a lookup in the table in usr/iscsi_net_util.c
>>>>     >
>>>>     >         static struct iscsi_net_driver net_drivers[] = {
>>>>     >             {"cxgb3", "cxgb3i" },
>>>>     >             {"cxgb4", "cxgb4i" },
>>>>     >             {"bnx2", "bnx2i" },
>>>>     >             {"bnx2x", "bnx2i"},
>>>>     >             {NULL, NULL}
>>>>     >         };
>>>>     >
>>>>     >
>>>>     > to see if -N should skip this NIC.  I cannot determine the reason
>>>>     > for this check. Do iscsi offload NICs not need to be configured
>>>>     > for boot? The current code causes iscsi boots to fail. I removed the
>>>>     > check and booting works fine.
>>>>     >
>>>>
>>>>     If you use the ibft net info for the nic, what do you use for the iscsi
>>>>     offload engine? 
>>>>
>>>>
>>>> I am not configuring it at boot (at least not yet). I haven't tried
>>>> using the boot support in the NIC firmware yet, just the uEFI iSCSI 
>>>> firmware
>>>> which will work with any NIC.
>>>>
>>>>
>>>>  
>>>>
>>>>     Do they both have the same IP, and are you creating boot
>>>>     iscsi sessions through the offload engine?
>>>>
>>>>
>>>> I am not using offload yet. But I will probably need to get this working 
>>>> next.
>>>>
>>>>
>>>>
>>>>     cxgb*i is able to share the net info. The normal old nic engine and
>>>>     iscsi engine are able to use the same IP. That originally was not
>>>>     supposed to be allowed upstream, but it got in.
>>>>
>>>>     bnx2* is (or at least was when we wrote that code) not able to share 
>>>> the
>>>>     net info. The nic and iscsi engines need different IPs.
>>>>
>>>>
>>>> That makes some sense. The firmware has two different MAC addresses,
>>>> one for the NIC and one for iSCSI.
>>>>
>>>>
>>>>  
>>>>
>>>>
>>>>     So to cover both types we just use the ibft net info for the iscsi
>>>>     offload engines.
>>>>
>>>>     In the version of the code you are using is OFFLOAD_BOOT_SUPPORTED
>>>>     defined in open-iscsi/usr/iface.c or not?
>>>>
>>>>
>>>> Version 2.0.874. OFFLOAD_BOOT_SUPPORTED is in the code but not defined.
>>>>
>>>>
>>>>
>>>>     If it's not defined and you modified the code like you described, then 
>>>> I
>>>>     think you would use the ibft info to setup the normal old nic, and then
>>>>     you would end up creating a boot session using software iscsi. 
>>>>
>>>>
>>>> Yes, I believe that is the result I am getting.
>>>>
>>>>
>>>>  
>>>>
>>>>     I am not
>>>>     100% sure about this last statement. I cannot remember and just looked
>>>>     at the code for a couple minutes.
>>>>
>>>>
>>>> I will try defining OFFLOAD_BOOT_SUPPORTED to see if that brings up the 
>>>> NIC.
>>>>
>>>>  
>>>>
>>>
>>> I tried defining OFFLOAD_BOOT_SUPPORTED. The NIC is brought up but no
>>> IP is assigned. Is that expected? I have been using the uEFI iSCSI
>>
>> It is expected for what you are doing. I misunderstood what you were
>> trying to do.
>>
>>> driver which does not support hardware offload. I also have at least
>>> one bnx2x NIC that does not support iSCSI hardware offload:
>>>
>>>     02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719
>>>     Gigabit Ethernet PCIe (rev 01)
>>>     02:00.0 0200: 14e4:1657 (rev 01)
>>>
>>> Do we need some sort of whitelist or a command-line flag to support these 
>>> sort
>>> of configurations?
>>>
>>
>> I thought you wanted to use a iscsi offload engine in the broadcom card.
>> If you wanted to use a card that is in those offload lists for normal
>> old networking, have iscsistart bring it up and do iscsi root using
>> software iscsi, then yeah, I think we need some sort of flag.
>>
> 
> I want to do both. I haven't been able to get software iSCSI working
> because the cards/configurations I have been using are effectively
> blacklisted (unless I use some sort of hack). I am still working on
> finding a card/server I can use to try hardware offload to see if that
> is working on Debian.
> 
> 

I found a bnx2x card with iscsi hardware offload support. Running
iscsistart -f does bring the interace up and assign an IP to it as
long as OFFLOAD_BOOT_SUPPORTED is defined. However, iscsistart -b needs iscsiuio
running to log into a LUN, which the current debian scripts do not
start (or even add to the initramfs). I'll work on a patch that
hopefully will work with both software and hardware iSCSI.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to