#include "ocs.h"
#include "ocs_ddump.h"
#include "ocs_session.h"
Go to the source code of this file.
Generate iSCSI diagnostics dump.
Definition in file ocs_ddump.c.
|
| static void | ocs_ddump_sli4_queue (ocs_textbuf_t *textbuf, ocs_hal_t *hal, const char *name, sli4_queue_t *q, uint32_t q_count, uint32_t qentries) |
| | Generate sli4 queue ddump. More...
|
| |
| static void | ocs_ddump_wq (ocs_textbuf_t *textbuf, ocs_hal_t *hal, uint32_t qentries) |
| | Dump iSCSI WQs. More...
|
| |
| static void | ocs_ddump_cq (ocs_textbuf_t *textbuf, ocs_hal_t *hal, uint32_t qentries) |
| | Dump iSCSI CQs. More...
|
| |
| static void | ocs_ddump_sli_q_fields (ocs_textbuf_t *textbuf, sli4_t *sli4, sli4_qtype_e qtype) |
| | Generate SLI4 ddump. More...
|
| |
| static void | ocs_ddump_sli (ocs_textbuf_t *textbuf, sli4_t *sli4) |
| | Generate SLI4 ddump. More...
|
| |
| static void | ocs_ddump_hal (ocs_textbuf_t *textbuf, ocs_hal_t *hal, uint32_t ddump_flags, uint32_t qentries) |
| | Generate HAL ddump. More...
|
| |
| static void | ocs_ddump_cxn (ocs_textbuf_t *textbuf, ocs_cxn_t *cxn) |
| | Generate node ddump data. More...
|
| |
| static void | ocs_ddump_cxns (ocs_textbuf_t *textbuf, ocs_iscsi_t *iscsi) |
| | Generate node ddump data. More...
|
| |
| int | ocs_ddump (ocs_t *ocs, ocs_textbuf_t *textbuf, uint32_t flags, uint32_t qentries) |
| | Initiate ddump. More...
|
| |
| int32_t | ocs_save_ddump (ocs_t *ocs, uint32_t flags, uint32_t qentries) |
| | Capture and save ddump. More...
|
| |
| int32_t | ocs_save_ddump_all (uint32_t flags, uint32_t qentries, uint32_t alloc_flag) |
| | Capture and save ddump for all OCS instances. More...
|
| |
| int32_t | ocs_get_saved_ddump (ocs_t *ocs, ocs_textbuf_t *textbuf) |
| | Get saved ddump. More...
|
| |
| int32_t | ocs_clear_saved_ddump (ocs_t *ocs) |
| | Clear saved ddump. More...
|
| |
| | OCS_EXPORT (ocs_save_ddump_all) |
| |
| #define DEFAULT_SAVED_DUMP_SIZE (4*1024*1024) |
| #define OCS_EXPORT |
( |
|
... | ) |
|
| int32_t ocs_clear_saved_ddump |
( |
ocs_t * |
ocs | ) |
|
Clear saved ddump.
- Description
- Clears saved ddump to make room for next one.
- Parameters
-
| ocs | Pointer to device context. |
- Returns
- Returns 0 if ddump was cleared; > 0 if no saved ddump found.
Definition at line 827 of file ocs_ddump.c.
| int ocs_ddump |
( |
ocs_t * |
ocs, |
|
|
ocs_textbuf_t * |
textbuf, |
|
|
uint32_t |
flags, |
|
|
uint32_t |
qentries |
|
) |
| |
Initiate ddump.
- Description
- Traverses the ocs/domain/port/node/io data structures to generate a driver dump.
- Parameters
-
| ocs | Pointer to device context |
| textbuf | Pointer to text buffer |
| flags | The ddump flags. |
| qentries | Number of queue entries to dump. |
- Returns
- Returns 0 on success, or a negative value on failure.
Definition at line 628 of file ocs_ddump.c.
Dump iSCSI CQs.
- Description
- Dumps iSCSI completion queues. Only dumps queues that have been used.
- Parameters
-
| textbuf | Pointer to text buffer. |
| hal | Pointer to HAL context. |
| qentries | Number of queue entries to dump. |
- Returns
- None.
Definition at line 168 of file ocs_ddump.c.
| static void ocs_ddump_cxn |
( |
ocs_textbuf_t * |
textbuf, |
|
|
ocs_cxn_t * |
cxn |
|
) |
| |
|
static |
Generate node ddump data.
- Description
- Generates the node ddump data.
- Parameters
-
| textbuf | Pointer to text buffer. |
| cxn | Pointer to connection object. |
- Returns
- None.
Definition at line 532 of file ocs_ddump.c.
Generate node ddump data.
- Description
- Generates the node ddump data.
- Parameters
-
| textbuf | Pointer to text buffer. |
| iscsi | Pointer to the iSCSI structure that represents this device. |
- Returns
- None.
Definition at line 584 of file ocs_ddump.c.
| static void ocs_ddump_hal |
( |
ocs_textbuf_t * |
textbuf, |
|
|
ocs_hal_t * |
hal, |
|
|
uint32_t |
ddump_flags, |
|
|
uint32_t |
qentries |
|
) |
| |
|
static |
Generate HAL ddump.
- Description
- Generates HAL ddump.
- Parameters
-
| textbuf | Pointer to text buffer. |
| hal | Pointer to HAL context. |
| ddump_flags | The ddump flags. |
| qentries | Number of queue entries to dump. |
- Returns
- None.
Definition at line 422 of file ocs_ddump.c.
Generate SLI4 ddump.
- Description
- Generates SLI4 ddump.
- Parameters
-
| textbuf | Pointer to text buffer. |
| sli4 | Pointer to SLI context. |
- Returns
- None.
Definition at line 232 of file ocs_ddump.c.
Generate sli4 queue ddump.
- Description
- Generates sli4 queue ddump data.
- Parameters
-
| textbuf | Pointer to text buffer. |
| hal | Pointer to HAL context. |
| name | Name of SLI4 queue. |
| q | Pointer to SLI4 queues array. |
| q_count | Count of SLI4 queues. |
| qentries | Count of SLI4 queue entries. |
- Returns
- None.
Definition at line 62 of file ocs_ddump.c.
Generate SLI4 ddump.
- Description
- Generates SLI4 ddump.
- Parameters
-
| textbuf | Pointer to text buffer. |
| sli4 | Pointer to SLI context. |
| qtype | Type of queue. |
- Returns
- None.
Definition at line 198 of file ocs_ddump.c.
Dump iSCSI WQs.
- Description
- Dumps iSCSI work queues. Only dumps queues that have been used.
- Parameters
-
| textbuf | Pointer to text buffer. |
| hal | Pointer to HAL context. |
| qentries | Number of queue entries to dump. |
- Returns
- None.
Definition at line 138 of file ocs_ddump.c.
| int32_t ocs_get_saved_ddump |
( |
ocs_t * |
ocs, |
|
|
ocs_textbuf_t * |
textbuf |
|
) |
| |
Get saved ddump.
- Description
- Copies saved ddump to given textbuf.
- Parameters
-
| ocs | Pointer to device context. |
| textbuf | The textbuf to write the saved ddump to. |
- Returns
- Returns 0 if ddump was saved; > 0 if no saved ddump found.
Definition at line 800 of file ocs_ddump.c.
| int32_t ocs_save_ddump |
( |
ocs_t * |
ocs, |
|
|
uint32_t |
flags, |
|
|
uint32_t |
qentries |
|
) |
| |
Capture and save ddump.
- Description
- Captures and saves a ddump to the ocs_t structure to save the current state. The goal of this function is to save a ddump as soon as an issue is encountered. The saved ddump will be kept until the user reads it.
- Parameters
-
| ocs | Pointer to device context. |
| flags | The ddump flags. |
| qentries | Number of queue entries to dump. |
- Returns
- Returns 0 if ddump was saved; > 0 if one already exists; < 0 on error.
Definition at line 733 of file ocs_ddump.c.
| int32_t ocs_save_ddump_all |
( |
uint32_t |
flags, |
|
|
uint32_t |
qentries, |
|
|
uint32_t |
alloc_flag |
|
) |
| |
Capture and save ddump for all OCS instances.
- Description
- Calls ocs_save_ddump() for each OCS instance.
- Parameters
-
| flags | The ddump flags. |
| qentries | Number of queue entries to dump. |
| alloc_flag | Allocate dump buffer if not already allocated. |
- Returns
- Returns 0 if ddump was saved; > 0 if one already exists; < 0 on error.
Definition at line 765 of file ocs_ddump.c.