ETHFW API Guide

Introduction

Data Structures

struct  EthFwMon_Stats
 Statistics being monitored. More...
 
struct  EthFwMon_Cfg
 Monitor and recovery configuration parameters. More...
 

Functions

int32_t EthFwMon_startTask (void)
 Start EthFw Monitor. More...
 
void EthFwMon_stopTask (void)
 Stop EthFw Monitor. More...
 
void EthFwMon_initCfg (EthFwMon_Cfg *monCfg)
 Initialize EthFw Monitor configuration parameters. More...
 
int32_t EthFwMon_init (const EthFwMon_Cfg *monCfg, Enet_Type enetType, uint32_t instId, uint32_t numPorts)
 Initialize EthFw Monitor. More...
 

Typedefs

typedef void(* EthFw_closeLwipDmaCb) (void *arg)
 
typedef void(* EthFw_openLwipDmaCb) (void *arg)
 
typedef void(* EthFw_StatsMonHostPortEvtCb) (uint32_t evtMask, const EthFwMon_Stats *monStats, const CpswStats_HostPort_Ng *stats, void *arg)
 
typedef void(* EthFw_StatsMonMacPortEvtCb) (Enet_MacPort macPort, uint32_t evtMask, const EthFwMon_Stats *monStats, const CpswStats_MacPort_Ng *stats, void *arg)
 

Statistics Monitor Events

Event flags reported by Ethernet Firmware when specific statistics being monitored had increased.

#define ETHFW_STATSMON_RXBOTTOMOFFIFODROP   ETHFW_BIT(0)
 
#define ETHFW_STATSMON_RXTOPOFFIFODROP   ETHFW_BIT(1)
 
#define ETHFW_STATSMON_TXPRIDROP   ETHFW_BIT(2)
 

Macro Definition Documentation

◆ ETHFW_STATSMON_RXBOTTOMOFFIFODROP

#define ETHFW_STATSMON_RXBOTTOMOFFIFODROP   ETHFW_BIT(0)

CPSW Rx Bottom of FIFO Drop - Frames received on a port overran the port's receive FIFO and were dropped.

◆ ETHFW_STATSMON_RXTOPOFFIFODROP

#define ETHFW_STATSMON_RXTOPOFFIFODROP   ETHFW_BIT(1)

CPSW Rx Top of FIFO Drop - Frames received on a port that had a start-of-frame (SOF) overrun on any destination port egress (when attempting to load a packet from the top of the ingress port receive FIFO into any other port's transmit FIFO).

◆ ETHFW_STATSMON_TXPRIDROP

#define ETHFW_STATSMON_TXPRIDROP   ETHFW_BIT(2)

CPSW Transmit Priority 0-7 Drop - Frames on the port that overran the transmit FIFO priority 0-7 and were dropped.

Typedef Documentation

◆ EthFw_closeLwipDmaCb

typedef void(* EthFw_closeLwipDmaCb) (void *arg)

Callback for closing the Lwip DMA channels from the application

◆ EthFw_openLwipDmaCb

typedef void(* EthFw_openLwipDmaCb) (void *arg)

Callback for opening the Lwip DMA channels from the application

◆ EthFw_StatsMonHostPortEvtCb

typedef void(* EthFw_StatsMonHostPortEvtCb) (uint32_t evtMask, const EthFwMon_Stats *monStats, const CpswStats_HostPort_Ng *stats, void *arg)

Callback when a host port monitored statistics counter has increased

◆ EthFw_StatsMonMacPortEvtCb

typedef void(* EthFw_StatsMonMacPortEvtCb) (Enet_MacPort macPort, uint32_t evtMask, const EthFwMon_Stats *monStats, const CpswStats_MacPort_Ng *stats, void *arg)

Callback when a MAC port monitored statistics counter has increased

Function Documentation

◆ EthFwMon_startTask()

int32_t EthFwMon_startTask ( void  )

Start EthFw Monitor.

Returns
ETHFW_SOK if monitor task is successfully created.

◆ EthFwMon_stopTask()

void EthFwMon_stopTask ( void  )

Stop EthFw Monitor.

◆ EthFwMon_initCfg()

void EthFwMon_initCfg ( EthFwMon_Cfg monCfg)

Initialize EthFw Monitor configuration parameters.

Parameters
monCfgConfiguration parameters to be initialized

◆ EthFwMon_init()

int32_t EthFwMon_init ( const EthFwMon_Cfg monCfg,
Enet_Type  enetType,
uint32_t  instId,
uint32_t  numPorts 
)

Initialize EthFw Monitor.

Initializes EthFw Monitor. User should call EthFwMon_Cfg to initialize configuration parameters and make updates if needed before calling this function.

Parameters
monCfgConfiguration parameters
enetTypeEnetType
instIdinstance Id
numPortsNumber of ports opened by EthFw
Returns
ETHFW_SOK if EthFw Monitor initialization was successful