Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_io.c File Reference
#include "ocs.h"

Go to the source code of this file.

Detailed Description

Provide IO object allocation

Definition in file ocs_io.c.

Data Structures

struct  ocs_io_slab_t
 
struct  ocs_io_pool_t
 IO pool. More...
 

Macros

#define OCS_IO_MAX_ALLOCATION   (64*1024)
 

Functions

void ocs_mgmt_io_list (ocs_textbuf_t *textbuf, void *io)
 
void ocs_mgmt_io_get_all (ocs_textbuf_t *textbuf, void *io)
 
int ocs_mgmt_io_get (ocs_textbuf_t *textbuf, char *parent, char *name, void *io)
 
ocs_io_pool_t * ocs_io_pool_create (ocs_t *ocs, uint32_t num_io, uint32_t num_sgl)
 Create a pool of IO objects. More...
 
int32_t ocs_io_pool_free (ocs_io_pool_t *io_pool)
 Free IO objects pool. More...
 
uint32_t ocs_io_pool_allocated (ocs_io_pool_t *io_pool)
 
ocs_io_t * ocs_io_pool_io_alloc (ocs_io_pool_t *io_pool)
 Allocate an object used to track an IO. More...
 
void ocs_io_pool_io_free (ocs_io_pool_t *io_pool, ocs_io_t *io)
 Free an object used to track an IO. More...
 
ocs_io_t * ocs_io_get_instance (ocs_t *ocs, uint32_t index)
 return pointer to IO object given instance index More...
 
void ocs_ddump_io (ocs_textbuf_t *textbuf, ocs_io_t *io)
 generate IO context ddump data More...
 

Variables

static ocs_mgmt_functions_t io_mgmt_functions
 

Macro Details

#define OCS_IO_MAX_ALLOCATION   (64*1024)

Definition at line 55 of file ocs_io.c.

Function Details

void ocs_ddump_io ( ocs_textbuf_t *  textbuf,
ocs_io_t *  io 
)

generate IO context ddump data

The ddump data for an IO context is generated

Parameters
textbufpointer to text buffer
iopointer to IO context
Returns
none

Definition at line 330 of file ocs_io.c.

uint32_t ocs_io_pool_allocated ( ocs_io_pool_t *  io_pool)

Definition at line 220 of file ocs_io.c.

ocs_io_pool_t* ocs_io_pool_create ( ocs_t *  ocs,
uint32_t  num_io,
uint32_t  num_sgl 
)

Create a pool of IO objects.

Parameters
ocsthe driver instance's software context
num_ionumber of IO context's to allocate
num_sglnumber of SGL entries to allocate for each IO
Returns
0 on success, non-zero otherwise

Definition at line 90 of file ocs_io.c.

int32_t ocs_io_pool_free ( ocs_io_pool_t *  io_pool)

Free IO objects pool.

The pool of IO objects are freed

Parameters
io_poolpointer to IO Pool object
Returns
returns 0 for success, a negative error code value for failure.

Definition at line 181 of file ocs_io.c.

int ocs_mgmt_io_get ( ocs_textbuf_t *  textbuf,
char *  parent,
char *  name,
void *  io 
)

Definition at line 372 of file ocs_io.c.

void ocs_mgmt_io_get_all ( ocs_textbuf_t *  textbuf,
void *  io 
)

Definition at line 406 of file ocs_io.c.

void ocs_mgmt_io_list ( ocs_textbuf_t *  textbuf,
void *  io 
)

Definition at line 355 of file ocs_io.c.

Variable Details

ocs_mgmt_functions_t io_mgmt_functions
static
Initial value:
= {
.get_list_handler = ocs_mgmt_io_list,
.get_handler = ocs_mgmt_io_get,
.get_all_handler = ocs_mgmt_io_get_all,
}
void ocs_mgmt_io_get_all(ocs_textbuf_t *textbuf, void *io)
Definition: ocs_io.c:406
void ocs_mgmt_io_list(ocs_textbuf_t *textbuf, void *io)
Definition: ocs_io.c:355
int ocs_mgmt_io_get(ocs_textbuf_t *textbuf, char *parent, char *name, void *io)
Definition: ocs_io.c:372

Definition at line 48 of file ocs_io.c.