ETHFW API Guide

Introduction

Data Structures

struct  EthFw_RxFlowInfo
 Flow information for primary and extended flows. More...
 

Macros

#define ETHFW_ARRAYSIZE(x)   (sizeof(x) / sizeof(x[0]))
 Macro to get the size of an array. More...
 
#define ETHFW_BIT(n)   (1U << (n))
 Macro to set bit at given bit position. More...
 
#define ETHFW_GET_BIT(val, n)   (((val) & ETHFW_BIT(n)) >> (n))
 Macro to get bit at given bit position. More...
 
#define ETHFW_IS_BIT_SET(val, n)   (((val) & ETHFW_BIT(n)) != 0U)
 Macro to check if bit at given bit position is set. More...
 
#define ETHFW_NOT_ZERO(val)   ((uint32_t)0U != (uint32_t)(val))
 Macro to check if value is not zero. More...
 
#define ETHFW_POLICER_PERFLOW   (10U)
 Maximum number of custom policers per flow. More...
 

Ethernet Firmware Error Codes

Error codes returned by the EthFw driver APIs.

#define ETHFW_SOK   (0)
 Success. More...
 
#define ETHFW_SINPROGRESS   (1)
 Operation in progress. More...
 
#define ETHFW_EFAIL   (-1)
 Generic failure error condition (typically caused by hardware). More...
 
#define ETHFW_EBADARGS   (-2)
 Bad arguments (i.e. NULL pointer). More...
 
#define ETHFW_EINVALIDPARAMS   (-3)
 Invalid parameters (i.e. value out-of-range). More...
 
#define ETHFW_ETIMEOUT   (-4)
 Time out while waiting for a given condition to happen. More...
 
#define ETHFW_EALLOC   (-8)
 Allocation failure. More...
 
#define ETHFW_EUNEXPECTED   (-9)
 Unexpected condition occurred (sometimes unrecoverable). More...
 
#define ETHFW_EBUSY   (-10)
 The resource is currently busy performing an operation. More...
 
#define ETHFW_EALREADYOPEN   (-11)
 Already open error. More...
 
#define ETHFW_EPERM   (-12)
 Operation not permitted. More...
 
#define ETHFW_ENOTSUPPORTED   (-13)
 Operation not supported. More...
 
#define ETHFW_ENOTFOUND   (-14)
 Resource not found. More...
 
#define ETHFW_EUNKNOWNIOCTL   (-15)
 Unknown IOCTL. More...
 
#define ETHFW_EMALFORMEDIOCTL   (-16)
 Malformed IOCTL (args pointer or size not as expected). More...
 

Macro Definition Documentation

◆ ETHFW_SOK

#define ETHFW_SOK   (0)

Success.

◆ ETHFW_SINPROGRESS

#define ETHFW_SINPROGRESS   (1)

Operation in progress.

◆ ETHFW_EFAIL

#define ETHFW_EFAIL   (-1)

Generic failure error condition (typically caused by hardware).

◆ ETHFW_EBADARGS

#define ETHFW_EBADARGS   (-2)

Bad arguments (i.e. NULL pointer).

◆ ETHFW_EINVALIDPARAMS

#define ETHFW_EINVALIDPARAMS   (-3)

Invalid parameters (i.e. value out-of-range).

◆ ETHFW_ETIMEOUT

#define ETHFW_ETIMEOUT   (-4)

Time out while waiting for a given condition to happen.

◆ ETHFW_EALLOC

#define ETHFW_EALLOC   (-8)

Allocation failure.

◆ ETHFW_EUNEXPECTED

#define ETHFW_EUNEXPECTED   (-9)

Unexpected condition occurred (sometimes unrecoverable).

◆ ETHFW_EBUSY

#define ETHFW_EBUSY   (-10)

The resource is currently busy performing an operation.

◆ ETHFW_EALREADYOPEN

#define ETHFW_EALREADYOPEN   (-11)

Already open error.

◆ ETHFW_EPERM

#define ETHFW_EPERM   (-12)

Operation not permitted.

◆ ETHFW_ENOTSUPPORTED

#define ETHFW_ENOTSUPPORTED   (-13)

Operation not supported.

◆ ETHFW_ENOTFOUND

#define ETHFW_ENOTFOUND   (-14)

Resource not found.

◆ ETHFW_EUNKNOWNIOCTL

#define ETHFW_EUNKNOWNIOCTL   (-15)

Unknown IOCTL.

◆ ETHFW_EMALFORMEDIOCTL

#define ETHFW_EMALFORMEDIOCTL   (-16)

Malformed IOCTL (args pointer or size not as expected).

◆ ETHFW_ARRAYSIZE

#define ETHFW_ARRAYSIZE (   x)    (sizeof(x) / sizeof(x[0]))

Macro to get the size of an array.

◆ ETHFW_BIT

#define ETHFW_BIT (   n)    (1U << (n))

Macro to set bit at given bit position.

◆ ETHFW_GET_BIT

#define ETHFW_GET_BIT (   val,
 
)    (((val) & ETHFW_BIT(n)) >> (n))

Macro to get bit at given bit position.

◆ ETHFW_IS_BIT_SET

#define ETHFW_IS_BIT_SET (   val,
 
)    (((val) & ETHFW_BIT(n)) != 0U)

Macro to check if bit at given bit position is set.

◆ ETHFW_NOT_ZERO

#define ETHFW_NOT_ZERO (   val)    ((uint32_t)0U != (uint32_t)(val))

Macro to check if value is not zero.

◆ ETHFW_POLICER_PERFLOW

#define ETHFW_POLICER_PERFLOW   (10U)

Maximum number of custom policers per flow.