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

Function iq_dequeue_burst

dpdk/drivers/event/sw/iq_chunk.h:105–151  ·  view source on GitHub ↗

Note: the caller must ensure that count <= iq_count() */

Source from the content-addressed store, hash-verified

103
104/* Note: the caller must ensure that count <= iq_count() */
105static __rte_always_inline uint16_t
106iq_dequeue_burst(struct sw_evdev *sw,
107 struct sw_iq *iq,
108 struct rte_event *ev,
109 uint16_t count)
110{
111 struct sw_queue_chunk *current;
112 uint16_t total, index;
113
114 count = RTE_MIN(count, iq_count(iq));
115
116 current = iq->head;
117 index = iq->head_idx;
118 total = 0;
119
120 /* Loop over the chunks */
121 while (1) {
122 struct sw_queue_chunk *next;
123 for (; index < SW_EVS_PER_Q_CHUNK;) {
124 ev[total++] = current->events[index++];
125
126 if (unlikely(total == count))
127 goto done;
128 }
129
130 /* Move to the next chunk */
131 next = current->next;
132 iq_free_chunk(sw, current);
133 current = next;
134 index = 0;
135 }
136
137done:
138 if (unlikely(index == SW_EVS_PER_Q_CHUNK)) {
139 struct sw_queue_chunk *next = current->next;
140 iq_free_chunk(sw, current);
141 iq->head = next;
142 iq->head_idx = 0;
143 } else {
144 iq->head = current;
145 iq->head_idx = index;
146 }
147
148 iq->count -= total;
149
150 return total;
151}
152
153static __rte_always_inline void
154iq_put_back(struct sw_evdev *sw,

Callers 3

sw_drain_queueFunction · 0.85
sw_schedule_atomic_to_cqFunction · 0.85
sw_schedule_dir_to_cqFunction · 0.85

Calls 2

iq_countFunction · 0.85
iq_free_chunkFunction · 0.85

Tested by

no test coverage detected