1 #ifndef _LM_SP_REQ_MGR_H 2 #define _LM_SP_REQ_MGR_H 3 4 #include "listq.h" 5 6 /******************************************************************************* 7 * slow path request manager data structures 8 ******************************************************************************/ 9 10 /* Frward declaration */ 11 struct _lm_device_t; 12 13 typedef struct _lm_sp_req_common_t 14 { 15 s_list_entry_t link; 16 void *req_post_func; 17 void *req_post_ctx; 18 u32_t req_seq_number; 19 } lm_sp_req_common_t; 20 21 typedef lm_status_t (*req_post_function)( 22 struct _lm_device_t *pdev, 23 void *state_ctx, /* tcp_state / iscsi_state */ 24 lm_sp_req_common_t *sp_req); 25 26 typedef struct _lm_sp_req_manager_t 27 { 28 s_list_t pending_reqs; 29 u32_t req_seq_number; 30 u8_t blocked; 31 /* ToDo: use instaed of tcpstate.sp_request */ 32 lm_sp_req_common_t * posted_req; 33 void * sp_data_virt_addr; 34 lm_address_t sp_data_phys_addr; 35 } lm_sp_req_manager_t; 36 37 38 39 /******************************************************************************* 40 * slow path request manager prototypes 41 ******************************************************************************/ 42 lm_status_t 43 lm_sp_req_manager_set_sp_data( 44 IN struct _lm_device_t *pdev, 45 IN u32_t cid, 46 IN void *virt_addr, 47 IN lm_address_t phys_addr 48 ); 49 50 lm_status_t 51 lm_sp_req_manager_init( 52 IN struct _lm_device_t *pdev, 53 IN u32_t cid 54 ); 55 56 lm_status_t 57 lm_sp_req_manager_shutdown( 58 IN struct _lm_device_t *pdev, 59 IN u32_t cid 60 ); 61 62 lm_status_t 63 lm_sp_req_manager_post( 64 IN struct _lm_device_t *pdev, 65 IN u32_t cid, 66 IN struct _lm_sp_req_common_t *sp_req 67 ); 68 69 lm_status_t 70 lm_sp_req_manager_complete( 71 IN struct _lm_device_t *pdev, 72 IN u32_t cid, 73 IN u32_t seq_num, 74 OUT lm_sp_req_common_t **sp_req 75 ); 76 77 lm_status_t 78 lm_sp_req_manager_block( 79 IN struct _lm_device_t *pdev, 80 IN u32_t cid 81 ); 82 83 lm_status_t 84 lm_sp_req_manager_unblock( 85 IN struct _lm_device_t *pdev, 86 IN u32_t cid, 87 OUT lm_sp_req_common_t **sp_req 88 ); 89 90 91 #endif /* _LM_SP_REQ_MGR_H */ 92