X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fevent%2Fsw%2Fiq_chunk.h;h=31d013eab74da7b8b2cc4b5772642e814a2aad13;hb=3a22f3877c9d8b13d7d1cdbd4c130b38cdbc8bcb;hp=219bc0eb8445c85347d3cd81e193641b7765c4ad;hpb=dca926ca9faa61b0ec7bdc93c605558d37b08fb1;p=dpdk.git diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h index 219bc0eb84..31d013eab7 100644 --- a/drivers/event/sw/iq_chunk.h +++ b/drivers/event/sw/iq_chunk.h @@ -44,6 +44,17 @@ iq_free_chunk(struct sw_evdev *sw, struct sw_queue_chunk *chunk) sw->chunk_list_head = chunk; } +static __rte_always_inline void +iq_free_chunk_list(struct sw_evdev *sw, struct sw_queue_chunk *head) +{ + while (head) { + struct sw_queue_chunk *next; + next = head->next; + iq_free_chunk(sw, head); + head = next; + } +} + static __rte_always_inline void iq_init(struct sw_evdev *sw, struct sw_iq *iq) { @@ -51,6 +62,7 @@ iq_init(struct sw_evdev *sw, struct sw_iq *iq) iq->tail = iq->head; iq->head_idx = 0; iq->tail_idx = 0; + iq->count = 0; } static __rte_always_inline void @@ -126,7 +138,7 @@ iq_dequeue_burst(struct sw_evdev *sw, done: if (unlikely(index == SW_EVS_PER_Q_CHUNK)) { - struct sw_queue_chunk *next = iq->head->next; + struct sw_queue_chunk *next = current->next; iq_free_chunk(sw, current); iq->head = next; iq->head_idx = 0;