PDK API Guide for AM65xx
cpsw_stats_priv.h File Reference

Introduction

This file contains private type definitions and helper macros for the CPSW statistics module which are meant for internal use in Enet Per drivers.

Go to the source code of this file.

Data Structures

struct  CpswStats_Obj
 CPSW statistics object. More...
 

Macros

#define CPSW_STATS_PRIVATE_IOCTL(x)
 Helper macro to create private IOCTL commands for CPSW stats module. More...
 
#define CPSW_STATS_MACPORT_MAX   (8U)
 Maximum number of MAC port stats blocks. More...
 

Typedefs

typedef CpswStats_ObjCpswStats_Handle
 Statistics module handle. More...
 

Enumerations

enum  CpswStats_PrivIoctls { CPSW_STATS_IOCTL_SYNC = CPSW_STATS_PRIVATE_IOCTL(0U) }
 Statistics private IOCTL commands. More...
 

Functions

int32_t CpswStats_open (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
 Open and initialize CPSW stats. More...
 
int32_t CpswStats_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
 Rejoin a running CPSW stats module. More...
 
int32_t CpswStats_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Run an IOCTL operation on CPSW stats. More...
 
void CpswStats_close (EnetMod_Handle hMod)
 Close CPSW stats. More...
 

Macro Definition Documentation

◆ CPSW_STATS_PRIVATE_IOCTL

#define CPSW_STATS_PRIVATE_IOCTL (   x)
Value:
ENET_IOCTL_STATS_BASE | \
ENET_IOCTL_PER_CPSW | \
ENET_IOCTL_MIN(x))
Definition: enet_ioctl.h:170

Helper macro to create private IOCTL commands for CPSW stats module.

◆ CPSW_STATS_MACPORT_MAX

#define CPSW_STATS_MACPORT_MAX   (8U)

Maximum number of MAC port stats blocks.

Typedef Documentation

◆ CpswStats_Handle

Statistics module handle.

Enumeration Type Documentation

◆ CpswStats_PrivIoctls

Statistics private IOCTL commands.

Enumerator
CPSW_STATS_IOCTL_SYNC 

Synchronize hardware and software statistics.

IOCTL parameters: inArgs: None outArgs: None

Function Documentation

◆ CpswStats_open()

int32_t CpswStats_open ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId,
const void *  cfg,
uint32_t  cfgSize 
)

Open and initialize CPSW stats.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
cfgConfiguration parameters
cfgSizeSize of the configuration parameters
Returns
Enet_ErrorCodes

◆ CpswStats_rejoin()

int32_t CpswStats_rejoin ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId 
)

Rejoin a running CPSW stats module.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
Returns
Enet_ErrorCodes

◆ CpswStats_ioctl()

int32_t CpswStats_ioctl ( EnetMod_Handle  hMod,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Run an IOCTL operation on CPSW stats.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ CpswStats_close()

void CpswStats_close ( EnetMod_Handle  hMod)

Close CPSW stats.

Parameters
hModEnet Module handle