API Reference Manual  1.45.0
odp_pktio_config_t Struct Reference

Packet IO configuration options. More...

#include <packet_io_types.h>

Collaboration diagram for odp_pktio_config_t:
[legend]

Data Fields

odp_pktin_config_opt_t pktin
 Packet input configuration options bit field. More...
 
odp_pktout_config_opt_t pktout
 Packet output configuration options bit field. More...
 
odp_pktio_parser_config_t parser
 Packet input parser configuration.
 
odp_bool_t enable_loop
 Interface loopback mode. More...
 
odp_bool_t inbound_ipsec
 Inbound IPSEC inlined with packet input. More...
 
odp_bool_t outbound_ipsec
 Outbound IPSEC inlined with packet output. More...
 
odp_bool_t enable_lso
 Enable Large Send Offload (LSO) More...
 
odp_reass_config_t reassembly
 Packet input reassembly configuration.
 
struct {
   odp_pktio_link_pause_t   pause_rx
 Reception of flow control frames. More...
 
   odp_pktio_link_pause_t   pause_tx
 Transmission of flow control frames. More...
 
flow_control
 Link flow control configuration.
 
struct {
   uint32_t   mode_event: 1
 Enable packet transmit completion events. More...
 
   uint32_t   mode_poll: 1
 Enable packet transmit completion check through polling. More...
 
   uint32_t   max_compl_id
 Maximum completion index. More...
 
tx_compl
 Packet transmit completion configuration.
 

Detailed Description

Packet IO configuration options.

Packet IO interface level configuration options. Use odp_pktio_capability() to see which options are supported by the implementation. Use odp_pktio_config_init() to initialize the structure with default values.

Examples
ipsec_api/odp_ipsec.c, odp_classifier.c, odp_ipsecfwd.c, odp_l2fwd.c, odp_l2fwd_simple.c, odp_l3fwd.c, odp_packet_dump.c, odp_packet_gen.c, odp_ping.c, odp_pktio_ordered.c, odp_pktio_perf.c, odp_sched_pktio.c, odp_simple_pipeline.c, and odp_switch.c.

Definition at line 587 of file api/spec/packet_io_types.h.

Field Documentation

◆ pktin

odp_pktin_config_opt_t odp_pktio_config_t::pktin

Packet input configuration options bit field.

Default value for all bits is zero.

Examples
odp_l2fwd.c, odp_packet_dump.c, odp_ping.c, and odp_sysinfo.c.

Definition at line 591 of file api/spec/packet_io_types.h.

◆ pktout

odp_pktout_config_opt_t odp_pktio_config_t::pktout

Packet output configuration options bit field.

Default value for all bits is zero.

Examples
odp_l2fwd.c, odp_l3fwd.c, and odp_sysinfo.c.

Definition at line 596 of file api/spec/packet_io_types.h.

◆ enable_loop

odp_bool_t odp_pktio_config_t::enable_loop

Interface loopback mode.

In this mode the packets sent out through the interface is looped back to input of the same interface. Supporting loopback mode is an optional feature per interface and should be queried in the interface capability before enabling the same.

Default value is false.

Definition at line 610 of file api/spec/packet_io_types.h.

◆ inbound_ipsec

odp_bool_t odp_pktio_config_t::inbound_ipsec

Inbound IPSEC inlined with packet input.

Enable/disable inline inbound IPSEC operation. When enabled packet input directs all IPSEC packets automatically to IPSEC inbound processing. IPSEC configuration (through IPSEC API) must be done before enabling this feature in pktio. Packets that are not (recognized as) IPSEC are processed according to the packet input configuration.

0: Disable inbound IPSEC inline operation (default) 1: Enable inbound IPSEC inline operation

See also
odp_ipsec_config(), odp_ipsec_sa_create()
Examples
ipsec_api/odp_ipsec.c.

Definition at line 626 of file api/spec/packet_io_types.h.

◆ outbound_ipsec

odp_bool_t odp_pktio_config_t::outbound_ipsec

Outbound IPSEC inlined with packet output.

Enable/disable inline outbound IPSEC operation. When enabled IPSEC outbound processing can send outgoing IPSEC packets directly to the pktio interface for output. IPSEC configuration is done through the IPSEC API.

Support of outbound IPSEC inline operation with traffic manager (ODP_PKTOUT_MODE_TM) can be queried with odp_ipsec_capability().

Examples
ipsec_api/odp_ipsec.c.

Definition at line 643 of file api/spec/packet_io_types.h.

◆ enable_lso

odp_bool_t odp_pktio_config_t::enable_lso

Enable Large Send Offload (LSO)

Enables LSO on the interface. Use LSO capabilities (odp_lso_capability_t) to check if the interface supports LSO (in the selected packet output mode). LSO cannot be enabled in ODP_PKTOUT_MODE_QUEUE mode. Also, LSO operation cannot be combined with IPSEC on packet output.

Application requests LSO for outgoing packets with odp_pktout_send_lso() or odp_tm_enq_multi_lso(). Other packet output calls ignore LSO metadata in packets.

0: Application will not use LSO (default) 1: Application will use LSO

Definition at line 658 of file api/spec/packet_io_types.h.

◆ pause_rx

odp_pktio_link_pause_t odp_pktio_config_t::pause_rx

Reception of flow control frames.

Configures interface operation when an Ethernet flow control frame is received:

