#include "ocs.h"#include "ocs_els.h"#include "ocs_fabric.h"#include "ocs_device.h"#include "scsi_cmds.h"Go to the source code of this file.
Code to handle unsolicited received FC frames.
Definition in file ocs_unsol.c.
Macros | |
| #define | frame_printf(ocs, hdr, fmt,...) |
| #define | OCS_MAX_FRAMES_BEFORE_YEILDING 10000 |
Functions | |
| static int32_t | ocs_unsol_process (ocs_t *ocs, ocs_hal_sequence_t *seq) |
| Handle unsolicited FC frames. More... | |
| static int32_t | ocs_dispatch_fcp_cmd (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch unsolicited FCP_CMND frame. More... | |
| static int32_t | ocs_dispatch_tow_fcp_cmd (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch unsolicited FCP_CMND frame. More... | |
| static int32_t | ocs_dispatch_fcp_data (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch FCP data frames for TOW. More... | |
| static uint32_t | ocs_fc_decode_lun (uint8_t *lu) |
| Decode a LU Number according to SAM. More... | |
| static int32_t | ocs_domain_dispatch_frame (void *arg, ocs_hal_sequence_t *seq) |
| Dispatch unsolicited FC frame. More... | |
| static int32_t | ocs_node_dispatch_frame (void *arg, ocs_hal_sequence_t *seq) |
| Dispatch a frame. More... | |
| static int32_t | ocs_fc_tmf_rejected_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| Handle the callback for the TMF FUNCTION_REJECTED response. More... | |
| static uint8_t | ocs_node_frames_held (void *arg) |
| Check if node's pending frames are held. More... | |
| static uint8_t | ocs_domain_frames_held (void *arg) |
| Check if domain's pending frames are held. More... | |
| static int32_t | ocs_purge_pending (ocs_t *ocs, ocs_list_t *pend_list, ocs_lock_t *list_lock) |
| Purge given pending list. More... | |
| static int32_t | ocs_sframe_send_task_set_full_or_busy (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Send task set full response. More... | |
| ocs_hal_sequence_t * | ocs_frame_next (ocs_list_t *pend_list, ocs_lock_t *list_lock) |
| Return next FC frame on node->pend_frames list. More... | |
| int32_t | ocs_unsol_rq_thread (ocs_thread_t *mythread) |
| Process the RQ circular buffer and process the incoming frames. More... | |
| static int32_t | ocs_unsol_abort_cb (ocs_hal_io_t *hio, ocs_remote_node_t *rnode, uint32_t len, int32_t status, uint32_t ext, void *arg) |
| Callback function when aborting a port owned XRI exchanges. More... | |
| static void | ocs_port_owned_abort (ocs_t *ocs, ocs_hal_io_t *hio) |
| Abort either a RQ Pair auto XFER RDY XRI. More... | |
| int32_t | ocs_unsolicited_cb (void *arg, ocs_hal_sequence_t *seq) |
| Handle unsolicited FC frames. More... | |
| int32_t | ocs_process_node_pending (ocs_node_t *node) |
| Process pending frames queued to the given node. More... | |
| int32_t | ocs_domain_process_pending (ocs_domain_t *domain) |
| Process pending frames queued to the given domain. More... | |
| int32_t | ocs_node_purge_pending (ocs_node_t *node) |
| Purge node's pending (queued) frames. More... | |
| int32_t | ocs_domain_purge_pending (ocs_domain_t *domain) |
| Purge xport's pending (queued) frames. More... | |
| void | ocs_domain_hold_frames (ocs_domain_t *domain) |
| Globally (at xport level) hold unsolicited frames. More... | |
| void | ocs_domain_accept_frames (ocs_domain_t *domain) |
| Clear hold on unsolicited frames. More... | |
| static void | ocs_dispatch_unsolicited_tmf (ocs_io_t *io, uint8_t task_management_flags, ocs_node_t *node, uint32_t lun) |
| Dispatch unsolicited FCP frames (RQ Pair). More... | |
| static int32_t | ocs_validate_fcp_cmd (ocs_t *ocs, ocs_hal_sequence_t *seq) |
| static void | ocs_populate_io_fcp_cmd (ocs_io_t *io, fcp_cmnd_iu_t *cmnd, fc_header_t *fchdr, uint8_t sit) |
| static uint32_t | ocs_get_flags_fcp_cmd (fcp_cmnd_iu_t *cmnd) |
| static void | ocs_sframe_common_send_cb (void *arg, uint8_t *cqe, int32_t status) |
| Process send fcp response frame callback. More... | |
| static int32_t | ocs_sframe_common_send (ocs_node_t *node, ocs_hal_sequence_t *seq, uint8_t r_ctl, uint8_t info, uint32_t f_ctl, uint8_t type, void *payload, uint32_t payload_len) |
| Send a frame, common code. More... | |
| static int32_t | ocs_sframe_send_fcp_rsp (ocs_node_t *node, ocs_hal_sequence_t *seq, void *rsp, uint32_t rsp_len) |
| Send FCP response using SEND_FRAME. More... | |
| int32_t | ocs_sframe_send_bls_acc (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Send BA_ACC using sent frame. More... | |
| #define frame_printf | ( | ocs, | |
| hdr, | |||
| fmt, | |||
| ... | |||
| ) |
Definition at line 49 of file ocs_unsol.c.
| #define OCS_MAX_FRAMES_BEFORE_YEILDING 10000 |
Definition at line 71 of file ocs_unsol.c.
| ocs_hal_sequence_t * ocs_frame_next | ( | ocs_list_t * | pend_list, |
| ocs_lock_t * | list_lock | ||
| ) |
Return next FC frame on node->pend_frames list.
The next FC frame on the node->pend_frames list is returned, or NULL if the list is empty.
| pend_list | Pending list to be purged. |
| list_lock | Lock that protects pending list. |
Definition at line 1248 of file ocs_unsol.c.
|
static |
Definition at line 850 of file ocs_unsol.c.
|
static |
Definition at line 826 of file ocs_unsol.c.
|
static |
Send a frame, common code.
A frame is sent using SEND_FRAME, the R_CTL/F_CTL/TYPE may be specified, the payload is sent as a single frame.
Memory resources are allocated from RQ buffers contained in the passed in sequence data.
| node | Pointer to node object. |
| seq | Pointer to sequence object. |
| r_ctl | R_CTL value to place in FC header. |
| info | INFO value to place in FC header. |
| f_ctl | F_CTL value to place in FC header. |
| type | TYPE value to place in FC header. |
| payload | Pointer to payload data |
| payload_len | Length of payload in bytes. |
Definition at line 1303 of file ocs_unsol.c.
|
static |
Process send fcp response frame callback.
The function is called when the send FCP response posting has completed. Regardless of the outcome, the sequence is freed.
| arg | Pointer to originator frame sequence. |
| cqe | Pointer to completion queue entry. |
| status | Status of operation. |
Definition at line 1271 of file ocs_unsol.c.
| int32_t ocs_sframe_send_bls_acc | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Send BA_ACC using sent frame.
A BA_ACC is sent using SEND_FRAME
| node | Pointer to node object. |
| seq | Pointer to originator frame sequence. |
Definition at line 1450 of file ocs_unsol.c.
|
static |
Send FCP response using SEND_FRAME.
The FCP response is send using the SEND_FRAME function.
| node | Pointer to node object. |
| seq | Pointer to inbound sequence. |
| rsp | Pointer to response data. |
| rsp_len | Length of response data, in bytes. |
Definition at line 1387 of file ocs_unsol.c.
|
static |
Send task set full response.
Return a task set full or busy response using send frame.
| node | Pointer to node object. |
| seq | Pointer to originator frame sequence. |
Definition at line 1411 of file ocs_unsol.c.
| int32_t ocs_unsol_rq_thread | ( | ocs_thread_t * | mythread | ) |
Process the RQ circular buffer and process the incoming frames.
| mythread | Pointer to thread object. |
Definition at line 81 of file ocs_unsol.c.
|
static |
Definition at line 803 of file ocs_unsol.c.