Lines Matching full:chain

22 	/* Chain is a single page (next ptr) is unrequired */
30 QED_CHAIN_USE_TO_PRODUCE, /* Chain starts empty */
31 QED_CHAIN_USE_TO_CONSUME, /* Chain starts full */
32 QED_CHAIN_USE_TO_CONSUME_PRODUCE, /* Chain starts empty */
36 /* The chain's size/prod/cons are kept in 16-bit variables */
39 /* The chain's size/prod/cons are kept in 32-bit variables */
76 /* Fastpath portion of the chain - required for commands such
88 * chain pages, respectively to the physical addresses
120 /* Slowpath of the chain - required for initialization and destruction,
133 /* Address of first page of the chain - the address is required
140 /* Total number of elements [for entire chain] */
186 static inline u16 qed_chain_get_prod_idx(const struct qed_chain *chain) in qed_chain_get_prod_idx() argument
188 return chain->u.chain16.prod_idx; in qed_chain_get_prod_idx()
191 static inline u16 qed_chain_get_cons_idx(const struct qed_chain *chain) in qed_chain_get_cons_idx() argument
193 return chain->u.chain16.cons_idx; in qed_chain_get_cons_idx()
196 static inline u32 qed_chain_get_prod_idx_u32(const struct qed_chain *chain) in qed_chain_get_prod_idx_u32() argument
198 return chain->u.chain32.prod_idx; in qed_chain_get_prod_idx_u32()
201 static inline u32 qed_chain_get_cons_idx_u32(const struct qed_chain *chain) in qed_chain_get_cons_idx_u32() argument
203 return chain->u.chain32.cons_idx; in qed_chain_get_cons_idx_u32()
206 static inline u16 qed_chain_get_elem_used(const struct qed_chain *chain) in qed_chain_get_elem_used() argument
208 u32 prod = qed_chain_get_prod_idx(chain); in qed_chain_get_elem_used()
209 u32 cons = qed_chain_get_cons_idx(chain); in qed_chain_get_elem_used()
210 u16 elem_per_page = chain->elem_per_page; in qed_chain_get_elem_used()
217 if (chain->mode == QED_CHAIN_MODE_NEXT_PTR) in qed_chain_get_elem_used()
223 static inline u16 qed_chain_get_elem_left(const struct qed_chain *chain) in qed_chain_get_elem_left() argument
225 return (u16)(chain->capacity - qed_chain_get_elem_used(chain)); in qed_chain_get_elem_left()
228 static inline u32 qed_chain_get_elem_used_u32(const struct qed_chain *chain) in qed_chain_get_elem_used_u32() argument
230 u64 prod = qed_chain_get_prod_idx_u32(chain); in qed_chain_get_elem_used_u32()
231 u64 cons = qed_chain_get_cons_idx_u32(chain); in qed_chain_get_elem_used_u32()
232 u16 elem_per_page = chain->elem_per_page; in qed_chain_get_elem_used_u32()
239 if (chain->mode == QED_CHAIN_MODE_NEXT_PTR) in qed_chain_get_elem_used_u32()
245 static inline u32 qed_chain_get_elem_left_u32(const struct qed_chain *chain) in qed_chain_get_elem_left_u32() argument
247 return chain->capacity - qed_chain_get_elem_used_u32(chain); in qed_chain_get_elem_left_u32()
250 static inline u16 qed_chain_get_usable_per_page(const struct qed_chain *chain) in qed_chain_get_usable_per_page() argument
252 return chain->usable_per_page; in qed_chain_get_usable_per_page()
255 static inline u8 qed_chain_get_unusable_per_page(const struct qed_chain *chain) in qed_chain_get_unusable_per_page() argument
257 return chain->elem_unusable; in qed_chain_get_unusable_per_page()
260 static inline u32 qed_chain_get_page_cnt(const struct qed_chain *chain) in qed_chain_get_page_cnt() argument
262 return chain->page_cnt; in qed_chain_get_page_cnt()
265 static inline dma_addr_t qed_chain_get_pbl_phys(const struct qed_chain *chain) in qed_chain_get_pbl_phys() argument
267 return chain->pbl_sp.table_phys; in qed_chain_get_pbl_phys()
273 * Advance the next element accros pages for a linked chain
341 * A chain in which the driver "Produces" elements should use this API
358 * A chain in which the driver "Produces" elements should use this to get
360 * responsibility to validate that the chain has room for new element.
400 * Get the maximum number of BDs in chain
432 * A Chain in which the driver utilizes data written by a different source
471 * @brief qed_chain_reset - Resets the chain to its start state
473 * @param p_chain pointer to a previously allocted chain
524 * Returns a pointer to the last element of the chain
558 /* p_virt_addr points at this stage to the last page of the chain */ in qed_chain_get_last_elem()
588 * positive and lower than the chain's capacity. in qed_chain_set_prod()
613 * @brief qed_chain_pbl_zero_mem - set chain memory to 0