  • ODP_PKTIO_LINK_PAUSE_OFF: Flow control is disabled
  • ODP_PKTIO_LINK_PAUSE_ON: Enable traditional Ethernet pause frame handling. When a pause frame is received, all packet output is halted temporarily.
  • ODP_PKTIO_LINK_PFC_ON: Enable Priority-based Flow Control (PFC) handling. When a PFC frame is received, packet output of certain (VLAN) class of service levels are halted temporarily.

The default value is ODP_PKTIO_LINK_PAUSE_OFF.

Examples
odp_l2fwd.c.

Definition at line 679 of file api/spec/packet_io_types.h.

◆ pause_tx

odp_pktio_link_pause_t odp_pktio_config_t::pause_tx

Transmission of flow control frames.

Configures Ethernet flow control frame generation on the interface:

  • ODP_PKTIO_LINK_PAUSE_OFF: Flow control is disabled
  • ODP_PKTIO_LINK_PAUSE_ON: Enable traditional Ethernet pause frame generation. Pause frames are generated to request the remote end of the link to halt all transmissions temporarily.
  • ODP_PKTIO_LINK_PFC_ON: Enable Priority-based Flow Control (PFC) frame generation. PFC frames are generated to request the remote end of the link to halt transmission of certain (VLAN) class of service levels temporarily.

When PFC is enabled, classifier API is used to configure CoS nodes with back pressure threshold and PFC priority level parameters (odp_bp_param_t).

The default value is ODP_PKTIO_LINK_PAUSE_OFF.

Examples
odp_l2fwd.c.

Definition at line 700 of file api/spec/packet_io_types.h.

◆ mode_event

uint32_t odp_pktio_config_t::mode_event

Enable packet transmit completion events.

Use pktio capability tx_compl to check if packet transmit completion mode ODP_PACKET_TX_COMPL_EVENT is supported.

0: Application will not request ODP_PACKET_TX_COMPL_EVENT mode completion (default) 1: Application may request ODP_PACKET_TX_COMPL_EVENT mode completion

Examples
odp_l2fwd.c.

Definition at line 718 of file api/spec/packet_io_types.h.

◆ mode_poll

uint32_t odp_pktio_config_t::mode_poll

Enable packet transmit completion check through polling.

Use pktio capability tx_compl to check if packet transmit completion mode ODP_PACKET_TX_COMPL_POLL is supported.

0: Application will not request ODP_PACKET_TX_COMPL_POLL mode completion (default) 1: Application may request ODP_PACKET_TX_COMPL_POLL mode completion

Examples
odp_l2fwd.c.

Definition at line 730 of file api/spec/packet_io_types.h.

◆ max_compl_id

uint32_t odp_pktio_config_t::max_compl_id

Maximum completion index.

When ODP_PACKET_TX_COMPL_POLL mode is enabled, the maximum completion index value that application will use. The value must be between 0 and tx_compl.max_compl_id capability. The default value is zero.

Examples
odp_l2fwd.c.

Definition at line 739 of file api/spec/packet_io_types.h.


The documentation for this struct was generated from the following file: