summaryrefslogtreecommitdiffstats
path: root/src/server/iscsi.h
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] iscsi: Replace int8 with uint8, remove unused login flagsSimon Rettberg2025-12-091-54/+18Star
|
* [SERVER] iscsi: Fix handling of reason_code in logout requestSimon Rettberg2025-12-091-1/+3
| | | | Only the lower 7 bits carry the reason code, mask away highest bit.
* [SERVER] iscsi: Remove unused defines, move session into connectionSimon Rettberg2025-12-091-948/+11Star
|
* [SERVER] iscsi: Make iscsi_task stack-allocatedSimon Rettberg2025-12-091-2/+2
| | | | Saves another round of malloc/free calls on every request.
* [SERVER] iscsi: Overhaul sending of SCSI response, and DATA-In loopSimon Rettberg2025-12-091-3/+0Star
|
* [SERVER] iscsi: Reply OK to any task management functionSimon Rettberg2025-12-091-0/+199
| | | | | | | 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.
* [SERVER] iscsi: Remove unused functions & casts, turn [0] into []Simon Rettberg2025-12-091-170/+33Star
| | | | | | | 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.
* [SERVER] iscsi: Rename constant to reflect it means LOGICAL block sizeSimon Rettberg2025-12-091-1/+1
| | | | ... The other one is already named PHYSICAL
* [SERVER] iscsi: Unify usage of length and position variablesSimon Rettberg2025-12-091-221/+8Star
| | | | | | | | | | | | 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.
* [SERVER] iscsi: Refactor receive function and PDU handlingSimon Rettberg2025-12-091-83/+46Star
| | | | | | | | | | | | - 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.
* [SERVER] iscsi: Honor global _shutdownSimon Rettberg2025-12-091-3/+0Star
|
* [SERVER] iscsi: Fix crashesSimon Rettberg2025-12-091-7/+7
|
* [SERVER] iscsi: use sendfile()Simon Rettberg2025-12-091-2/+2
|
* [SERVER] iscsi refactor: First working versionSimon Rettberg2025-12-091-7451/+1852Star
| | | | | | | | | 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
* [SERVER] iscsi: Implement relaying requests to uplink serversSimon Rettberg2025-12-091-3/+9
|
* [SERVER] iscsi: Hook into net.c, text response handling, more features:Sebastian Vater2025-12-091-477/+5832
| | | | | | | | | | | | | | | - 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.
* [SERVER] iscsi: Finish login handling, add NOP-In/Out handlingSebastian Vater2025-12-091-36/+143
| | | | Also a couple bug fixes and other minor improvements
* [SERVER] iscsi: Implement receive loop, add a lot of new iSCSI structuresSebastian Vater2025-12-091-39/+807
| | | | | - globals, portal groups, portals, ports, etc. - Finally, fixed some bugs.
* [SERVER] iscsi: Add a lot of Doxygen comments, some general additionsSebastian Vater2025-12-091-2605/+5320
|
* doxygen: Add initial config and gitlab runner jobSimon Rettberg2025-12-091-0/+9
|
* [SERVER] iscsi: Initial commit, WIPSebastian Vater2025-12-091-0/+2956