QLogic

The Linux SCSI Target Wiki

(Difference between revisions)
Jump to: navigation, search
Line 65: Line 65:
     make ; make modules ; make modules_install ; make install
     make ; make modules ; make modules_install ; make install
-
and then build the initrd or initramfs depending upon the distribution in question.
+
and then build the initrd or initramfs depending upon the distribution in question, and then reboot into the >= v2.6.37-rc3 kernel
 +
from lio-core-2.6.git/tcm_qla2xxx.
 +
Now, it's time to configure the configfs layout to enable TPG demo-mode access..  Here is a sample start script that uses a
 +
[[target]]//[[fileio]] LUN from /sys/kernel/config/target/core/fileio_0/sync_fileio as qla2xxx_port symlink for LUN=0.
 +
 +
  modprobe tcm_qla2xxx
 +
  mkdir -p /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/lun/lun_0/
 +
  ln -s /sys/kernel/config/target/core/fileio_0/sync_fileio/ /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/lun/lun_0/qla2xxx_port
 +
  echo 1 > /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/enable
 +
 +
Note the qla2xx FC world wide port name (WWPN) used above of 21:00:00:24:ff:31:4c:48 is coming from the hardware, and
 +
should be changed to reflect the physical FC world wide port name of the 2xxx series adapter running in target mode.
== TODO ==
== TODO ==
-
*) Add configfs attribute in /sys/kernel/config/target/core/qla2xxx/ to show available struct scsi_qla_host available for target mode registration using 'mkdir -p /sys/kernel/config/target/qla2xxx/$QLA_FC_WWNN'
+
*) Add configfs attribute in /sys/kernel/config/target/core/qla2xxx/ to show available struct scsi_qla_host available for target mode registration using 'mkdir -p /sys/kernel/config/target/qla2xxx/$QLA_FC_WWPN'
*) Debug heavy small block IOPs OOPs with RAMDISK_MCP.
*) Debug heavy small block IOPs OOPs with RAMDISK_MCP.

Revision as of 19:40, 15 December 2010

The tcm_qla2xxx.ko is a hardware Fibre Channel fabric module for qla2xxx series hardware from Qlogic ASICs using the target core infrastructure. Template:AdSense right

Contents

Overview

LIO Target
Logo
RisingTide Systems
tcm_qla2xxx Fibre Channel fabric module
Original author(s) Nicholas Bellinger
Developer(s) RisingTide Systems LLC
Development status Development
Written in C
Operating system Linux
Type Fabric module
License GNU General Public License
Website risingtidesystems.com
TCM_QLA2xxx running at line rate HW target mode from with PCIe device passthrough with MSI-X polled interrupts across Linux/SCSI qla2xxx LLD request and response rings
TCM v4.0 QLAXXX prototype using PCIe device passthrough for target mode MSI-X interrupts, and QEMU Megasas HBA emulation into Windows7 64-bit guest.

The QLA2XXX LLD target mode logic and accompanying tcm_qla2xxx fabric module are now up and running with v2.6.37-rc3 code in the lio-core-2.6.git/tcm_qla2xxx branch.

The QLA2XXX LLD target mode logic is based on qla2x00t from the SCST project, and contains a modern LLD port of qla2x00t-target logic in qla2x_target.c.

Status

At this point the LLD changes and tcm_qla2xxx should be considered ALPHA -> BETA status. Large block I/O is stable, and is able to run for sustained at line-rate. At this point the FC nexus handling in qla2x_target.c is stable and able to pass my initial testing (shutdown, cable pull, etc). This also includes being able to shutdown tcm_qla2xx and disable target mode on an individual struct qla_hw_data, and then reload tcm_qla2xxx and recreate the configfs groups, re-enable target mode on the same qla_hw_data and everything work as expected w/o shutting down qla2xxx LLD.

Howto

Follow the instructions in Resources#LIO_4.0_for_released_Linux_tip-of-tree_kernels to 'git clone' the upstream lio-core-2.6.git source tree from kernel.org

Then from within the freshly cloned lio-core-2.6.git, switch to the tcm_qla2xxx branch:

    git checkout --track -b tcm_qla2xxx

From here, run a:

    make menuconfig

and enable the following:

    Device Drivers  --->
           <M> Generic Target Core Mod (TCM) and ConfigFS Infrastructure  ---> 
                        <M>   TCM_QLA2XXX fabric module for Qlogic 2xxx series target mode HBAs

and compile and install the qla2xxx.ko and tcm_qla2xxx.ko (along with target_core_mod.ko and backend plugin) modules using:

    make ; make modules ; make modules_install ; make install

and then build the initrd or initramfs depending upon the distribution in question, and then reboot into the >= v2.6.37-rc3 kernel from lio-core-2.6.git/tcm_qla2xxx.

Now, it's time to configure the configfs layout to enable TPG demo-mode access.. Here is a sample start script that uses a target//fileio LUN from /sys/kernel/config/target/core/fileio_0/sync_fileio as qla2xxx_port symlink for LUN=0.

  modprobe tcm_qla2xxx
  mkdir -p /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/lun/lun_0/
  ln -s /sys/kernel/config/target/core/fileio_0/sync_fileio/ /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/lun/lun_0/qla2xxx_port
  echo 1 > /sys/kernel/config/target/qla2xxx/21:00:00:24:ff:31:4c:48/tpgt_1/enable

Note the qla2xx FC world wide port name (WWPN) used above of 21:00:00:24:ff:31:4c:48 is coming from the hardware, and should be changed to reflect the physical FC world wide port name of the 2xxx series adapter running in target mode.

TODO

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense