Functions | |
| int32_t | ocs_session_initialize (ocs_iscsi_t *iscsi) |
| Initialize the session management by allocating objects for sessions. More... | |
| void | ocs_session_teardown (ocs_iscsi_t *iscsi) |
| Releases the session objects used within the login module. More... | |
| int32_t | ocs_session_cxn_new (ocs_cxn_t *cxn, char *tgt_name, char *ini_name, uint64_t isid, uint16_t tsih, uint16_t cid, uint32_t cmd_sn) |
| Find an existing session or create a new one based on the login parameters. More... | |
| int32_t | ocs_session_cxn_del (ocs_cxn_t *cxn) |
| Removes a connection from its session. More... | |
| ocs_cxn_t * | ocs_session_cxn_find (ocs_session_t *session, uint16_t cid) |
| Locate a connection within a session based on the cid. More... | |
| void | ocs_session_close (ocs_session_t *session, uint8_t reset) |
| Closes all connections on a session. More... | |
| void | ocs_session_max_cmd_sn_upd (ocs_session_t *session) |
| Updates the max_cmd_sn based on the number IOs available. More... | |
| static void | ocs_session_check_queued_commands (ocs_session_t *session) |
| Checks the queued command to see if any can start. More... | |
| static int32_t | ocs_session_queue_command (ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len, uint8_t code, uint32_t cmd_sn) |
| Adds a command to the command queue. More... | |
| int32_t | ocs_session_tgt_unsol_pdu_recv (ocs_cxn_t *cxn, ocs_hal_rq_buffer_t *hdr, uint32_t hdr_len, ocs_hal_rq_buffer_t *data, uint32_t data_len, uint8_t code) |
| Function to handle unsolicited PDUs on a target. More... | |
|
static |
Checks the queued command to see if any can start.
| session | Pointer to the session object. |
Definition at line 501 of file ocs_session.c.
| void ocs_session_close | ( | ocs_session_t * | session, |
| uint8_t | reset | ||
| ) |
Closes all connections on a session.
| session | Pointer to the session object. |
| reset | A non-zero value causes a connection reset to be issued. |
Definition at line 405 of file ocs_session.c.
| int32_t ocs_session_cxn_del | ( | ocs_cxn_t * | cxn | ) |
Removes a connection from its session.
| cxn | Pointer to the connection object. |
Definition at line 343 of file ocs_session.c.
| ocs_cxn_t* ocs_session_cxn_find | ( | ocs_session_t * | session, |
| uint16_t | cid | ||
| ) |
Locate a connection within a session based on the cid.
| session | Pointer to the session object. |
| cid | The iSCSI connection ID to find. |
Definition at line 379 of file ocs_session.c.
| int32_t ocs_session_cxn_new | ( | ocs_cxn_t * | cxn, |
| char * | tgt_name, | ||
| char * | ini_name, | ||
| uint64_t | isid, | ||
| uint16_t | tsih, | ||
| uint16_t | cid, | ||
| uint32_t | cmd_sn | ||
| ) |
Find an existing session or create a new one based on the login parameters.
| cxn | Pointer to the connection object. |
| tgt_name | Pointer to the target name. |
| ini_name | Pointer to the initiator name. |
| isid | The iSCSI initiator session ID from the login PDU. |
| tsih | The iSCSI target session handle from the login PDU. |
| cid | The iSCSI connection ID from the login PDU. |
| cmd_sn | The iSCSI command SN from the login PDU. |
Definition at line 187 of file ocs_session.c.
| int32_t ocs_session_initialize | ( | ocs_iscsi_t * | iscsi | ) |
Initialize the session management by allocating objects for sessions.
| iscsi | Pointer to the iSCSI structure that represents this device. |
Definition at line 67 of file ocs_session.c.
| void ocs_session_max_cmd_sn_upd | ( | ocs_session_t * | session | ) |
Updates the max_cmd_sn based on the number IOs available.
| session | Pointer to the session object. |
Definition at line 449 of file ocs_session.c.
|
static |
Adds a command to the command queue.
| cxn | Pointer to the connection object. |
| hdr | DMA memory information for the header. |
| hdr_len | Length of the header received. |
| data | DMA memory information for the data. |
| data_len | Length of the data received. |
| code | Type of callback received from the chip (i.e. SLI_STATUS_UNSOL_DATA_DIGEST_ERROR). |
| cmd_sn | The iSCSI command sequence number. |
Definition at line 643 of file ocs_session.c.
| void ocs_session_teardown | ( | ocs_iscsi_t * | iscsi | ) |
Releases the session objects used within the login module.
| iscsi | Pointer to the iSCSI object. |
Definition at line 123 of file ocs_session.c.
| int32_t ocs_session_tgt_unsol_pdu_recv | ( | ocs_cxn_t * | cxn, |
| ocs_hal_rq_buffer_t * | hdr, | ||
| uint32_t | hdr_len, | ||
| ocs_hal_rq_buffer_t * | data, | ||
| uint32_t | data_len, | ||
| uint8_t | code | ||
| ) |
Function to handle unsolicited PDUs on a target.
| cxn | Pointer to the connection object. |
| hdr | DMA memory information for the header. |
| hdr_len | Length of the header received. |
| data | DMA memory information for the data. |
| data_len | Length of the data received. |
| code | Type of callback received from the chip (i.e. SLI_STATUS_UNSOL_DATA_DIGEST_ERROR) |
Definition at line 699 of file ocs_session.c.