Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cxio_resource.c File Reference
#include <linux/kernel.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/kfifo.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include "cxio_resource.h"
#include "cxio_hal.h"

Go to the source code of this file.

Macros

#define RANDOM_SIZE   16
 
#define MIN_PBL_SHIFT   8 /* 256B == min PBL size (32 entries) */
 
#define MIN_RQT_SHIFT   10 /* 1KB == mini RQT size (16 entries) */
 
#define RQT_CHUNK   2*1024*1024
 

Functions

int cxio_hal_init_rhdl_resource (u32 nr_rhdl)
 
void cxio_hal_destroy_rhdl_resource (void)
 
int cxio_hal_init_resource (struct cxio_rdev *rdev_p, u32 nr_tpt, u32 nr_pbl, u32 nr_rqt, u32 nr_qpid, u32 nr_cqid, u32 nr_pdid)
 
u32 cxio_hal_get_stag (struct cxio_hal_resource *rscp)
 
void cxio_hal_put_stag (struct cxio_hal_resource *rscp, u32 stag)
 
u32 cxio_hal_get_qpid (struct cxio_hal_resource *rscp)
 
void cxio_hal_put_qpid (struct cxio_hal_resource *rscp, u32 qpid)
 
u32 cxio_hal_get_cqid (struct cxio_hal_resource *rscp)
 
void cxio_hal_put_cqid (struct cxio_hal_resource *rscp, u32 cqid)
 
u32 cxio_hal_get_pdid (struct cxio_hal_resource *rscp)
 
void cxio_hal_put_pdid (struct cxio_hal_resource *rscp, u32 pdid)
 
void cxio_hal_destroy_resource (struct cxio_hal_resource *rscp)
 
u32 cxio_hal_pblpool_alloc (struct cxio_rdev *rdev_p, int size)
 
void cxio_hal_pblpool_free (struct cxio_rdev *rdev_p, u32 addr, int size)
 
int cxio_hal_pblpool_create (struct cxio_rdev *rdev_p)
 
void cxio_hal_pblpool_destroy (struct cxio_rdev *rdev_p)
 
u32 cxio_hal_rqtpool_alloc (struct cxio_rdev *rdev_p, int size)
 
void cxio_hal_rqtpool_free (struct cxio_rdev *rdev_p, u32 addr, int size)
 
int cxio_hal_rqtpool_create (struct cxio_rdev *rdev_p)
 
void cxio_hal_rqtpool_destroy (struct cxio_rdev *rdev_p)
 

Macro Definition Documentation

#define MIN_PBL_SHIFT   8 /* 256B == min PBL size (32 entries) */

Definition at line 255 of file cxio_resource.c.

#define MIN_RQT_SHIFT   10 /* 1KB == mini RQT size (16 entries) */

Definition at line 312 of file cxio_resource.c.

#define RANDOM_SIZE   16

Definition at line 45 of file cxio_resource.c.

#define RQT_CHUNK   2*1024*1024

Definition at line 313 of file cxio_resource.c.

Function Documentation

void cxio_hal_destroy_resource ( struct cxio_hal_resource rscp)

Definition at line 242 of file cxio_resource.c.

void cxio_hal_destroy_rhdl_resource ( void  )

Definition at line 134 of file cxio_resource.c.

u32 cxio_hal_get_cqid ( struct cxio_hal_resource rscp)

Definition at line 222 of file cxio_resource.c.

u32 cxio_hal_get_pdid ( struct cxio_hal_resource rscp)

Definition at line 232 of file cxio_resource.c.

u32 cxio_hal_get_qpid ( struct cxio_hal_resource rscp)

Definition at line 208 of file cxio_resource.c.

u32 cxio_hal_get_stag ( struct cxio_hal_resource rscp)

Definition at line 198 of file cxio_resource.c.

int cxio_hal_init_resource ( struct cxio_rdev rdev_p,
u32  nr_tpt,
u32  nr_pbl,
u32  nr_rqt,
u32  nr_qpid,
u32  nr_cqid,
u32  nr_pdid 
)

Definition at line 140 of file cxio_resource.c.

int cxio_hal_init_rhdl_resource ( u32  nr_rhdl)

Definition at line 128 of file cxio_resource.c.

u32 cxio_hal_pblpool_alloc ( struct cxio_rdev rdev_p,
int  size 
)

Definition at line 257 of file cxio_resource.c.

int cxio_hal_pblpool_create ( struct cxio_rdev rdev_p)

Definition at line 270 of file cxio_resource.c.

void cxio_hal_pblpool_destroy ( struct cxio_rdev rdev_p)

Definition at line 303 of file cxio_resource.c.

void cxio_hal_pblpool_free ( struct cxio_rdev rdev_p,
u32  addr,
int  size 
)

Definition at line 264 of file cxio_resource.c.

void cxio_hal_put_cqid ( struct cxio_hal_resource rscp,
u32  cqid 
)

Definition at line 227 of file cxio_resource.c.

void cxio_hal_put_pdid ( struct cxio_hal_resource rscp,
u32  pdid 
)

Definition at line 237 of file cxio_resource.c.

void cxio_hal_put_qpid ( struct cxio_hal_resource rscp,
u32  qpid 
)

Definition at line 216 of file cxio_resource.c.

void cxio_hal_put_stag ( struct cxio_hal_resource rscp,
u32  stag 
)

Definition at line 203 of file cxio_resource.c.

u32 cxio_hal_rqtpool_alloc ( struct cxio_rdev rdev_p,
int  size 
)

Definition at line 315 of file cxio_resource.c.

int cxio_hal_rqtpool_create ( struct cxio_rdev rdev_p)

Definition at line 328 of file cxio_resource.c.

void cxio_hal_rqtpool_destroy ( struct cxio_rdev rdev_p)

Definition at line 340 of file cxio_resource.c.

void cxio_hal_rqtpool_free ( struct cxio_rdev rdev_p,
u32  addr,
int  size 
)

Definition at line 322 of file cxio_resource.c.