git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
raw/octeontx2_ep: add dequeue operation
[dpdk.git]
/
drivers
/
event
/
sw
/
iq_chunk.h
diff --git
a/drivers/event/sw/iq_chunk.h
b/drivers/event/sw/iq_chunk.h
index
219bc0e
..
31d013e
100644
(file)
--- 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;
}
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)
{
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->tail = iq->head;
iq->head_idx = 0;
iq->tail_idx = 0;
+ iq->count = 0;
}
static __rte_always_inline void
}
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)) {
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;
iq_free_chunk(sw, current);
iq->head = next;
iq->head_idx = 0;