EM-ODP  3.7.0
Event Machine on ODP
event_machine_odp_ext.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2023, Nokia Solutions and Networks
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * * Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived
16  * from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31  /**
32  * @file
33  * Event Machine ODP API extensions
34  *
35  */
36 
37 #include <em_include.h>
39 
40 odp_queue_t em_odp_queue_odp(em_queue_t queue)
41 {
42  const queue_elem_t *queue_elem = queue_elem_get(queue);
43 
44  if (EM_CHECK_LEVEL > 0 && unlikely(queue_elem == NULL)) {
46  "queue_elem ptr NULL!");
47  return ODP_QUEUE_INVALID;
48  }
49 
50  return queue_elem->odp_queue;
51 }
52 
53 em_queue_t em_odp_queue_em(odp_queue_t queue)
54 {
55  const queue_elem_t *queue_elem = odp_queue_context(queue);
56 
57  /* verify that the odp context is an EM queue elem */
58  if (EM_CHECK_LEVEL > 0 &&
59  unlikely(!queue_elem || queue_elem->valid_check != QUEUE_ELEM_VALID))
60  return EM_QUEUE_UNDEF;
61 
62  return (em_queue_t)(uintptr_t)queue_elem->queue;
63 }
64 
65 /**
66  * @brief Helper to em_odp_pktin_event_queues2em()
67  *
68  * @param odp_queue ODP pktin-queue to convert to an EM-queue.
69  * The given ODP queue handle must have been returned by
70  * odp_pktin_event_queue().
71  * @return em_queue_t: New EM queue mapped to use the ODP pktin event queue
72  */
73 static em_queue_t pktin_event_queue2em(odp_queue_t odp_queue)
74 {
75  em_queue_t queue = EM_QUEUE_UNDEF; /* return value */
76  const char *err_str = "";
77  odp_queue_info_t odp_qinfo;
78  int ret = 0;
79 
80  if (unlikely(odp_queue == ODP_QUEUE_INVALID)) {
82  "Bad arg: ODP queue invalid!");
83  return EM_QUEUE_UNDEF;
84  }
85 
86  queue = em_odp_queue_em(odp_queue);
87  if (unlikely(queue != EM_QUEUE_UNDEF)) {
88  /* The given ODP queue is already associated with an EM queue */
89  return queue;
90  }
91 
92  ret = odp_queue_info(odp_queue, &odp_qinfo);
93  if (unlikely(ret || odp_qinfo.param.type != ODP_QUEUE_TYPE_SCHED)) {
94  err_str = "odp_queue_info(): unsuitable odp queue";
95  goto err_return;
96  }
97 
98  /*
99  * Determine EM queue priority:
100  */
101  odp_schedule_prio_t odp_prio = odp_schedule_default_prio();
103  int num_prio = em_queue_get_num_prio(NULL);
104 
105  for (int i = 0; i < num_prio; i++) {
106  prio_em2odp(i, &odp_prio/*out*/);
107  if (odp_prio == odp_qinfo.param.sched.prio) {
108  prio = i;
109  break;
110  }
111  }
112  if (unlikely(prio == EM_QUEUE_PRIO_UNDEF)) {
113  err_str = "Can't convert ODP qprio to EM qprio";
114  goto err_return;
115  }
116 
117  /*
118  * Determine scheduled EM queue type
119  */
121 
122  ret = scheduled_queue_type_odp2em(odp_qinfo.param.sched.sync,
123  &queue_type /*out*/);
124  if (unlikely(ret)) {
125  err_str = "Can't convert ODP qtype to EM qtype";
126  goto err_return;
127  }
128 
129  /*
130  * Determine EM queue group
131  */
132  em_queue_group_t queue_group;
133  const queue_group_elem_t *qgrp_elem;
134 
135  queue_group = em_queue_group_get_first(NULL);
136  while (queue_group != EM_QUEUE_GROUP_UNDEF) {
137  qgrp_elem = queue_group_elem_get(queue_group);
138  if (qgrp_elem &&
139  qgrp_elem->odp_sched_group == odp_qinfo.param.sched.group)
140  break; /* found match! */
141  queue_group = em_queue_group_get_next();
142  }
143  if (unlikely(queue_group == EM_QUEUE_GROUP_UNDEF)) {
144  err_str = "No matching EM Queue Group found";
145  goto err_return;
146  }
147 
148  /*
149  * Set EM queue name based on the ODP queue name
150  */
151  char q_name[ODP_QUEUE_NAME_LEN];
152 
153  snprintf(q_name, sizeof(q_name), "EM:%s", odp_qinfo.name);
154  q_name[ODP_QUEUE_NAME_LEN - 1] = '\0';
155 
156  /*
157  * Set up the EM queue based on gathered info
158  */
159  queue_setup_t setup = {.name = q_name,
160  .type = queue_type,
161  .prio = prio,
162  .atomic_group = EM_ATOMIC_GROUP_UNDEF,
163  .queue_group = queue_group,
164  .conf = NULL};
165 
166  queue = queue_alloc(EM_QUEUE_UNDEF, &err_str);
167  if (unlikely(queue == EM_QUEUE_UNDEF))
168  goto err_return; /* err_str set by queue_alloc() */
169 
170  queue_elem_t *q_elem = queue_elem_get(queue);
171 
172  if (unlikely(!q_elem)) {
173  err_str = "Queue elem NULL!";
174  goto err_return;
175  }
176 
177  /* Set common queue-elem fields based on 'setup' */
178  queue_setup_common(q_elem, &setup);
179  /* Set queue-elem fields for a pktin event queue */
180  q_elem->odp_queue = odp_queue;
181  q_elem->flags.is_pktin = true;
182  q_elem->flags.scheduled = true;
183  q_elem->state = EM_QUEUE_STATE_INIT;
184 
185  /*
186  * Note: The ODP queue context points to the EM queue elem.
187  * The EM queue context set by the user using the API function
188  * em_queue_set_context() is accessed through the queue_elem_t::context
189  * and retrieved with em_queue_get_context() or passed by EM to the
190  * EO-receive function for scheduled queues.
191  *
192  * Set the odp context data length (in bytes) for potential prefetching.
193  * The ODP implementation may use this value as a hint for the number
194  * of context data bytes to prefetch.
195  */
196  ret = odp_queue_context_set(odp_queue, q_elem, sizeof(*q_elem));
197  if (unlikely(ret)) {
198  err_str = "odp_queue_context_set() failed";
199  goto err_return;
200  }
201 
202  return queue; /* success */
203 
204 err_return:
206  "%s (ret=%d)", err_str, ret);
207  if (EM_DEBUG_PRINT && odp_queue != ODP_QUEUE_INVALID)
208  odp_queue_print(odp_queue);
209  if (queue != EM_QUEUE_UNDEF)
210  queue_free(queue);
211  return EM_QUEUE_UNDEF;
212 }
213 
214 int em_odp_pktin_event_queues2em(const odp_queue_t odp_pktin_event_queues[/*num*/],
215  em_queue_t queues[/*out:num*/], int num)
216 {
217  int i;
218 
219  for (i = 0; i < num; i++) {
220  queues[i] = pktin_event_queue2em(odp_pktin_event_queues[i]);
221  if (unlikely(queues[i] == EM_QUEUE_UNDEF)) {
223  "Cannot create EM-Q using pktin-queue:%d (hdl:%" PRIu64 ")",
224  i, odp_queue_to_u64(odp_pktin_event_queues[i]));
225  break;
226  }
227  }
228 
229  return i;
230 }
231 
232 uint32_t em_odp_event_hdr_size(void)
233 {
234  return sizeof(event_hdr_t);
235 }
236 
237 odp_event_t em_odp_event2odp(em_event_t event)
238 {
239  return event_em2odp(event);
240 }
241 
242 void em_odp_events2odp(const em_event_t events[/*num*/],
243  odp_event_t odp_events[/*out:num*/], int num)
244 {
245  if (unlikely(num <= 0))
246  return;
247 
248  events_em2odp(events, odp_events/*out*/, num);
249 }
250 
251 em_event_t em_odp_event2em(odp_event_t odp_event)
252 {
253  em_event_t event = event_init_odp(odp_event, false/*!is_extev*/, NULL);
254 
255  return event;
256 }
257 
258 void em_odp_events2em(const odp_event_t odp_events[/*num*/],
259  em_event_t events[/*out:num*/], int num)
260 {
261  if (unlikely(num <= 0))
262  return;
263 
264  event_hdr_t *ev_hdrs[num];
265 
266  event_init_odp_multi(odp_events, events/*out*/, ev_hdrs/*out*/, num,
267  false/*!is_extev*/);
268 }
269 
270 int em_odp_pool2odp(em_pool_t pool, odp_pool_t odp_pools[/*out*/], int num)
271 {
272  const mpool_elem_t *pool_elem = pool_elem_get(pool);
273 
274  if (EM_CHECK_LEVEL > 0 &&
275  unlikely(!pool_elem || !odp_pools || num <= 0)) {
277  "Inv.args: pool:%" PRI_POOL " odp_pools:%p num:%d",
278  pool, odp_pools, num);
279  return 0;
280  }
281  if (EM_CHECK_LEVEL >= 2 && unlikely(!pool_allocated(pool_elem)))
283  "Pool:%" PRI_POOL " not created", pool);
284 
285  int num_subpools = MIN(num, pool_elem->num_subpools);
286 
287  for (int i = 0; i < num_subpools; i++)
288  odp_pools[i] = pool_elem->odp_pool[i];
289 
290  /* return the number of odp-pools filled into 'odp_pools[]' */
291  return num_subpools;
292 }
293 
294 em_pool_t em_odp_pool2em(odp_pool_t odp_pool)
295 {
296  if (EM_CHECK_LEVEL > 0 && unlikely(odp_pool == ODP_POOL_INVALID)) {
298  "Inv.arg: odp_pool invalid");
299  return EM_POOL_UNDEF;
300  }
301 
302  return pool_odp2em(odp_pool);
303 }
304 
305 static inline int
306 pkt_enqueue_scheduled(const odp_packet_t pkt_tbl[/*num*/], int num,
307  const queue_elem_t *q_elem)
308 {
309  odp_event_t odp_event_tbl[num];
310 
311  odp_packet_to_event_multi(pkt_tbl, odp_event_tbl/*out*/, num);
312 
313  /*
314  * Enqueue the events into a scheduled em-odp queue.
315  * No need to init the ev-hdrs - init is done in dispatch.
316  */
317  int sent = odp_queue_enq_multi(q_elem->odp_queue,
318  odp_event_tbl, num);
319  if (unlikely(sent < num)) {
320  sent = unlikely(sent < 0) ? 0 : sent;
321  odp_packet_free_multi(&pkt_tbl[sent], num - sent);
322  /*
323  * Event state checking: No need to adjust the event state
324  * since the events were never enqueued into EM.
325  */
326  }
327 
328  return sent;
329 }
330 
331 static inline int
332 pkt_enqueue_local(const odp_packet_t pkt_tbl[/*num*/], int num,
333  const queue_elem_t *q_elem)
334 {
335  odp_event_t odp_event_tbl[num];
336  em_event_t event_tbl[num];
337 
338  odp_packet_to_event_multi(pkt_tbl, odp_event_tbl/*out*/, num);
339 
340  events_odp2em(odp_event_tbl, event_tbl/*out*/, num);
341 
342  /*
343  * Send into an local em-odp queue.
344  * No need to init the ev-hdrs - init is done in dispatch.
345  */
346  int sent = send_local_multi(event_tbl, num, q_elem);
347 
348  if (unlikely(sent < num)) {
349  sent = unlikely(sent < 0) ? 0 : sent;
350  odp_packet_free_multi(&pkt_tbl[sent], num - sent);
351  /*
352  * Event state checking: No need to adjust the event state
353  * since the events were never enqueued into EM.
354  */
355  }
356 
357  return sent;
358 }
359 
360 static inline int
361 pkt_enqueue_chaining_out(const odp_packet_t pkt_tbl[/*num*/], int num,
362  em_queue_t queue)
363 {
364  odp_event_t odp_event_tbl[num];
365  em_event_t event_tbl[num];
366  event_hdr_t *evhdr_tbl[num];
367  int sent = 0;
368 
369  odp_packet_to_event_multi(pkt_tbl, odp_event_tbl/*out*/, num);
370 
371  events_odp2em(odp_event_tbl, event_tbl/*out*/, num);
372 
373  /* Init the event-hdrs for incoming non-scheduled pkts */
374  event_init_pkt_multi(pkt_tbl, event_tbl/*in/out*/,
375  evhdr_tbl/*out*/, num, true /*is_extev*/);
376 
377  /* Send directly out via event chaining */
378  if (likely(queue_external(queue)))
379  sent = send_chaining_multi(event_tbl, num, queue);
380 
381  if (unlikely(sent < num)) {
382  sent = unlikely(sent < 0) ? 0 : sent;
383  em_free_multi(&event_tbl[sent], num - sent);
384  }
385 
386  return sent;
387 }
388 
389 static inline int
390 pkt_enqueue_unscheduled(const odp_packet_t pkt_tbl[/*num*/], int num,
391  const queue_elem_t *q_elem)
392 {
393  odp_event_t odp_event_tbl[num];
394  em_event_t event_tbl[num];
395  event_hdr_t *evhdr_tbl[num];
396 
397  odp_packet_to_event_multi(pkt_tbl, odp_event_tbl/*out*/, num);
398 
399  events_odp2em(odp_event_tbl, event_tbl/*out*/, num);
400 
401  /* Init the event-hdrs for incoming non-scheduled pkts */
402  event_init_pkt_multi(pkt_tbl, event_tbl/*in/out*/,
403  evhdr_tbl/*out*/, num, true /*is_extev*/);
404 
405  /* Enqueue into an unscheduled em-odp queue */
406  int sent = odp_queue_enq_multi(q_elem->odp_queue, odp_event_tbl, num);
407 
408  if (unlikely(sent < num)) {
409  sent = unlikely(sent < 0) ? 0 : sent;
410  em_free_multi(&event_tbl[sent], num - sent);
411  }
412 
413  return sent;
414 }
415 
416 static inline int
417 pkt_enqueue_output(const odp_packet_t pkt_tbl[/*num*/], int num,
418  queue_elem_t *const q_elem)
419 {
420  odp_event_t odp_event_tbl[num];
421  em_event_t event_tbl[num];
422  event_hdr_t *evhdr_tbl[num];
423 
424  odp_packet_to_event_multi(pkt_tbl, odp_event_tbl/*out*/, num);
425 
426  events_odp2em(odp_event_tbl, event_tbl/*out*/, num);
427 
428  /* Init the event-hdrs for incoming non-scheduled pkts */
429  event_init_pkt_multi(pkt_tbl, event_tbl/*in/out*/,
430  evhdr_tbl/*out*/, num, true /*is_extev*/);
431 
432  /* Send directly out via an output em-odp queue */
433  int sent = send_output_multi(event_tbl, num, q_elem);
434 
435  if (unlikely(sent < num)) {
436  sent = unlikely(sent < 0) ? 0 : sent;
437  em_free_multi(&event_tbl[sent], num - sent);
438  }
439 
440  return sent;
441 }
442 
443 int em_odp_pkt_enqueue(const odp_packet_t pkt_tbl[/*num*/], int num, em_queue_t queue)
444 {
445  if (unlikely(!pkt_tbl || num <= 0))
446  return 0;
447 
448  queue_elem_t *const q_elem = queue_elem_get(queue);
449 
450  /* Queue not in this EM instance, send directly out via event chaining */
451  if (!q_elem)
452  return pkt_enqueue_chaining_out(pkt_tbl, num, queue);
453 
454  if (q_elem->flags.scheduled)
455  return pkt_enqueue_scheduled(pkt_tbl, num, q_elem);
456 
457  if (q_elem->type == EM_QUEUE_TYPE_LOCAL)
458  return pkt_enqueue_local(pkt_tbl, num, q_elem);
459 
460  if (q_elem->type == EM_QUEUE_TYPE_UNSCHEDULED)
461  return pkt_enqueue_unscheduled(pkt_tbl, num, q_elem);
462 
463  if (q_elem->type == EM_QUEUE_TYPE_OUTPUT)
464  return pkt_enqueue_output(pkt_tbl, num, q_elem);
465 
466  /* No supported queue type, drop all pkts */
467  odp_packet_free_multi(pkt_tbl, num);
468  /*
469  * Event state checking: No need to adjust the event state
470  * since the pkts/events were neither initialized nor enqueued into EM.
471  */
472  return 0;
473 }
474 
475 odp_schedule_group_t em_odp_qgrp2odp(em_queue_group_t queue_group)
476 {
477  const queue_group_elem_t *qgrp_elem =
478  queue_group_elem_get(queue_group);
479 
480  if (unlikely(EM_CHECK_LEVEL > 0 && !qgrp_elem)) {
482  "Invalid queue group:%" PRI_QGRP "", queue_group);
483  return ODP_SCHED_GROUP_INVALID;
484  }
485  if (unlikely(EM_CHECK_LEVEL >= 2 && !queue_group_allocated(qgrp_elem))) {
487  "Queue group:%" PRI_QGRP " not created", queue_group);
488  return ODP_SCHED_GROUP_INVALID;
489  }
490 
491  return qgrp_elem->odp_sched_group;
492 }
493 
494 odp_timer_pool_t em_odp_timer2odp(em_timer_t tmr)
495 {
496  unsigned int i = ((unsigned int)((uintptr_t)(tmr) - 1)); /* TMR_H2I */
497 
498  if (unlikely(EM_CHECK_LEVEL > 0 && i >= EM_ODP_MAX_TIMERS))
499  return ODP_TIMER_POOL_INVALID;
500 
501  const timer_storage_t *const tmrs = &em_shm->timers;
502 
503  return tmrs->timer[i].odp_tmr_pool;
504 }
505 
506 odp_timer_t em_odp_tmo2odp(em_tmo_t tmo)
507 {
508  if (unlikely(EM_CHECK_LEVEL > 0 && tmo == EM_TMO_UNDEF))
509  return ODP_TIMER_INVALID;
510 
511  return tmo->odp_timer;
512 }
EM_QUEUE_GROUP_UNDEF
#define EM_QUEUE_GROUP_UNDEF
Definition: event_machine_types.h:127
em_odp_tmo2odp
odp_timer_t em_odp_tmo2odp(em_tmo_t tmo)
Get the odp timer from EM timeout handle.
Definition: event_machine_odp_ext.c:506
EM_QUEUE_PRIO_UNDEF
#define EM_QUEUE_PRIO_UNDEF
Definition: event_machine_hw_types.h:157
event_hdr_t
struct event_hdr event_hdr_t
EM_ERR_NOT_CREATED
@ EM_ERR_NOT_CREATED
Definition: event_machine_hw_types.h:274
em_queue_group_get_next
em_queue_group_t em_queue_group_get_next(void)
Definition: event_machine_queue_group.c:363
queue_elem_t::is_pktin
uint8_t is_pktin
Definition: em_queue_types.h:203
queue_group_elem_t
Definition: em_queue_group_types.h:59
mpool_elem_t::odp_pool
odp_pool_t odp_pool[EM_MAX_SUBPOOLS]
Definition: em_pool_types.h:69
PRI_POOL
#define PRI_POOL
Definition: event_machine_hw_types.h:62
queue_elem_t::type
uint8_t type
Definition: em_queue_types.h:216
queue_group_elem_t::odp_sched_group
odp_schedule_group_t odp_sched_group
Definition: em_queue_group_types.h:63
EM_QUEUE_STATE_INIT
@ EM_QUEUE_STATE_INIT
Definition: em_queue_types.h:133
timer_storage_t
Definition: em_timer_types.h:50
em_odp_events2em
void em_odp_events2em(const odp_event_t odp_events[], em_event_t events[], int num)
Definition: event_machine_odp_ext.c:258
event_machine_odp_ext.h
queue_elem_t::state
queue_state_t state
Definition: em_queue_types.h:210
em_queue_type_t
uint32_t em_queue_type_t
Definition: event_machine_types.h:168
em_timer_timeout_t
Definition: em_timer_types.h:76
EM_QUEUE_TYPE_UNSCHEDULED
@ EM_QUEUE_TYPE_UNSCHEDULED
Definition: event_machine_hw_types.h:127
em_odp_pktin_event_queues2em
int em_odp_pktin_event_queues2em(const odp_queue_t odp_pktin_event_queues[], em_queue_t queues[], int num)
Map the given scheduled ODP pktin event queues to new EM queues.
Definition: event_machine_odp_ext.c:214
event_hdr
Definition: em_event_types.h:184
em_odp_events2odp
void em_odp_events2odp(const em_event_t events[], odp_event_t odp_events[], int num)
Definition: event_machine_odp_ext.c:242
EM_QUEUE_TYPE_UNDEF
@ EM_QUEUE_TYPE_UNDEF
Definition: event_machine_hw_types.h:107
queue_setup_t
Definition: em_queue_types.h:85
queue_elem_t::odp_queue
odp_queue_t odp_queue
Definition: em_queue_types.h:228
mpool_elem_t
Definition: em_pool_types.h:47
queue_elem_t::queue
uint32_t queue
Definition: em_queue_types.h:225
em_odp_event_hdr_size
uint32_t em_odp_event_hdr_size(void)
Definition: event_machine_odp_ext.c:232
INTERNAL_ERROR
#define INTERNAL_ERROR(error, escope, fmt,...)
Definition: em_error.h:43
queue_setup_common
void queue_setup_common(queue_elem_t *q_elem, const queue_setup_t *setup)
Definition: em_queue.c:779
mpool_elem_t::num_subpools
int num_subpools
Definition: em_pool_types.h:65
queue_elem_t::scheduled
uint8_t scheduled
Definition: em_queue_types.h:199
em_queue_group_get_first
em_queue_group_t em_queue_group_get_first(unsigned int *num)
Definition: event_machine_queue_group.c:333
EM_QUEUE_TYPE_LOCAL
@ EM_QUEUE_TYPE_LOCAL
Definition: event_machine_hw_types.h:131
em_odp_event2odp
odp_event_t em_odp_event2odp(em_event_t event)
Definition: event_machine_odp_ext.c:237
PRI_QGRP
#define PRI_QGRP
Definition: event_machine_types.h:129
EM_CHECK_LEVEL
#define EM_CHECK_LEVEL
Definition: event_machine_config.h:253
EM_ERR_OPERATION_FAILED
@ EM_ERR_OPERATION_FAILED
Definition: event_machine_hw_types.h:289
em_odp_timer2odp
odp_timer_pool_t em_odp_timer2odp(em_timer_t tmr)
Get the odp timer_pool from EM timer handle.
Definition: event_machine_odp_ext.c:494
queue_elem_t::valid_check
uint16_t valid_check
Definition: em_queue_types.h:191
EM_ATOMIC_GROUP_UNDEF
#define EM_ATOMIC_GROUP_UNDEF
Definition: event_machine_types.h:156
em_shm
em_shm_t * em_shm
Definition: event_machine_init.c:41
EM_TMO_UNDEF
#define EM_TMO_UNDEF
Definition: event_machine_timer_hw_specific.h:125
EM_QUEUE_UNDEF
#define EM_QUEUE_UNDEF
Definition: event_machine_types.h:107
EM_DEBUG_PRINT
#define EM_DEBUG_PRINT
Definition: event_machine_config.h:292
em_include.h
EM_QUEUE_TYPE_OUTPUT
@ EM_QUEUE_TYPE_OUTPUT
Definition: event_machine_hw_types.h:137
em_odp_queue_odp
odp_queue_t em_odp_queue_odp(em_queue_t queue)
Definition: event_machine_odp_ext.c:40
em_odp_pool2odp
int em_odp_pool2odp(em_pool_t pool, odp_pool_t odp_pools[], int num)
Get the ODP pools used as subpools in a given EM event pool.
Definition: event_machine_odp_ext.c:270
queue_alloc
em_queue_t queue_alloc(em_queue_t queue, const char **err_str)
Definition: em_queue.c:411
EM_POOL_UNDEF
#define EM_POOL_UNDEF
Definition: event_machine_hw_types.h:60
em_queue_prio_t
uint32_t em_queue_prio_t
Definition: event_machine_types.h:186
EM_ERR_BAD_ARG
@ EM_ERR_BAD_ARG
Definition: event_machine_hw_types.h:261
em_free_multi
void em_free_multi(em_event_t events[], int num)
Definition: event_machine_event.c:370
em_odp_qgrp2odp
odp_schedule_group_t em_odp_qgrp2odp(em_queue_group_t queue_group)
Get the ODP schedule group that corresponds to the given EM queue group.
Definition: event_machine_odp_ext.c:475
EM_ESCOPE_ODP_EXT
#define EM_ESCOPE_ODP_EXT
Definition: event_machine_hw_types.h:678
em_odp_pool2em
em_pool_t em_odp_pool2em(odp_pool_t odp_pool)
Get the EM event pool that the given ODP pool belongs to.
Definition: event_machine_odp_ext.c:294
queue_elem_t
Definition: em_queue_types.h:180
em_odp_queue_em
em_queue_t em_odp_queue_em(odp_queue_t queue)
Definition: event_machine_odp_ext.c:53
em_odp_pkt_enqueue
int em_odp_pkt_enqueue(const odp_packet_t pkt_tbl[], int num, em_queue_t queue)
Definition: event_machine_odp_ext.c:443
em_queue_get_num_prio
int em_queue_get_num_prio(int *num_runtime)
Definition: event_machine_queue.c:383
em_odp_event2em
em_event_t em_odp_event2em(odp_event_t odp_event)
Definition: event_machine_odp_ext.c:251