| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
If the socket timeout triggers while we wait for the next iSCSI PDU,
send a NOP-In with the transfer tag set, so that the initiator is
required to send a NOP-Out in response. If the following reveive times
out once again, tear down the connection.
|
| |
|
|
| |
Only the lower 7 bits carry the reason code, mask away highest bit.
|
| | |
|
| | |
|
| |
|
|
|
| |
ctld is also reporting maximum prefetch values, so let's just do the
same.
|
| | |
|
| | |
|
| |
|
|
| |
Saves another round of malloc/free calls on every request.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
- Remove redundant case block
- Remove redundant const/struct prefix
- Fix a couple missing params in Doxygen blocks
|
| |
|
|
|
|
|
| |
Since we process everything sequentially, by the time we receive any
task management function, the task referenced in the request has already
been rejected (or processed), so we just reply OK for now, so the SNs
don't get messed up.
|
| |
|
|
|
|
|
| |
In functions that can handle multiple different structs, instead of
picking an arbitrary one as the pointer type in the function signature,
pass an uint8_t and cast to the according struct in the sub-cases in the
method body.
|
| |
|
|
| |
... The other one is already named PHYSICAL
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There were a lot of similarly named and redundant variables in various
structs named pos, len, xfer_len, des_xfer_pos, etc. It could be very
challenging to keep track of what information is stored where when
working with the code.
Attempt to minimize this by relying only on a single "len" variable in
the scsi_task struct.
This refactoring uncovered a few inconsistencies in how allocation
length limitations were handled, which were addressed here too.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Fold header/data handling into one function
This uncovered a few redundant checks
and makes it easier to reason about control flow
- Make all iscsi_pdu stack-allocated
This greatly reduces the number of malloc and free calls
during normal operation, lowers the risk of memory management
bugs, and potentially increases performance in high concurrency
scenarios.
|
| | |
|
| |
|
|
|
|
|
|
| |
This broke when sending ds payload was refactored to avoid copying the
buffer into the PDU's buffer before sending. iscsi_connection_pdu_create
took care of this before, but now that we send the source buffer
directly, pad the packet manually after sending the buffer contents if
required.
|
| | |
|
| |
|
|
| |
Makes using the kernel's iscsi module simpler
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Work towards simplifying the iscsi implementation has begun. Goals are:
- Simpler and easier to understand resource/lifecycle management of
allocations
- Single-threaded architecture, making locking unnecessary
- Moving as many allocations as possible to the stack
- Making the call-stack more shallow for easier tracking of code flow
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- R2T handling
- Portal groups
- Fixes to login phase handling
- Code refactoring
- Remove obsolete PDU fields
- SCSI INQUIRY handler
- Persistent Reservation support
- Implement SCSI block based operations
- Implement other needed SCSI ops
- Disks are now reported as read-only
- Doxygen tags
- Bugfixes for crashes, memleaks, etc.
|
| |
|
|
| |
Also a couple bug fixes and other minor improvements
|
| |
|
|
|
| |
- globals, portal groups, portals, ports, etc.
- Finally, fixed some bugs.
|
| | |
|
| | |
|
| |
|