iscsi-target: Add iscsit_transport API template
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 7 Mar 2013 05:53:26 +0000 (21:53 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 25 Apr 2013 08:05:26 +0000 (01:05 -0700)
commit3f99306337ba1871afc8568e8b36004ce3cee039
tree897b8e70ebcd2b3973e1657feefd7ba42bab88b3
parent20361e69ba0b52880f9a692bb80aceb989bf0e77
iscsi-target: Add iscsit_transport API template

Add basic struct iscsit_transport API template to allow iscsi-target for
running with external transport modules using existing iscsi_target_core.h
code.

For all external modules, this calls try_module_get() and module_put()
to obtain + release an external iscsit_transport module reference count.

Also include the iscsi-target symbols necessary in iscsi_transport.h to
allow external transport modules to function.

v3 changes:
- Add iscsit_build_reject export for ISTATE_SEND_REJECT usage

v2 changes:

- Drop unnecessary export of iscsit_get_transport + iscsit_put_transport (roland)
- Add ->iscsit_queue_data_in() to remove extra context switch on RDMA_WRITE
- Add ->iscsit_queue_status() to remove extra context switch on IB_SEND status
- Add ->iscsit_get_dataout() to remove extra context switch on RDMA_READ
- Drop ->iscsit_free_cmd()
- Drop ->iscsit_unmap_cmd()
- Rename iscsit_create_transport() -> iscsit_register_transport() (andy)
- Rename iscsit_destroy_transport() -> iscsit_unregister_transport() (andy)

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/Makefile
drivers/target/iscsi/iscsi_target_transport.c [new file with mode: 0644]
include/target/iscsi/iscsi_transport.h [new file with mode: 0644]