tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support
Subsystems (2)
RFC PATCH 1/1 tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support
From: Kiran Patil <[email protected]>
This is a comprehensive patch for FC-FC4 provider. tcm_fc is a FC-FC4 provider which glues target core (TCM) with Fiber channel library (libfc). tcm_fc uses existing FC4 provider hooks from Fiber channel library. This Fiber channel library is used by FCoE (transport - FC over Ethernet) protocol driver as well.
Combination of modules such as Fiber channel library, tcm_fc, TCM target core, and FCoE protocol driver enables functional FCoE target.
This patch includes initial commit for tcm_fc plus additional enhancement, bug fixes.
This tcm_fc module essentially contains 3 entry points such as "prli", "prlo", "recv". When process login request (ELS_PRLI) request is received, Fiber channel library (libfc) module calls passive providers (FC-FC4, tcm_fc) (if any registered) "prli" function. Likewise when LOGO request is received, "prlo" function of passive provider is invoked by libfc. For all other request (e.g. any read/write, task management, LUN inquiry commands), "recv" function of passiver provider is invoked by libfc. Those passive providers "prli, prlo, recv" functions interact with TCM target core for requested operation.
This module was primarily developed by "Joe Eykholt" and there were significant contributions from the people listed under signed-off.
This patch was validated for functionality and applicability against latest scsi-misc, "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git"
---
drivers/target/Kconfig | 1 drivers/target/Makefile | 2 drivers/target/tcm_fc/Kconfig | 5 drivers/target/tcm_fc/Makefile | 15 + drivers/target/tcm_fc/tcm_fc.h | 215 ++++++++++++ drivers/target/tcm_fc/tfc_cmd.c | 696 ++++++++++++++++++++++++++++++++++++++ drivers/target/tcm_fc/tfc_conf.c | 677 +++++++++++++++++++++++++++++++++++++ drivers/target/tcm_fc/tfc_io.c | 374 ++++++++++++++++++++ drivers/target/tcm_fc/tfc_sess.c | 541 ++++++++++++++++++++++++++++++ 9 files changed, 2526 insertions(+), 0 deletions(-) create mode 100644 drivers/target/tcm_fc/Kconfig create mode 100644 drivers/target/tcm_fc/Makefile create mode 100644 drivers/target/tcm_fc/tcm_fc.h create mode 100644 drivers/target/tcm_fc/tfc_cmd.c create mode 100644 drivers/target/tcm_fc/tfc_conf.c create mode 100644 drivers/target/tcm_fc/tfc_io.c create mode 100644 drivers/target/tcm_fc/tfc_sess.c
drivers/target/Kconfig +1 -0
@@ -30,5 +30,6 @@ config TCM_PSCSI passthrough access to Linux/SCSI device source "drivers/target/loopback/Kconfig" +source "drivers/target/tcm_fc/Kconfig" endif
drivers/target/Makefile +2 -0
@@ -24,3 +24,5 @@ obj-$(CONFIG_TCM_PSCSI) += target_core_pscsi.o # Fabric modules obj-$(CONFIG_LOOPBACK_TARGET) += loopback/ + +obj-$(CONFIG_TCM_FC) += tcm_fc/
drivers/target/tcm_fc/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config TCM_FC + tristate "TCM_FC fabric Plugin" + depends on LIBFC + help + Say Y here to enable the TCM FC plugin for accessing FC fabrics in TCM
drivers/target/tcm_fc/Makefile new file +15 -0
@@ -0,0 +1,15 @@ +EXTRA_CFLAGS += -I$(srctree)/drivers/target/ \ + -I$(srctree)/drivers/scsi/ \ + -I$(srctree)/include/scsi/ \ + -I$(srctree)/drivers/target/tcm_fc/ + +tcm_fc-y += tfc_cmd.o \ + tfc_conf.o \ + tfc_io.o \ + tfc_sess.o + +obj-$(CONFIG_TCM_FC) += tcm_fc.o + +ifdef CONFIGFS_TCM_FC_DEBUG +EXTRA_CFLAGS += -DTCM_FC_DEBUG +endif
drivers/target/tcm_fc/tcm_fc.h new file +215 -0
215 lines not on this page · raw message
drivers/target/tcm_fc/tfc_cmd.c new file +696 -0
696 lines not on this page · raw message
drivers/target/tcm_fc/tfc_conf.c new file +677 -0
677 lines not on this page · raw message
drivers/target/tcm_fc/tfc_io.c new file +374 -0
374 lines not on this page · raw message
drivers/target/tcm_fc/tfc_sess.c new file +541 -0
541 lines not on this page · raw message