PDK API Guide for J721E
CPSW RM API

Introduction

Data Structures

struct  CpswRm_ResourceInfo
 CPSW RM Resource Information. More...
 
struct  CpswRm_ResourcePrms
 CPSW RM Resource parameters. More...
 
struct  CpswRm_IoctlPermissionEntry
 CPSW RM IOCTL permission entry. More...
 
struct  CpswRm_IoctlPermissionTable
 CPSW RM IOCTL permission table. More...
 
struct  CpswRm_MacAddressPool
 CPSW RM IOCTL permission table. More...
 
struct  CpswRm_AllocRxFlowOutArgs
 Output args for CPSW_RM_IOCTL_ALLOC_RX_FLOW IOCTL CMD. More...
 
struct  CpswRm_AllocMacAddrOutArgs
 Input args for CPSW_RM_IOCTL_ALLOC_MAC_ADDR IOCTL command. More...
 
struct  CpswRm_FreeTxChInArgs
 Input args for CPSW_RM_IOCTL_FREE_TX_CH_PEERID IOCTL command. More...
 
struct  CpswRm_FreeRxFlowInArgs
 Input args for CPSW_RM_IOCTL_FREE_RX_FLOW IOCTL command. More...
 
struct  CpswRm_FreeMacAddrInArgs
 Input args for CPSW_RM_IOCTL_FREE_MAC_ADDR IOCTL command. More...
 
struct  CpswRm_ResourceConfig
 CPSW driver resource configuration parameters. More...
 

Enumerations

enum  CpswRm_Ioctls_e {
  CPSW_RM_IOCTL_ALLOC_MAC_ADDR = CPSW_RM_PUBLIC_IOCTL(0U), CPSW_RM_IOCTL_ALLOC_RX_FLOW = CPSW_RM_PUBLIC_IOCTL(1U), CPSW_RM_IOCTL_ALLOC_TX_CH_PEERID = CPSW_RM_PUBLIC_IOCTL(2U), CPSW_RM_IOCTL_FREE_RX_FLOW = CPSW_RM_PUBLIC_IOCTL(3U),
  CPSW_RM_IOCTL_FREE_TX_CH_PEERID = CPSW_RM_PUBLIC_IOCTL(4U), CPSW_RM_IOCTL_FREE_MAC_ADDR = CPSW_RM_PUBLIC_IOCTL(5U)
}
 CPSW RM IOCTL commands. More...
 

Macros

#define CPSW_RM_PUBLIC_IOCTL(x)   (CPSW_IOCTL_RM_BASE | CPSW_IOCTL_MIN(x))
 Helper macro to create IOCTL commands for CPSW Resource Manager. More...
 

Resource Manager Error Codes

Error codes returned by RM functions

#define CPSW_RM_TXCHNUM_INVALID   (0xABCDABCDU)
 CPSW RM Invalid TX channel number. More...
 
#define CPSW_RM_RXFLOWIDX_INVALID   (0xABCDABCDU)
 CPSW RM Invalid RX flow id. More...
 
#define CPSW_RM_INVALIDCORE   (0x5562AEFEU)
 CPSW RM invalid core. More...
 
#define CPSW_RM_NUM_IOCTL_PERM_ENTRY_MAX   (16)
 Maximum number of entries for IOCTL permission. More...
 
#define CPSW_RM_NUM_MACADDRESS_MAX   (10)
 Maximum number of macaddress to be managed by RM. More...
 

CPSW RM driver opaque handle

Opaque handle typedefs for CPSW RM driver object.

typedef struct CpswRm_Obj_s * CpswRm_Handle
 Opaque structure to hold software state for CPSW RM. More...
 

Macro Definition Documentation

#define CPSW_RM_TXCHNUM_INVALID   (0xABCDABCDU)

CPSW RM Invalid TX channel number.

#define CPSW_RM_RXFLOWIDX_INVALID   (0xABCDABCDU)

CPSW RM Invalid RX flow id.

#define CPSW_RM_INVALIDCORE   (0x5562AEFEU)

CPSW RM invalid core.

#define CPSW_RM_NUM_IOCTL_PERM_ENTRY_MAX   (16)

Maximum number of entries for IOCTL permission.

#define CPSW_RM_NUM_MACADDRESS_MAX   (10)

Maximum number of macaddress to be managed by RM.

#define CPSW_RM_PUBLIC_IOCTL (   x)    (CPSW_IOCTL_RM_BASE | CPSW_IOCTL_MIN(x))

Helper macro to create IOCTL commands for CPSW Resource Manager.

Typedef Documentation

typedef struct CpswRm_Obj_s* CpswRm_Handle

Opaque structure to hold software state for CPSW RM.

Enumeration Type Documentation

CPSW RM IOCTL commands.

Enumerator
CPSW_RM_IOCTL_ALLOC_MAC_ADDR 

Alloc MAC Address.

IOCTL parameters:

CPSW_RM_IOCTL_ALLOC_RX_FLOW 

Alloc RX Flow.

IOCTL parameters:

CPSW_RM_IOCTL_ALLOC_TX_CH_PEERID 

Alloc TX CH Peer Id.

IOCTL parameters:

  • inArgs: uint32_t coreKey
  • outArgs: uint32_t txPSILThreadId
CPSW_RM_IOCTL_FREE_RX_FLOW 

Free RX flow.

IOCTL parameters:

CPSW_RM_IOCTL_FREE_TX_CH_PEERID 

Free TX channel peer Id.

IOCTL parameters:

CPSW_RM_IOCTL_FREE_MAC_ADDR 

Free MAC Address.

IOCTL parameters: