DPDK  19.11.4
Macros | Enumerations | Functions
rte_errno.h File Reference
#include <rte_per_lcore.h>

Go to the source code of this file.

Macros

#define rte_errno   RTE_PER_LCORE(_rte_errno)
 
#define __ELASTERROR   1000
 

Enumerations

enum  { ,
  RTE_QDMA_MODE_HW, RTE_QDMA_MODE_VIRTUAL , RTE_MIN_ERRNO = __ELASTERROR, E_RTE_SECONDARY,
  E_RTE_NO_CONFIG, RTE_MAX_ERRNO , CFG_FLAG_GLOBAL_SECTION = 1, CFG_FLAG_EMPTY_VALUES = 2,
  IP_LAST_FRAG_IDX, IP_FIRST_FRAG_IDX, IP_MIN_FRAG_NUM, IP_MAX_FRAG_NUM = RTE_LIBRTE_IP_FRAG_MAX_FRAG ,
  RTE_RIB_GET_NXT_ALL, RTE_RIB_GET_NXT_COVER, RTE_RIB6_GET_NXT_ALL, RTE_RIB6_GET_NXT_COVER
}
 

Functions

 RTE_DECLARE_PER_LCORE (int, _rte_errno)
 
const char * rte_strerror (int errnum)
 

Detailed Description

API for error cause tracking

Definition in file rte_errno.h.

Macro Definition Documentation

◆ rte_errno

#define rte_errno   RTE_PER_LCORE(_rte_errno)

Error number value, stored per-thread, which can be queried after calls to certain functions to determine why those functions failed.

Uses standard values from errno.h wherever possible, with a small number of additional possible values for RTE-specific conditions.

Examples
examples/ioat/ioatfwd.c, examples/ipsec-secgw/ipsec-secgw.c, examples/ipsec-secgw/sa.c, and examples/packet_ordering/main.c.

Definition at line 29 of file rte_errno.h.

◆ __ELASTERROR

#define __ELASTERROR   1000

Check if we have a defined value for the max system-defined errno values. if no max defined, start from 1000 to prevent overlap with standard values

Definition at line 49 of file rte_errno.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Error types

Enumerator
RTE_QDMA_MODE_HW 

Allocate a H/W queue per VQ i.e. Exclusive hardware queue for a VQ. This mode will have best performance.

RTE_QDMA_MODE_VIRTUAL 

A VQ shall not have an exclusive associated H/W queue. Rather a H/W Queue will be shared by multiple Virtual Queues. This mode will have intermediate data structures to support multi VQ to PQ mappings thus having some performance implications. Note: Even in this mode there is an option to allocate a H/W queue for a VQ. Please see 'RTE_QDMA_VQ_EXCLUSIVE_PQ' flag.

RTE_MIN_ERRNO 

Start numbering above std errno vals

E_RTE_SECONDARY 

Operation not allowed in secondary processes

E_RTE_NO_CONFIG 

Missing rte_config

RTE_MAX_ERRNO 

Max RTE error number

CFG_FLAG_GLOBAL_SECTION 

Indicates that the file supports key value entries before the first defined section. These entries can be accessed in the "GLOBAL" section.

CFG_FLAG_EMPTY_VALUES 

Indicates that file supports key value entries where the value can be zero length (e.g., "key=").

IP_LAST_FRAG_IDX 

index of last fragment

IP_FIRST_FRAG_IDX 

index of first fragment

IP_MIN_FRAG_NUM 

minimum number of fragments

IP_MAX_FRAG_NUM 

maximum number of fragments per packet

RTE_RIB_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

RTE_RIB6_GET_NXT_ALL 

flag to get all subroutes in a RIB tree

RTE_RIB6_GET_NXT_COVER 

flag to get first matched subroutes in a RIB tree

Definition at line 53 of file rte_errno.h.

Function Documentation

◆ RTE_DECLARE_PER_LCORE()

RTE_DECLARE_PER_LCORE ( int  ,
_rte_errno   
)

Per core error number.

◆ rte_strerror()

const char* rte_strerror ( int  errnum)

Function which returns a printable string describing a particular error code. For non-RTE-specific error codes, this function returns the value from the libc strerror function.

Parameters
errnumThe error number to be looked up - generally the value of rte_errno
Returns
A pointer to a thread-local string containing the text describing the error.
Examples
examples/bbdev_app/main.c, examples/bond/main.c, examples/distributor/main.c, examples/ethtool/ethtool-app/main.c, examples/eventdev_pipeline/pipeline_worker_generic.c, examples/eventdev_pipeline/pipeline_worker_tx.c, examples/flow_filtering/main.c, examples/ioat/ioatfwd.c, examples/ip_fragmentation/main.c, examples/ip_pipeline/cli.c, examples/ip_reassembly/main.c, examples/ipsec-secgw/ipsec-secgw.c, examples/ipv4_multicast/main.c, examples/kni/main.c, examples/l2fwd-crypto/main.c, examples/l2fwd-event/main.c, examples/l2fwd-jobstats/main.c, examples/l2fwd-keepalive/main.c, examples/l2fwd/main.c, examples/l3fwd-acl/main.c, examples/l3fwd-power/main.c, examples/l3fwd/main.c, examples/link_status_interrupt/main.c, examples/multi_process/client_server_mp/mp_server/init.c, examples/multi_process/client_server_mp/mp_server/main.c, examples/multi_process/symmetric_mp/main.c, examples/packet_ordering/main.c, examples/performance-thread/l3fwd-thread/main.c, examples/ptpclient/ptpclient.c, examples/qos_meter/main.c, examples/qos_sched/init.c, examples/rxtx_callbacks/main.c, examples/server_node_efd/server/init.c, examples/server_node_efd/server/main.c, examples/vhost/main.c, examples/vm_power_manager/guest_cli/vm_power_cli_guest.c, examples/vm_power_manager/main.c, examples/vmdq/main.c, and examples/vmdq_dcb/main.c.