---
name: "rte_errno.h"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_errno.h"
---

# rte\_errno.h(3)

## NAME

rte\_errno.h

## SYNOPSIS

`#include <rte_per_lcore.h>`\

### Macros

\#define **rte\_errno**   **RTE\_PER\_LCORE**(\_rte\_errno)\
 \#define **\_\_ELASTERROR**   1000\

### Enumerations

enum { **RTE\_MIN\_ERRNO** = \_\_ELASTERROR, **E\_RTE\_SECONDARY**, **E\_RTE\_NO\_CONFIG**, **RTE\_MAX\_ERRNO** }\

### 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

### #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.

Definition at line **29** of file **rte\_errno.h**.

### #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

Error types

**Enumerator**

- *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*

*Definition at line* **53** *of file* **rte\_errno.h***.*

## Function Documentation

### RTE\_DECLARE\_PER\_LCORE (int, \_rte\_errno)

*Per core error number.*

### 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**

*errnum The 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.*

## Author

*Generated automatically by Doxygen for DPDK from the source code.*
