PDK API Guide for J721E
CPSW Statistics API

Introduction

Data Structures

struct  CpswStats_PortStats
 CPSW nG port statistics. More...
 
struct  CpswStats_HostPort_2g
 CPSW 2G host port statistics. More...
 
struct  CpswStats_MacPort_2g
 CPSW 2G MAC port statistics. More...
 
struct  CpswStats_HostPort_9g
 CPSW 9G host port statistics. More...
 
struct  CpswStats_MacPort_9g
 CPSW 9G MAC port statistics. More...
 
struct  CpswStats_GenericMacPortInArgs
 Input args for CPSW_STATS_IOCTL_GET_MACPORT_STATS and CPSW_STATS_IOCTL_RESET_MACPORT_STATS command. More...
 
struct  CpswStats_RestoreMacPortStatsInArgs
 Input args for CPSW_STATS_IOCTL_RESTORE_MACPORT_STATS command. More...
 

Typedefs

typedef struct CpswStats_Obj_s * CpswStats_Handle
 Statistics submodule handle. More...
 

Enumerations

enum  CpswStats_Ioctl_e {
  CPSW_STATS_IOCTL_GET_HOSTPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(0U), CPSW_STATS_IOCTL_GET_MACPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(1U), CPSW_STATS_IOCTL_RESET_HOSTPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(2U), CPSW_STATS_IOCTL_RESET_MACPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(3U),
  CPSW_STATS_IOCTL_RESTORE_HOSTPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(4U), CPSW_STATS_IOCTL_RESTORE_MACPORT_STATS = CPSW_STATS_PUBLIC_IOCTL(5U), CPSW_STATS_IOCTL_PRINT_REGS = CPSW_STATS_PUBLIC_IOCTL(6U)
}
 Statistics IOCTL commands. More...
 

Macros

#define CPSW_STATS_PUBLIC_IOCTL(x)   (CPSW_IOCTL_STATS_BASE | CPSW_IOCTL_MIN(x))
 Helper macro to create IOCTL commands for statistics submodule. More...
 
#define CPSW_STATS_BLOCK_ELEM_NUM   (128U)
 Number of elements in a statistics block. More...
 

Macro Definition Documentation

#define CPSW_STATS_PUBLIC_IOCTL (   x)    (CPSW_IOCTL_STATS_BASE | CPSW_IOCTL_MIN(x))

Helper macro to create IOCTL commands for statistics submodule.

#define CPSW_STATS_BLOCK_ELEM_NUM   (128U)

Number of elements in a statistics block.

Typedef Documentation

typedef struct CpswStats_Obj_s* CpswStats_Handle

Statistics submodule handle.

Statistics module opaque handle used to call any statistics related APIs.

Enumeration Type Documentation

Statistics IOCTL commands.

Enumerator
CPSW_STATS_IOCTL_GET_HOSTPORT_STATS 

Get host port statistics.

Gets the network statistics of the host port.

It's caller's responsibility to typecast the returned statistics structure according to the CPSW instance type:

IOCTL parameters:

CPSW_STATS_IOCTL_GET_MACPORT_STATS 

Get MAC port statistics.

Gets the network statistics of the given MAC port number.

It's caller's responsibility to typecast the returned statistics structure according to the CPSW instance type:

IOCTL parameters:

CPSW_STATS_IOCTL_RESET_HOSTPORT_STATS 

Reset host port statistics.

Resets the network statistics counters of the host port.

IOCTL parameters:

  • inArgs: None
  • outArgs: None
CPSW_STATS_IOCTL_RESET_MACPORT_STATS 

Reset MAC port statistics.

Resets the network statistics counters of the given MAC port number.

IOCTL parameters:

CPSW_STATS_IOCTL_RESTORE_HOSTPORT_STATS 

Restore host port statistics.

Restores network port statistics counters of the host port with the counters passed to the IOCTL.

IOCTL parameters:

CPSW_STATS_IOCTL_RESTORE_MACPORT_STATS 

Restore MAC port statistics.

Restores network port statistics counters of the given MAC port with the counters passed to the IOCTL.

IOCTL parameters:

CPSW_STATS_IOCTL_PRINT_REGS 

Print statistics configuration registers.

IOCTL parameters:

  • inArgs: None
  • outArgs: None