[openib-general] [PATCH 0/8] [RFC] iSER initiator
Or Gerlitz
ogerlitz at voltaire.com
Thu Apr 6 05:15:25 PDT 2006
The patch series that follows is the second RFC sent to the openib
community asking for comments on the iSER (iSCSI Extensions for RDMA) code.
We target going upstream to 2.6.18, so again any feedback is wellcome.
Following the first RFC, the code has gone through two sets of changes,
first the RFC comments, and second integrate with two big changes at
the kernel part of open iscsi.
The RFC comments that were applied are:
+1 change iser_adaptor to iser_device or any better name
+2 session->state is not be volatile (does not exist anymore as it was)
+3 killed ISER_HDR_LEN ISER_PDU_BHS_LENGTH
+4 killed USE_OFFSET USE_NO_OFFSET USE_SIZE USE_ENTIRE_SIZE
+5 killed _p suffix for pointers all over the code
+6 use goto-unwinding, that is each failure jumps to different error
label such that there is not one label with many if()s under it
eg see send_data_out_error
+7 remove usage of GFP_NOFAIL as does not work with kmalloc/kmem_cache_alloc,
+8 SG-ify a SCSI command which is "single" (ie sc->use_sg is 0), we also
have a patch ready that would BUG when it gets from the SCSI ML such command.
+9 a LLD can not assume it is fine to call page_address(sg->page) as the page
might be unmapped to the kernel virtual address space. so kmap_atomic is used.
The changes in iscsi are:
+1 introduce libiscsi - iscsi kernel library (module) at include/scsi/libiscsi.h
and drivers/scsi/libiscsi.c. It is common code to be used by kernel iscsi
transports. The two current transports, TCP and iSER were ported to it.
- with this changes > 1.3K LOC were moved from drivers/scsi/iscsi_tcp.[ch]
and drivers/infiniband/ulp/iscsi_iser.[ch] into libiscsi.[ch]
+2 allow for the iscsi connection establishment/teardown to be done from the
kernel.
- this changed removed the need to expose a pseudo AF_ISER socket by
iser to be used by open iscsi user space code. Now the oiscsi user code
is doing the connection est. for TCP from user space (socket) and for
iSER (struct iser_conn) from the kernel.
- with this change, iser_socket.[ch] are removed.
Both iscsi changes are to be sent in the coming days to review and
upstream push for 2.6.18 to the linux-scsi maintainers. They are also
present as the last two patches in this RFC
The iser changes related to the two iscsi changes are not commited yet,
so this code is different then the one present at the openib svn head.
The code has been tested with 2.6.16, openib r5919 and the user
part of the open-iscsi svn head (r529), where both the kernel part
of open iscsi was replaced by oiscsi svn patched with the library and
the ep_callbacks patches.
Or.
More information about the general
mailing list