MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ff_txring_pop

Function ff_txring_pop

lib/ff_memory.c:192–206  ·  view source on GitHub ↗

pop out from head-1 .

Source from the content-addressed store, hash-verified

190
191// pop out from head-1 .
192static inline int ff_txring_pop(struct mbuf_txring* q, int num)
193{
194 int i = 0;
195
196 for (i=0; i<num; i++){
197 Head_DEC(q->head);
198 if ( (i==0 && q->m_table[q->head]==NULL) || (i>0 && q->m_table[q->head]!=NULL) ){
199 rte_panic("ff_txring_pop fatal error!");
200 }
201 if ( q->m_table[q->head] != NULL ){
202 ff_mbuf_free(q->m_table[q->head]);
203 q->m_table[q->head] = NULL;
204 }
205 }
206}
207
208static inline void ff_txring_init(struct mbuf_txring* q, uint32_t num)
209{

Callers

nothing calls this directly

Calls 1

ff_mbuf_freeFunction · 0.85

Tested by

no test coverage detected