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

Function dpaa_event_dequeue_wait

dpdk/drivers/event/dpaa/dpaa_eventdev.c:132–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static inline int
133dpaa_event_dequeue_wait(uint64_t timeout_ticks)
134{
135 int fd_qman, nfds;
136 int ret;
137 fd_set readset;
138
139 /* Go into (and back out of) IRQ mode for each select,
140 * it simplifies exit-path considerations and other
141 * potential nastiness.
142 */
143 struct timeval tv = {
144 .tv_sec = timeout_ticks / 1000000,
145 .tv_usec = timeout_ticks % 1000000
146 };
147
148 fd_qman = qman_thread_fd();
149 nfds = fd_qman + 1;
150 FD_ZERO(&readset);
151 FD_SET(fd_qman, &readset);
152
153 qman_irqsource_add(QM_PIRQ_DQRI);
154
155 ret = select(nfds, &readset, NULL, NULL, &tv);
156 if (ret < 0)
157 return ret;
158 /* Calling irqsource_remove() prior to thread_irq()
159 * means thread_irq() will not process whatever caused
160 * the interrupts, however it does ensure that, once
161 * thread_irq() re-enables interrupts, they won't fire
162 * again immediately.
163 */
164 qman_irqsource_remove(~0);
165 drain_4_bytes(fd_qman, &readset);
166 qman_thread_irq();
167
168 return ret;
169}
170
171static uint16_t
172dpaa_event_dequeue_burst(void *port, struct rte_event ev[],

Callers 1

Calls 6

qman_thread_fdFunction · 0.85
qman_irqsource_addFunction · 0.85
selectFunction · 0.85
qman_irqsource_removeFunction · 0.85
drain_4_bytesFunction · 0.85
qman_thread_irqFunction · 0.85

Tested by

no test coverage detected