Go to the documentation of this file.
19 #ifndef __BFA_MSGQ_H__
20 #define __BFA_MSGQ_H__
27 #define BFA_MSGQ_FREE_CNT(_q) \
28 (((_q)->consumer_index - (_q)->producer_index - 1) & ((_q)->depth - 1))
30 #define BFA_MSGQ_INDX_ADD(_q_indx, _qe_num, _q_depth) \
31 ((_q_indx) = (((_q_indx) + (_qe_num)) & ((_q_depth) - 1)))
33 #define BFA_MSGQ_CMDQ_NUM_ENTRY 128
34 #define BFA_MSGQ_CMDQ_SIZE \
35 (BFI_MSGQ_CMD_ENTRY_SIZE * BFA_MSGQ_CMDQ_NUM_ENTRY)
37 #define BFA_MSGQ_RSPQ_NUM_ENTRY 128
38 #define BFA_MSGQ_RSPQ_SIZE \
39 (BFI_MSGQ_RSP_ENTRY_SIZE * BFA_MSGQ_RSPQ_NUM_ENTRY)
41 #define bfa_msgq_cmd_set(_cmd, _cbfn, _cbarg, _msg_size, _msg_hdr) \
43 (_cmd)->cbfn = (_cbfn); \
44 (_cmd)->cbarg = (_cbarg); \
45 (_cmd)->msg_size = (_msg_size); \
46 (_cmd)->msg_hdr = (_msg_hdr); \