API Reference Manual  1.45.1
odp_pktout_config_opt_t Union Reference

Packet output configuration options bit field. More...

#include <packet_io_types.h>

Data Fields

struct {
   uint64_t   ts_ena: 1
 Enable Tx timestamp capture.
 
   uint64_t   ipv4_chksum_ena: 1
 Enable IPv4 header checksum insertion.
 
   uint64_t   udp_chksum_ena: 1
 Enable UDP checksum insertion.
 
   uint64_t   tcp_chksum_ena: 1
 Enable TCP checksum insertion.
 
   uint64_t   sctp_chksum_ena: 1
 Enable SCTP checksum insertion.
 
   uint64_t   ipv4_chksum: 1
 Insert IPv4 header checksum by default.
 
   uint64_t   udp_chksum: 1
 Insert UDP checksum on packet by default.
 
   uint64_t   tcp_chksum: 1
 Insert TCP checksum on packet by default.
 
   uint64_t   sctp_chksum: 1
 Insert SCTP checksum on packet by default.
 
   uint64_t   no_packet_refs: 1
 Packet references not used on packet output. More...
 
   uint64_t   aging_ena: 1
 Enable packet aging and drop. More...
 
   uint64_t   tx_compl_ena: 1
 For backwards compatibility, setting this flag is the same as setting tx_compl.mode_event in odp_pktio_config_t. More...
 
   uint64_t   proto_stats_ena: 1
 Enable packet protocol stats update.
 
bit
 Option flags for packet output.
 
uint64_t all_bits
 All bits of the bit field structure. More...
 

Detailed Description

Packet output configuration options bit field.

Packet output configuration options listed in a bit field structure. Packet output checksum insertion may be enabled or disabled (e.g. ipv4_chksum_ena):

0: Disable checksum insertion. Application will not request checksum insertion for any packet. This is the default value for xxx_chksum_ena bits. 1: Enable checksum insertion. Application will request checksum insertion for some packets.

When checksum insertion is enabled, application may use configuration options to set the default behaviour on packet output (e.g. ipv4_chksum):

0: Do not insert checksum by default. This is the default value for xxx_chksum bits. 1: Calculate and insert checksum by default.

These defaults may be overridden on per packet basis using e.g. odp_packet_l4_chksum_insert().

For correct operation, packet metadata must provide valid offsets and type flags for the appropriate layer 3 and layer 4 protocols. L3 and L4 offsets can be updated with odp_packet_l3_offset_set() and odp_packet_l4_offset_set() calls. L3 and L4 type flags can be updated using odp_packet_has_*_set() calls For example, UDP checksum calculation needs both L3 and L4 types (IP and UDP) and L3 and L4 offsets (to access IP and UDP headers), while IP checksum calculation only needs L3 type (IP) and L3 offset (to access IP header). When application (e.g. a switch) does not modify L3/L4 data and thus checksum does not need to be updated, checksum insertion should be disabled for optimal performance.

UDP, TCP and SCTP checksum insertion must not be requested for IP fragments. Use checksum override function (odp_packet_l4_chksum_insert()) to disable checksumming when sending a fragment through a packet IO interface that has the relevant L4 checksum insertion enabled.

Result of checksum insertion at packet output is undefined if the protocol headers required for checksum calculation are not well formed. Packet must contain at least as many data bytes after L3/L4 offsets as the headers indicate. Other data bytes of the packet are ignored for the checksum insertion.

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

Field Documentation

◆ no_packet_refs

uint64_t odp_pktout_config_opt_t::no_packet_refs

Packet references not used on packet output.

When set, application indicates that it will not transmit packet references on this packet IO interface. Since every ODP implementation supports it, it is always ok to set this flag.

0: Packet references may be transmitted on the interface (the default value). 1: Packet references will not be transmitted on the interface.

Examples
odp_l2fwd.c, and odp_l3fwd.c.

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

◆ aging_ena

uint64_t odp_pktout_config_opt_t::aging_ena

Enable packet aging and drop.

0: application will not request packet aging (default) 1: application may request packet aging

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

◆ tx_compl_ena

uint64_t odp_pktout_config_opt_t::tx_compl_ena

For backwards compatibility, setting this flag is the same as setting tx_compl.mode_event in odp_pktio_config_t.

The default value is zero.

Deprecated:
Use odp_pktio_config_t::mode_event instead.

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

◆ all_bits

uint64_t odp_pktout_config_opt_t::all_bits

All bits of the bit field structure.

This field can be used to set/clear all flags, or bitwise operations over the entire structure.

Examples
odp_sysinfo.c.

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


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