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

Function enqueue_timeout

dpdk/drivers/event/dlb2/dlb2_selftest.c:152–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150};
151
152static inline int
153enqueue_timeout(uint8_t port_id, struct rte_event *ev, uint64_t tmo_us)
154{
155 const uint64_t start = rte_get_timer_cycles();
156 const uint64_t ticks = (tmo_us * rte_get_timer_hz()) / 1E6;
157
158 while ((rte_get_timer_cycles() - start) < ticks) {
159 if (rte_event_enqueue_burst(evdev, port_id, ev, 1) == 1)
160 return 0;
161
162 if (rte_errno != -ENOSPC) {
163 printf("enqueue_burst returned rte_errno %d\n",
164 rte_errno);
165 return -1;
166 }
167 }
168 printf("%s time out\n", __func__);
169 return -1;
170}
171
172static void
173flush(uint8_t id __rte_unused, struct rte_event event, void *arg __rte_unused)

Callers 1

test_stop_flushFunction · 0.85

Calls 2

rte_event_enqueue_burstFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected