On 11/9/10 10:05 AM, Dugger, Donald D wrote:
> I am trying to get the SW FCOE target working on Linux and am running into 
> problems, a Kernel BUG to be precise.
> 
> What I've done is followed the instructions in the QUICKSTART guide that is 
> part of the current `open-fcoe-target-user' sources.
> 
> On the target side I'm using a Fedora 8 distribution with a vanilla 2.6.23 
> kernel (with all of the fcoe patches applied).  I'm using version 1.0.1 of 
> the `scst' package as that seems to be the one that is compatible with the 
> 2.6.23 kernel.  Everything compiles with no warnings and the modules load 
> with no errors.
> 
> On the initiator side I'm using a Debian Etch distribution with a vanilla 
> 2.6.32 kernel, with the specified kernel options set.
> 
> I'm careful to start the target side first and every thing comes up with no 
> appearant problems.  The specific commands I use to start the target are:
> 
>   # modprobe scsi_transport_fc
>   # modprobe scst
>   # modprobe scst_disk
>   # modprobe scst_vdisk
>   # modprobe scst_cdrom
>   # modprobe openfctgt
>   # modprobe fcoe
> 
>   # echo "assign 0:0:0:0 dev_disk" >/proc/scsi_tgt/scsi_tgt
>   # echo "add 0:0:0:0 0" >/proc/scsi_tgt/groups/Default/devices
> 
>   # fcconf eth0 enable
> 
> It appears that I've successfully exposed one of my disks as `lsscsi' reports:
> 
>   # lsscsi
>   [0:0:0:0]    disk    ATA      ST3500320AS      SD1A  /dev/sda 
>   [1:0:0:0]    cd/dvd  ATAPI    iHAS120   6      7L0F  /dev/sr0 
>   [2:0:0:0]    disk    ATA      MAXTOR STM316081 3.AA  /dev/sdb
> 
> And the fcoe target code thinks that `/dev/sda' is available:
> 
>   # cat /proc/scsi_tgt/groups/Default/devices
>   Device (host:ch:id:lun or name)                             LUN             
>     Options
>   0:0:0:0                                                     0
> 
> Thsn I start the initiator with the commands:
> 
>   # modprobe fcoe
>   # echo eth2 >/sys/module/fcoe/parameters/create
> 
> and the target immediately fails with a kernel bug:
> 
>   fc_local_port_flogi_resp: bad FLOGI response
>   fc_local_port_flogi_resp fffffe -> 000000 xids 0006 0005 ELS rep ELS LS_ACC
>   ------------[ cut here ]------------
>   Kernel BUG at f8bca68b [verbose debug info unavailable]
>   invalid opcode: 0000 [#1]
>   SMP 
>   Modules linked in: fcoe openfctgt scst_cdrom scst_vdisk scst_disk scst 
> scsi_transport_fc autofs4 rfcomm l2cap bluetooth sunrpc nf_conntrack_ipv4 
> ipt_REJECT iptable_filter ip_tables nf_conntrack_ipv6 xt_state nf_conntrack 
> nfnetlink xt_tcpudp ip6t_ipv6header ip6t_REJECT ip6table_filter ip6_tables 
> x_tables ipv6 cpufreq_ondemand acpi_cpufreq dm_mirror dm_multipath dm_mod 
> ixgbe video firewire_ohci output e1000e firewire_core joydev button crc_itu_t 
> sg sr_mod cdrom ata_generic ahci libata sd_mod scsi_mod ext3 jbd mbcache 
> uhci_hcd ohci_hcd ehci_hcd
>   CPU:    1
>   EIP:    0060:[<f8bca68b>]    Not tainted VLI
>   EFLAGS: 00010246   (2.6.23-fcoe #2)
>   EIP is at openfct_session_create+0x18/0xce [openfctgt]
> 
> 
> 
> Anybody have any ideas what I'm doing wrong?

I wonder if it hit a BUG_ON() statement there, but I don't see one ... maybe
its in an inline.  Not sure what would cause this.

It appears that the initiator replied correctly to the FLOGI, but the FCoE
code never expects to see a 0 DID in the FLOGI response.  That's due to the
incorrect implementation of the point-to-point protocol, but it does 
interoperate
with itself normally.  That wouldn't cause the crash, though, and without a
stack trace we don't know if the crash came immediately after the LS_ACC
message or not.

Some of the issues you may be running into are the point-to-point mode bugs
that were fixed after 2.6.32.  You can see some of the patches required in
the SCST source under fcst/linux-patches.  These can be applied to newer
kernels on both the target and initiator side and may help, but your older
kernel on the target side is too old for those patches and may not need them.

If you're not tied to the older kernel and SCST for the target mode, I'd
strongly suggest going to the newer one with the FCST module.  Instructions
for using it start at
http://www.open-fc.org/openfc/wiki/index.php/FCoE_SW_Target_Quickstart

Again, you should also apply the patches there to your initiator kernel if you
want to use point-to-point mode.

There's another issue for point-to-point, though.  If you go too new
(past 2.6.36) on the initiator side, it won't "just work" with this old
point-to-point mode.  If you roughly match the initiator and target versions,
you should be OK.

> --
> Don Dugger
> "Censeo Toto nos in Kansa esse decisse." - D. Gale

Funny.  That must be from the Latin version ... that would be an interesting 
film.

        Cheers,
        Joe

> Ph: 303/443-3786
> _______________________________________________
> devel mailing list
> [email protected]
> http://www.open-fcoe.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to