Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For next #1

Merged
merged 36 commits into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7861728
target: Add target_alloc_session() helper function
Jan 9, 2016
8b00965
target: Convert demo-mode only drivers to target_alloc_session
Jan 9, 2016
1ccafc1
vhost/scsi: Convert to target_alloc_session usage
Jan 9, 2016
910e0c6
tcm_qla2xxx: Convert to target_alloc_session usage
Jan 9, 2016
869525a
tcm_fc: Convert to target_alloc_session usage
Jan 10, 2016
d74a601
ib_srpt: Convert to target_alloc_session usage
Jan 10, 2016
e7741b0
sbp-target: Conversion to percpu_ida tag pre-allocation
Jan 23, 2016
a778862
sbp-target: Convert to TARGET_SCF_ACK_KREF I/O krefs
Jan 25, 2016
1fdf5f7
usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation
Jan 23, 2016
c4468d4
usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs
Jan 25, 2016
194509e
xen-scsiback: Convert to percpu_ida tag allocation
Jan 25, 2016
130e8a2
xen-scsiback: Convert to TARGET_SCF_ACK_KREF I/O krefs
Jan 25, 2016
c8d336d
tcm_fc: Convert to TARGET_SCF_ACK_KREF I/O + TMR krefs
Jan 30, 2016
1335b45
ib_srpt: Convert to percpu_ida tag allocation
Jan 30, 2016
1d5c042
qla2xxx: Add DebugFS node for target sess list.
Feb 4, 2016
b609cc1
iser-target: Fix identification of login rx descriptor type
jennyj-mellanox Feb 24, 2016
eb2770e
iser-target: Add new state ISER_CONN_BOUND to isert_conn
jennyj-mellanox Feb 24, 2016
cd7f942
iser-target: Separate flows for np listeners and connections cma events
jennyj-mellanox Feb 24, 2016
ff93150
iser-target: Rework connection termination
jennyj-mellanox Feb 24, 2016
c3d141c
iser-target: Remove redundant wait in release_conn
jennyj-mellanox Feb 24, 2016
2e54a93
iser-target: Remove impossible condition from isert_wait_conn
jennyj-mellanox Feb 24, 2016
a6324f7
iser-target: Remove ISER_RECV_DATA_SEG_LEN
Feb 24, 2016
7e2f756
iser-target: Split and properly type the login buffer
Feb 24, 2016
c3ddb7f
iser-target: Convert to new CQ API
Feb 24, 2016
fd625eb
iser-target: Kill struct isert_rdma_wr
Feb 24, 2016
2866108
iser-target: Kill the ->isert_cmd back pointer in struct iser_tx_desc
Feb 24, 2016
cf12009
target/iblock: pass WRITE_SAME to device if possible
Feb 24, 2016
0a95b29
target: Remove enum transport_lunflags_table
Feb 25, 2016
ba6b96e
target/user: Use iovec[] to describe continuous area
yasker Feb 26, 2016
62e7b25
target/user: Free data ring in unified function
yasker Feb 26, 2016
a1171a3
target/user: Introduce data_bitmap, replace data_length/data_head/dat…
yasker Feb 26, 2016
dbfc15a
target/user: Don't free expired command when time out
yasker Feb 26, 2016
27d5306
target/user: Fix size_t format-spec build warning
Feb 28, 2016
01d6eea
target/user: Report capability of handling out-of-order completions t…
yasker Mar 1, 2016
2654cf3
target: Avoid DataIN transfers for non-GOOD SAM status
Mar 5, 2016
f630dbf
target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL
Feb 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Documentation/target/tcmu-design.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ userspace (respectively) to put commands on the ring, and indicate
when the commands are completed.

version - 1 (userspace should abort if otherwise)
flags - none yet defined.
flags:
- TCMU_MAILBOX_FLAG_CAP_OOOC: indicates out-of-order completion is
supported. See "The Command Ring" for details.
cmdr_off - The offset of the start of the command ring from the start
of the memory region, to account for the mailbox size.
cmdr_size - The size of the command ring. This does *not* need to be a
Expand Down Expand Up @@ -162,6 +164,13 @@ rsp.sense_buffer if necessary. Userspace then increments
mailbox.cmd_tail by entry.hdr.length (mod cmdr_size) and signals the
kernel via the UIO method, a 4-byte write to the file descriptor.

If TCMU_MAILBOX_FLAG_CAP_OOOC is set for mailbox->flags, kernel is
capable of handling out-of-order completions. In this case, userspace can
handle command in different order other than original. Since kernel would
still process the commands in the same order it appeared in the command
ring, userspace need to update the cmd->id when completing the
command(a.k.a steal the original command's entry).

When the opcode is PAD, userspace only updates cmd_tail as above --
it's a no-op. (The kernel inserts PAD entries to ensure each CMD entry
is contiguous within the command ring.)
Expand Down
Loading