12 #ifndef ODP_API_SPEC_PACKET_H_
13 #define ODP_API_SPEC_PACKET_H_
14 #include <odp/visibility_begin.h>
1266 uint32_t len,
void *dst);
1284 uint32_t len,
const void *src);
1326 uint32_t src_offset, uint32_t len);
1346 uint32_t src_offset, uint32_t len);
2571 #include <odp/visibility_end.h>
ODP event API type definitions.
Standard C language types and definitions for ODP.
odp_event_subtype_t
Event subtype.
void odp_packet_print_data(odp_packet_t pkt, uint32_t offset, uint32_t len)
Print packet data.
int odp_packet_is_segmented(odp_packet_t pkt)
Tests if packet is segmented.
odp_packet_t odp_packet_reassemble(odp_pool_t pool, odp_packet_buf_t pkt_buf[], uint32_t num)
Reassemble packet from packet buffers.
void odp_packet_color_set(odp_packet_t pkt, odp_packet_color_t color)
Set packet color.
odp_packet_color_t odp_packet_color(odp_packet_t pkt)
Get packet color.
void odp_packet_from_event_multi(odp_packet_t pkt[], const odp_event_t ev[], int num)
Convert multiple packet events to packet handles.
odp_packet_t odp_packet_ref_pkt(odp_packet_t pkt, uint32_t offset, odp_packet_t hdr)
Create a reference to a packet with a header packet.
uint16_t odp_packet_ones_comp(odp_packet_t pkt, odp_packet_data_range_t *range)
Ones' complement sum of packet data.
int odp_packet_tx_compl_request(odp_packet_t pkt, const odp_packet_tx_compl_opt_t *opt)
Request packet transmit completion.
uint32_t odp_packet_flow_hash(odp_packet_t pkt)
Packet flow hash value.
void * odp_packet_pull_head(odp_packet_t pkt, uint32_t len)
Pull in packet head.
odp_proto_l4_type_t odp_packet_l4_type(odp_packet_t pkt)
Layer 4 protocol type.
void * odp_packet_user_ptr(odp_packet_t pkt)
User context pointer.
uint64_t odp_packet_tx_compl_to_u64(odp_packet_tx_compl_t tx_compl)
Get printable value for packet Tx completion handle.
int odp_packet_trunc_tail(odp_packet_t *pkt, uint32_t len, void **tail_ptr, uint32_t *tailroom)
Truncate packet tail.
odp_packet_free_ctrl_t
Packet free control option.
uint64_t odp_packet_cls_mark(odp_packet_t pkt)
Classification mark value.
int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset)
Set layer 3 start offset.
odp_event_subtype_t odp_packet_subtype(odp_packet_t packet)
Event subtype of a packet.
odp_packet_seg_t odp_packet_last_seg(odp_packet_t pkt)
Last segment in packet.
int odp_packet_input_index(odp_packet_t pkt)
Packet input interface index.
odp_event_t odp_packet_vector_to_event(odp_packet_vector_t pktv)
Convert packet vector handle to event.
uint32_t odp_packet_payload_offset(odp_packet_t pkt)
Payload data offset.
odp_pool_t odp_packet_vector_pool(odp_packet_vector_t pktv)
Packet vector pool.
int odp_packet_tx_compl_done(odp_pktio_t pktio, uint32_t compl_id)
Check packet transmit completion.
odp_event_t odp_packet_to_event(odp_packet_t pkt)
Convert packet handle to event.
int8_t odp_packet_shaper_len_adjust(odp_packet_t pkt)
Get shaper length adjustment.
void odp_packet_to_event_multi(const odp_packet_t pkt[], odp_event_t ev[], int num)
Convert multiple packet handles to events.
odp_packet_chksum_status_t odp_packet_l4_chksum_status(odp_packet_t pkt)
Layer 4 checksum check status.
uint32_t odp_packet_seg_len(odp_packet_t pkt)
Packet data length following the data pointer.
uint32_t odp_packet_buf_data_len(odp_packet_buf_t pkt_buf)
Packet buffer data length in bytes.
int odp_packet_add_data(odp_packet_t *pkt, uint32_t offset, uint32_t len)
Add data into an offset.
void odp_packet_parse_result_multi(const odp_packet_t pkt[], odp_packet_parse_result_t *result[], int num)
Read parse results from multiple packets.
int odp_packet_concat(odp_packet_t *dst, odp_packet_t src)
Concatenate two packets.
int odp_packet_parse_multi(const odp_packet_t pkt[], const uint32_t offset[], int num, const odp_packet_parse_param_t *param)
Parse multiple packets.
uint32_t odp_packet_headroom(odp_packet_t pkt)
Packet headroom length.
uint32_t odp_packet_buf_data_offset(odp_packet_buf_t pkt_buf)
Packet buffer data offset.
void * odp_packet_push_head(odp_packet_t pkt, uint32_t len)
Push out packet head.
void odp_packet_prefetch(odp_packet_t pkt, uint32_t offset, uint32_t len)
Packet data prefetch.
void odp_packet_user_flag_set(odp_packet_t pkt, int val)
Set user flag.
odp_packet_vector_t odp_packet_vector_from_event(odp_event_t ev)
Get packet vector handle from event.
int odp_packet_num_segs(odp_packet_t pkt)
Number of segments.
odp_packet_free_ctrl_t odp_packet_free_ctrl(odp_packet_t pkt)
Returns packet free control option value.
odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool)
Full copy of a packet.
uint32_t odp_packet_seg_data_len(odp_packet_t pkt, odp_packet_seg_t seg)
Segment data length.
uint32_t odp_packet_user_area_size(odp_packet_t pkt)
User area size.
int odp_packet_reass_info(odp_packet_t pkt, odp_packet_reass_info_t *info)
Get information about successful reassembly offload that has happened.
uint32_t odp_packet_l4_offset(odp_packet_t pkt)
Layer 4 start offset.
uint16_t odp_proto_l3_type_t
Layer 3 protocol type.
void * odp_packet_data(odp_packet_t pkt)
Packet data pointer.
int odp_packet_copy_data(odp_packet_t pkt, uint32_t dst_offset, uint32_t src_offset, uint32_t len)
Copy data within packet.
int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset)
Set layer 4 start offset.
void odp_packet_lso_request_clr(odp_packet_t pkt)
Clear LSO request from a packet.
int odp_packet_extend_head(odp_packet_t *pkt, uint32_t len, void **data_ptr, uint32_t *seg_len)
Extend packet head.
odp_packet_t odp_packet_ref(odp_packet_t pkt, uint32_t offset)
Create a reference to a packet.
odp_proto_l2_type_t odp_packet_l2_type(odp_packet_t pkt)
Layer 2 protocol type.
odp_bool_t odp_packet_drop_eligible(odp_packet_t pkt)
Get drop eligible status.
int odp_packet_vector_valid(odp_packet_vector_t pktv)
Check that packet vector is valid.
void * odp_packet_vector_user_area(odp_packet_vector_t pktv)
Packet vector user area.
void * odp_packet_push_tail(odp_packet_t pkt, uint32_t len)
Push out packet tail.
int odp_packet_split(odp_packet_t *pkt, uint32_t len, odp_packet_t *tail)
Split packet into two packets.
void odp_packet_drop_eligible_set(odp_packet_t pkt, odp_bool_t status)
Set drop eligible status.
void * odp_packet_seg_data(odp_packet_t pkt, odp_packet_seg_t seg)
Segment data pointer.
int odp_packet_move_data(odp_packet_t pkt, uint32_t dst_offset, uint32_t src_offset, uint32_t len)
Move data within packet.
odp_proto_stats_t odp_packet_proto_stats(odp_packet_t pkt)
Get proto stats object.
void * odp_packet_user_area(odp_packet_t pkt)
User area address.
uint32_t odp_packet_len(odp_packet_t pkt)
Packet data length.
void odp_packet_vector_user_flag_set(odp_packet_vector_t pktv, int val)
Set user flag.
int odp_packet_extend_tail(odp_packet_t *pkt, uint32_t len, void **data_ptr, uint32_t *seg_len)
Extend packet tail.
uint64_t odp_packet_to_u64(odp_packet_t pkt)
Get printable value for packet handle.
odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len)
Allocate a packet from a packet pool.
int odp_packet_has_tx_compl_request(odp_packet_t pkt)
Check if packet transmit completion is requested.
int odp_packet_rem_data(odp_packet_t *pkt, uint32_t offset, uint32_t len)
Remove data from an offset.
int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset)
Set layer 2 start offset.
void * odp_packet_tail(odp_packet_t pkt)
Packet tailroom pointer.
void odp_packet_ts_request(odp_packet_t pkt, int enable)
Request Tx timestamp capture.
odp_packet_seg_t odp_packet_next_seg(odp_packet_t pkt, odp_packet_seg_t seg)
Next segment in packet.
void odp_packet_shaper_len_adjust_set(odp_packet_t pkt, int8_t adj)
Set shaper length adjustment.
int odp_packet_align(odp_packet_t *pkt, uint32_t offset, uint32_t len, uint32_t align)
Align packet data.
odp_packet_t odp_packet_from_event(odp_event_t ev)
Get packet handle from event.
void odp_packet_free(odp_packet_t pkt)
Free packet.
odp_packet_seg_t odp_packet_first_seg(odp_packet_t pkt)
First segment in packet.
odp_packet_vector_t odp_packet_vector_alloc(odp_pool_t pool)
Allocate a packet vector from a packet vector pool.
odp_packet_reass_status_t
Reassembly status of a packet.
odp_packet_buf_t odp_packet_buf_from_head(odp_pool_t pool, void *head)
Convert packet buffer head pointer to handle.
int odp_packet_trunc_head(odp_packet_t *pkt, uint32_t len, void **data_ptr, uint32_t *seg_len)
Truncate packet head.
uint32_t odp_packet_reset_max_len(odp_packet_t pkt)
Maximum packet data reset length.
void odp_packet_free_ctrl_set(odp_packet_t pkt, odp_packet_free_ctrl_t ctrl)
Set packet free control option.
void odp_packet_vector_free(odp_packet_vector_t pktv)
Free packet vector.
odp_packet_reass_status_t odp_packet_reass_status(odp_packet_t pkt)
Check reassembly status of the packet.
void * odp_packet_l2_ptr(odp_packet_t pkt, uint32_t *len)
Layer 2 start pointer.
void odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash)
Set packet flow hash value.
uint32_t odp_packet_l3_offset(odp_packet_t pkt)
Layer 3 start offset.
void odp_packet_reset_meta(odp_packet_t pkt)
Reset packet metadata.
uint32_t odp_packet_buf_len(odp_packet_t pkt)
Total packet buffer length.
void odp_packet_vector_print(odp_packet_vector_t pktv)
Print packet vector debug information.
int odp_packet_reset(odp_packet_t pkt, uint32_t len)
Reset packet.
void * odp_packet_buf_head(odp_packet_buf_t pkt_buf)
Packet buffer head pointer.
void * odp_packet_tx_compl_user_ptr(odp_packet_tx_compl_t tx_compl)
User context pointer.
void * odp_packet_head(odp_packet_t pkt)
Packet head address.
int odp_packet_copy_from_pkt(odp_packet_t dst, uint32_t dst_offset, odp_packet_t src, uint32_t src_offset, uint32_t len)
Copy data from another packet.
uint64_t odp_packet_vector_to_u64(odp_packet_vector_t pktv)
Get printable value for packet vector handle.
int odp_packet_parse(odp_packet_t pkt, uint32_t offset, const odp_packet_parse_param_t *param)
Parse packet.
void odp_packet_l4_chksum_insert(odp_packet_t pkt, int insert)
Layer 4 checksum insertion override.
int odp_packet_copy_from_mem(odp_packet_t pkt, uint32_t offset, uint32_t len, const void *src)
Copy data from memory to packet.
void * odp_packet_l4_ptr(odp_packet_t pkt, uint32_t *len)
Layer 4 start pointer.
odp_packet_chksum_status_t odp_packet_l3_chksum_status(odp_packet_t pkt)
Layer 3 checksum check status.
int odp_packet_reass_partial_state(odp_packet_t pkt, odp_packet_t frags[], odp_packet_reass_partial_state_t *res)
Get partial reassembly state from a packet.
void odp_packet_user_ptr_set(odp_packet_t pkt, const void *user_ptr)
Set user context pointer.
uint32_t odp_packet_vector_tbl(odp_packet_vector_t pktv, odp_packet_t **pkt_tbl)
Get packet vector table.
odp_packet_chksum_status_t
Packet Checksum Status.
void odp_packet_buf_data_set(odp_packet_buf_t pkt_buf, uint32_t data_offset, uint32_t data_len)
Packet buffer data set.
odp_event_t odp_packet_tx_compl_to_event(odp_packet_tx_compl_t tx_compl)
Convert packet Tx completion to event.
odp_packet_color_t
Packet Color.
void odp_packet_aging_tmo_set(odp_packet_t pkt, uint64_t tmo_ns)
Enable or disable Tx packet aging.
odp_proto_l3_type_t odp_packet_l3_type(odp_packet_t pkt)
Layer 3 protocol type.
uint8_t odp_proto_l4_type_t
Layer 4 protocol type.
void * odp_packet_data_seg_len(odp_packet_t pkt, uint32_t *seg_len)
Packet data pointer with segment length.
uint32_t odp_packet_disassemble(odp_packet_t pkt, odp_packet_buf_t pkt_buf[], uint32_t num)
Disassemble packet into packet buffers.
void odp_packet_input_set(odp_packet_t pkt, odp_pktio_t pktio)
Set packet input interface.
void odp_packet_parse_result(odp_packet_t pkt, odp_packet_parse_result_t *result)
Read parse results.
void * odp_packet_l3_ptr(odp_packet_t pkt, uint32_t *len)
Layer 3 start pointer.
int odp_packet_is_valid(odp_packet_t pkt)
Check that packet is valid.
void odp_packet_free_multi(const odp_packet_t pkt[], int num)
Free multiple packets.
void * odp_packet_pull_tail(odp_packet_t pkt, uint32_t len)
Pull in packet tail.
uint64_t odp_packet_seg_to_u64(odp_packet_seg_t seg)
Get printable value for packet segment handle.
odp_packet_tx_compl_t odp_packet_tx_compl_from_event(odp_event_t ev)
Get packet Tx completion handle from event.
void odp_packet_tx_compl_free(odp_packet_tx_compl_t tx_compl)
Free packet Tx completion.
int odp_packet_user_flag(odp_packet_t pkt)
Check user flag.
int odp_packet_has_lso_request(odp_packet_t pkt)
Check if LSO is requested for the packet.
void odp_packet_print(odp_packet_t pkt)
Print packet debug information.
int odp_packet_alloc_multi(odp_pool_t pool, uint32_t len, odp_packet_t pkt[], int num)
Allocate multiple packets from a packet pool.
odp_pool_t odp_packet_pool(odp_packet_t pkt)
Packet pool.
void odp_packet_ts_set(odp_packet_t pkt, odp_time_t timestamp)
Set packet timestamp.
int odp_packet_lso_request(odp_packet_t pkt, const odp_packet_lso_opt_t *lso_opt)
Request Large Send Offload (LSO) for a packet.
void odp_packet_vector_size_set(odp_packet_vector_t pktv, uint32_t size)
Set the number of packets stored in a vector.
int odp_packet_copy_to_mem(odp_packet_t pkt, uint32_t offset, uint32_t len, void *dst)
Copy data from packet to memory.
odp_packet_t odp_packet_copy_part(odp_packet_t pkt, uint32_t offset, uint32_t len, odp_pool_t pool)
Partial copy of a packet.
odp_packet_t odp_packet_ref_static(odp_packet_t pkt)
Create a static reference to a packet.
void odp_packet_l3_chksum_insert(odp_packet_t pkt, int insert)
Layer 3 checksum insertion override.
int odp_packet_has_ref(odp_packet_t pkt)
Test if packet has multiple references.
odp_time_t odp_packet_ts(odp_packet_t pkt)
Packet timestamp.
uint32_t odp_packet_buf_size(odp_packet_buf_t pkt_buf)
Packet buffer size in bytes.
int odp_packet_vector_user_flag(odp_packet_vector_t pktv)
Check user flag.
void odp_packet_free_sp(const odp_packet_t pkt[], int num)
Free multiple packets to the same pool.
void odp_packet_proto_stats_request(odp_packet_t pkt, odp_packet_proto_stats_opt_t *opt)
Request packet proto stats.
uint32_t odp_packet_vector_size(odp_packet_vector_t pktv)
Number of packets in a vector.
void * odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len, odp_packet_seg_t *seg)
Packet offset pointer.
uint32_t odp_packet_tailroom(odp_packet_t pkt)
Packet tailroom length.
int odp_packet_payload_offset_set(odp_packet_t pkt, uint32_t offset)
Set payload data start offset.
uint8_t odp_proto_l2_type_t
Layer 2 protocol type.
uint64_t odp_packet_aging_tmo(odp_packet_t pkt)
Check if packet has Tx aging drop enabled.
odp_pktio_t odp_packet_input(odp_packet_t pkt)
Packet input interface.
uint32_t odp_packet_l2_offset(odp_packet_t pkt)
Layer 2 start offset.
bool odp_bool_t
Boolean type.
Packet API data range specifier.
Packet proto stats options.
Information about a completed reassembly.
Result from odp_packet_reass_partial_state()
Packet transmit completion request options.