Buffer event metadata and operations.
◆ odp_buffer_from_event()
◆ odp_buffer_from_event_multi()
Convert multiple buffer events to buffer handles.
All events must be of type ODP_EVENT_BUFFER.
- Parameters
-
| [out] | buf | Buffer handle array for output |
| ev | Array of event handles to convert |
| num | Number of buffers and events |
- Examples
- odp_bench_buffer.c.
◆ odp_buffer_to_event()
◆ odp_buffer_to_event_multi()
Convert multiple buffer handles to events.
- Parameters
-
| buf | Array of buffer handles to convert |
| [out] | ev | Event handle array for output |
| num | Number of buffers and events |
- Examples
- odp_bench_buffer.c.
◆ odp_buffer_addr()
◆ odp_buffer_size()
◆ odp_buffer_user_area()
Buffer user area.
Returns pointer to the user area associated with the buffer. Size of the area is fixed and defined in buffer pool parameters.
- Parameters
-
- Returns
- Pointer to the user area of the buffer
- Return values
-
| NULL | The buffer does not have user area |
- Examples
- odp_bench_buffer.c, and odp_pool_latency.c.
◆ odp_buffer_is_valid()
Check that buffer is valid.
This function can be used for debugging purposes to check if a buffer handle represents a valid buffer. The level of error checks depends on the implementation. The call should not crash if the buffer handle is corrupted.
- Parameters
-
- Return values
-
| 1 | Buffer handle represents a valid buffer. |
| 0 | Buffer handle does not represent a valid buffer. |
- Examples
- odp_bench_buffer.c, and odp_sched_latency.c.
◆ odp_buffer_pool()
Buffer pool of the buffer.
- Parameters
-
- Returns
- Handle of buffer pool buffer belongs to
- Examples
- odp_bench_buffer.c.
◆ odp_buffer_alloc()
Buffer alloc.
Allocates a buffer from the pool. Returns ODP_BUFFER_INVALID when a buffer can not be allocated.
- Parameters
-
- Returns
- Handle of allocated buffer
- Return values
-
| ODP_BUFFER_INVALID | Buffer could not be allocated |
- Examples
- ipsec_api/odp_ipsec.c, ipsec_crypto/odp_ipsec.c, odp_bench_buffer.c, odp_bench_packet.c, odp_bench_queue.c, odp_debug.c, odp_dmafwd.c, odp_pool_perf.c, odp_queue_perf.c, odp_sched_latency.c, and odp_sched_perf.c.
◆ odp_buffer_alloc_multi()
◆ odp_buffer_free()
◆ odp_buffer_free_multi()
| void odp_buffer_free_multi |
( |
const odp_buffer_t |
buf[], |
|
|
int |
num |
|
) |
| |
◆ odp_buffer_print()
Print buffer metadata to STDOUT.
- Parameters
-
- Examples
- odp_debug.c.
◆ odp_buffer_to_u64()
Get printable value for an odp_buffer_t.
- Parameters
-
| hdl | odp_buffer_t handle to be printed |
- Returns
- uint64_t value that can be used to print/display this handle
- Note
- This routine is intended to be used for diagnostic purposes to enable applications to generate a printable value that represents an odp_buffer_t handle.