Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
bfa_msgq.h File Reference
#include "bfa_defs.h"
#include "bfi.h"
#include "bfa_ioc.h"
#include "bfa_cs.h"

Go to the source code of this file.

Data Structures

struct  bfa_msgq_cmd_entry
 
struct  bfa_msgq_cmdq
 
struct  bfa_msgq_rspq
 
struct  bfa_msgq
 

Macros

#define BFA_MSGQ_FREE_CNT(_q)   (((_q)->consumer_index - (_q)->producer_index - 1) & ((_q)->depth - 1))
 
#define BFA_MSGQ_INDX_ADD(_q_indx, _qe_num, _q_depth)   ((_q_indx) = (((_q_indx) + (_qe_num)) & ((_q_depth) - 1)))
 
#define BFA_MSGQ_CMDQ_NUM_ENTRY   128
 
#define BFA_MSGQ_CMDQ_SIZE   (BFI_MSGQ_CMD_ENTRY_SIZE * BFA_MSGQ_CMDQ_NUM_ENTRY)
 
#define BFA_MSGQ_RSPQ_NUM_ENTRY   128
 
#define BFA_MSGQ_RSPQ_SIZE   (BFI_MSGQ_RSP_ENTRY_SIZE * BFA_MSGQ_RSPQ_NUM_ENTRY)
 
#define bfa_msgq_cmd_set(_cmd, _cbfn, _cbarg, _msg_size, _msg_hdr)
 

Typedefs

typedef void(* bfa_msgq_cmdcbfn_t )(void *cbarg, enum bfa_status status)
 
typedef void(* bfa_msgq_mcfunc_t )(void *cbarg, struct bfi_msgq_mhdr *mhdr)
 

Enumerations

enum  bfa_msgq_cmdq_flags { BFA_MSGQ_CMDQ_F_DB_UPDATE = 1 }
 
enum  bfa_msgq_rspq_flags { BFA_MSGQ_RSPQ_F_DB_UPDATE = 1 }
 

Functions

u32 bfa_msgq_meminfo (void)
 
void bfa_msgq_memclaim (struct bfa_msgq *msgq, u8 *kva, u64 pa)
 
void bfa_msgq_attach (struct bfa_msgq *msgq, struct bfa_ioc *ioc)
 
void bfa_msgq_regisr (struct bfa_msgq *msgq, enum bfi_mclass mc, bfa_msgq_mcfunc_t cbfn, void *cbarg)
 
void bfa_msgq_cmd_post (struct bfa_msgq *msgq, struct bfa_msgq_cmd_entry *cmd)
 
void bfa_msgq_rsp_copy (struct bfa_msgq *msgq, u8 *buf, size_t buf_len)
 

Macro Definition Documentation

#define bfa_msgq_cmd_set (   _cmd,
  _cbfn,
  _cbarg,
  _msg_size,
  _msg_hdr 
)
Value:
do { \
(_cmd)->cbfn = (_cbfn); \
(_cmd)->cbarg = (_cbarg); \
(_cmd)->msg_size = (_msg_size); \
(_cmd)->msg_hdr = (_msg_hdr); \
} while (0)

Definition at line 41 of file bfa_msgq.h.

#define BFA_MSGQ_CMDQ_NUM_ENTRY   128

Definition at line 33 of file bfa_msgq.h.

#define BFA_MSGQ_CMDQ_SIZE   (BFI_MSGQ_CMD_ENTRY_SIZE * BFA_MSGQ_CMDQ_NUM_ENTRY)

Definition at line 34 of file bfa_msgq.h.

#define BFA_MSGQ_FREE_CNT (   _q)    (((_q)->consumer_index - (_q)->producer_index - 1) & ((_q)->depth - 1))

Definition at line 27 of file bfa_msgq.h.

#define BFA_MSGQ_INDX_ADD (   _q_indx,
  _qe_num,
  _q_depth 
)    ((_q_indx) = (((_q_indx) + (_qe_num)) & ((_q_depth) - 1)))

Definition at line 30 of file bfa_msgq.h.

#define BFA_MSGQ_RSPQ_NUM_ENTRY   128

Definition at line 37 of file bfa_msgq.h.

#define BFA_MSGQ_RSPQ_SIZE   (BFI_MSGQ_RSP_ENTRY_SIZE * BFA_MSGQ_RSPQ_NUM_ENTRY)

Definition at line 38 of file bfa_msgq.h.

Typedef Documentation

typedef void(* bfa_msgq_cmdcbfn_t)(void *cbarg, enum bfa_status status)

Definition at line 51 of file bfa_msgq.h.

typedef void(* bfa_msgq_mcfunc_t)(void *cbarg, struct bfi_msgq_mhdr *mhdr)

Definition at line 89 of file bfa_msgq.h.

Enumeration Type Documentation

Enumerator:
BFA_MSGQ_CMDQ_F_DB_UPDATE 

Definition at line 61 of file bfa_msgq.h.

Enumerator:
BFA_MSGQ_RSPQ_F_DB_UPDATE 

Definition at line 85 of file bfa_msgq.h.

Function Documentation

void bfa_msgq_attach ( struct bfa_msgq msgq,
struct bfa_ioc ioc 
)

Definition at line 609 of file bfa_msgq.c.

void bfa_msgq_cmd_post ( struct bfa_msgq msgq,
struct bfa_msgq_cmd_entry cmd 
)

Definition at line 631 of file bfa_msgq.c.

void bfa_msgq_memclaim ( struct bfa_msgq msgq,
u8 kva,
u64  pa 
)

Definition at line 596 of file bfa_msgq.c.

u32 bfa_msgq_meminfo ( void  )

Definition at line 589 of file bfa_msgq.c.

void bfa_msgq_regisr ( struct bfa_msgq msgq,
enum bfi_mclass  mc,
bfa_msgq_mcfunc_t  cbfn,
void cbarg 
)

Definition at line 623 of file bfa_msgq.c.

void bfa_msgq_rsp_copy ( struct bfa_msgq msgq,
u8 buf,
size_t  buf_len 
)

Definition at line 644 of file bfa_msgq.c.