API Reference Manual  1.45.0
api/spec/packet_io.h File Reference

ODP Packet IO. More...

#include <odp/visibility_begin.h>
#include <odp/api/classification.h>
#include <odp/api/packet_types.h>
#include <odp/api/packet_io_stats.h>
#include <odp/api/packet_io_types.h>
#include <odp/api/queue_types.h>
#include <odp/api/reassembly.h>
#include <odp/api/time_types.h>
#include <odp/visibility_end.h>
Include dependency graph for api/spec/packet_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

odp_pktio_t odp_pktio_open (const char *name, odp_pool_t pool, const odp_pktio_param_t *param)
 Open a packet IO interface. More...
 
int odp_pktio_capability (odp_pktio_t pktio, odp_pktio_capability_t *capa)
 Query packet IO interface capabilities. More...
 
unsigned int odp_pktio_max_index (void)
 Maximum packet IO interface index. More...
 
int odp_pktio_config (odp_pktio_t pktio, const odp_pktio_config_t *config)
 Configure packet IO interface options. More...
 
int odp_pktin_queue_config (odp_pktio_t pktio, const odp_pktin_queue_param_t *param)
 Configure packet input queues. More...
 
int odp_pktout_queue_config (odp_pktio_t pktio, const odp_pktout_queue_param_t *param)
 Configure packet output queues. More...
 
int odp_pktin_event_queue (odp_pktio_t pktio, odp_queue_t queues[], int num)
 Event queues for packet input. More...
 
int odp_pktin_queue (odp_pktio_t pktio, odp_pktin_queue_t queues[], int num)
 Direct packet input queues. More...
 
int odp_pktout_event_queue (odp_pktio_t pktio, odp_queue_t queues[], int num)
 Event queues for packet output. More...
 
int odp_pktout_queue (odp_pktio_t pktio, odp_pktout_queue_t queues[], int num)
 Direct packet output queues. More...
 
int odp_pktio_start (odp_pktio_t pktio)
 Start packet receive and transmit. More...
 
int odp_pktio_stop (odp_pktio_t pktio)
 Stop packet receive and transmit. More...
 
int odp_pktio_close (odp_pktio_t pktio)
 Close a packet IO interface. More...
 
odp_pktio_t odp_pktio_lookup (const char *name)
 Return a packet IO handle for an already open device. More...
 
int odp_pktin_recv (odp_pktin_queue_t queue, odp_packet_t packets[], int num)
 Receive packets directly from an interface input queue. More...
 
int odp_pktin_recv_tmo (odp_pktin_queue_t queue, odp_packet_t packets[], int num, uint64_t wait)
 Receive packets directly from an interface input queue with timeout. More...
 
int odp_pktin_recv_mq_tmo (const odp_pktin_queue_t queues[], uint32_t num_q, uint32_t *from, odp_packet_t packets[], int num, uint64_t wait)
 Receive packets directly from multiple interface input queues with timeout. More...
 
uint64_t odp_pktin_wait_time (uint64_t nsec)
 Packet input wait time. More...
 
int odp_pktout_send (odp_pktout_queue_t queue, const odp_packet_t packets[], int num)
 Send packets directly to an interface output queue. More...
 
void odp_lso_profile_param_init (odp_lso_profile_param_t *param)
 Initialize LSO profile parameters. More...
 
odp_lso_profile_t odp_lso_profile_create (odp_pktio_t pktio, const odp_lso_profile_param_t *param)
 Create LSO profile. More...
 
int odp_lso_profile_destroy (odp_lso_profile_t lso_profile)
 Destroy LSO profile. More...
 
int odp_pktout_send_lso (odp_pktout_queue_t queue, const odp_packet_t packet[], int num, const odp_packet_lso_opt_t *lso_opt)
 Send packets with segmentation offload. More...
 
int odp_pktio_promisc_mode_set (odp_pktio_t pktio, odp_bool_t enable)
 Set promiscuous mode. More...
 
int odp_pktio_promisc_mode (odp_pktio_t pktio)
 Determine if promiscuous mode is enabled for a packet IO interface. More...
 
uint32_t odp_pktin_maxlen (odp_pktio_t pktio)
 Maximum frame length at packet input. More...
 
uint32_t odp_pktout_maxlen (odp_pktio_t pktio)
 Maximum frame length at packet output. More...
 
int odp_pktio_maxlen_set (odp_pktio_t pktio, uint32_t maxlen_input, uint32_t maxlen_output)
 Set maximum frame lengths. More...
 
int odp_pktio_mac_addr (odp_pktio_t pktio, void *mac_addr, int size)
 Get the default MAC address of a packet IO interface. More...
 
int odp_pktio_mac_addr_set (odp_pktio_t pktio, const void *mac_addr, int size)
 Set the default MAC address of a packet IO interface. More...
 
int odp_pktio_default_cos_set (odp_pktio_t pktio, odp_cos_t default_cos)
 Setup per-port default class-of-service. More...
 
int odp_pktio_error_cos_set (odp_pktio_t pktio, odp_cos_t error_cos)
 Setup per-port error class-of-service. More...
 
int odp_pktio_skip_set (odp_pktio_t pktio, uint32_t offset)
 Setup per-port header offset. More...
 
int odp_pktio_headroom_set (odp_pktio_t pktio, uint32_t headroom)
 Specify per-port buffer headroom. More...
 
int odp_pktio_index (odp_pktio_t pktio)
 Get pktio interface index. More...
 
uint64_t odp_pktio_to_u64 (odp_pktio_t pktio)
 Get printable value for an odp_pktio_t. More...
 
void odp_pktio_param_init (odp_pktio_param_t *param)
 Initialize pktio params. More...
 
void odp_pktin_queue_param_init (odp_pktin_queue_param_t *param)
 Initialize packet input queue parameters. More...
 
void odp_pktout_queue_param_init (odp_pktout_queue_param_t *param)
 Initialize packet output queue parameters. More...
 
void odp_pktio_config_init (odp_pktio_config_t *config)
 Initialize packet IO configuration options. More...
 
void odp_pktio_print (odp_pktio_t pktio)
 Print pktio info to the console. More...
 
odp_pktio_link_status_t odp_pktio_link_status (odp_pktio_t pktio)
 Determine pktio link is up or down for a packet IO interface. More...
 
int odp_pktio_info (odp_pktio_t pktio, odp_pktio_info_t *info)
 Retrieve information about a pktio. More...
 
int odp_pktio_link_info (odp_pktio_t pktio, odp_pktio_link_info_t *info)
 Retrieve information about packet IO link status. More...
 
uint64_t odp_pktio_ts_res (odp_pktio_t pktio)
 Packet IO timestamp resolution in hertz. More...
 
odp_time_t odp_pktio_ts_from_ns (odp_pktio_t pktio, uint64_t ns)
 Convert nanoseconds to packet IO time. More...
 
odp_time_t odp_pktio_time (odp_pktio_t pktio, odp_time_t *ts_global)
 Current packet IO time and global time. More...
 
int odp_pktout_ts_read (odp_pktio_t pktio, odp_time_t *ts)
 Read last captured Tx timestamp of a packet if available and clear it for next timestamp. More...
 

Detailed Description

ODP Packet IO.

Definition in file api/spec/packet_io.h.