PDK API Guide for J721E
cpsw_ale.h File Reference

Introduction

This file contains the structure definitions and function prototypes of the Address Lookup Engine (ALE).

Go to the source code of this file.

Data Structures

struct  CpswAle_MacAddrInfo
 Structure holding MAC address and VLAN Id. More...
 
struct  CpswAle_Ipv4EntryInfo
 IPv4 ALE entry info. More...
 
struct  CpswAle_Ipv6EntryInfo
 IPv6 ALE entry info. More...
 
struct  CpswAle_McastEntryInfo
 ALE Multicast entry type info apart from MAC address. More...
 
struct  CpswAle_UcastEntryInfo
 ALE unicast entry type info apart from MAC address that can be set. More...
 
struct  CpswAle_IpAddrClassifierInfo
 ALE IP address classifier info. More...
 
struct  CpswAle_OuiEntryInfo
 ALE OUI entry info. More...
 
struct  CpswAle_EtherTypeEntryInfo
 ALE Ethertype entry info. More...
 
struct  CpswAle_VlanIdInfo
 ALE vlan identifier info. More...
 
struct  CpswAle_VlanEntryInfo
 ALE VLAN entry type info. More...
 
struct  CpswAle_MacSrcAddrClassifierInfo
 ALE classifier/policer match parameters for srcMacAddr. More...
 
struct  CpswAle_MacDstAddrClassifierInfo
 ALE classifier/policer match parameters for dstMacAddr. More...
 
struct  CpswAle_PolicerMatchParams
 ALE Classifier/Policer Match parameters. More...
 
struct  CpswAle_HostRxFilterParams
 Host port receive packet type filter params. More...
 
struct  CpswAle_MirrorMatchParams
 ALE port mirroring configration for mirroring based on packet match. More...
 
struct  CpswAle_PortBcastMcastRateLimitParams
 Structure for bcast/mcast bw limit configuration parameters. More...
 
struct  CpswAle_UnregulatedTrafficPolicer
 Structure containing unregulated traffic (No classifier hit) policing params. More...
 
struct  CpswAle_AddEntryOutArgs
 Output args for IOCTL cmds that add ALE entry, such as: CPSW_ALE_IOCTL_ADD_UNICAST, CPSW_ALE_IOCTL_ADD_VLAN, CPSW_ALE_IOCTL_ADD_ETHERTYPE, CPSW_ALE_IOCTL_ADD_IPV4ADDR, CPSW_ALE_IOCTL_ADD_IPV6ADDR, CPSW_ALE_IOCTL_ADD_OUI, CPSW_ALE_IOCTL_ADD_MULTICAST. More...
 
struct  CpswAle_SetUcastEntryInArgs
 Input args for CPSW_ALE_IOCTL_ADD_UNICAST IOCTL command. More...
 
struct  CpswAle_GetUcastEntryOutArgs
 Output args for CPSW_ALE_IOCTL_LOOKUP_UNICAST IOCTL command. More...
 
struct  CpswAle_SetMcastEntryInArgs
 Output args for CPSW_ALE_IOCTL_ADD_MULTICAST IOCTL command. More...
 
struct  CpswAle_GetMcastEntryInArgs
 Input args for CPSW_ALE_IOCTL_LOOKUP_MULTICAST IOCTL command. More...
 
struct  CpswAle_GetMcastEntryOutArgs
 Output args for CPSW_ALE_IOCTL_LOOKUP_MULTICAST IOCTL command. More...
 
struct  CpswAle_GetVlanEntryOutArgs
 Output args for CPSW_ALE_IOCTL_LOOKUP_MULTICAST IOCTL command. More...
 
struct  CpswAle_SetPolicerEntryInArgs
 Input args for CPSW_ALE_IOCTL_SET_POLICER command. More...
 
struct  CpswAle_SetPolicerEntryOutArgs
 Input args for CPSW_ALE_IOCTL_SET_POLICER command. More...
 
struct  CpswAle_GetPolicerEntryOutArgs
 Output args for CPSW_ALE_IOCTL_GET_POLICER command. More...
 
struct  CpswAle_DelPolicerEntryInArgs
 Input args for CPSW_ALE_IOCTL_DEL_POLICER IOCTL command. More...
 
struct  CpswAle_SetOAMLoopbackInArgs
 Input args for CPSW_ALE_IOCTL_SET_OAMLPBK_CFG IOCTL command. More...
 
struct  CpswAle_SetPortStateInArgs
 Input args for CPSW_ALE_IOCTL_SET_PORT_STATE IOCTL command. More...
 
struct  CpswAle_GetPortStateInArgs
 Input args for CPSW_ALE_IOCTL_GET_PORT_STATE IOCTL command. More...
 
struct  CpswAle_GetPortStateOutArgs
 Output args for CPSW_ALE_IOCTL_GET_PORT_STATE IOCTL command. More...
 
struct  CpswAle_SetPortMirroringConfigInArgs
 Input args for CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG command. More...
 
struct  CpswAle_SetTrunkConfigInArgs
 Input args for CPSW_ALE_IOCTL_SET_TRUNK_CFG command. More...
 
struct  CpswAle_SetDefaultThreadConfigInArgs
 Input args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG IOCTL command. More...
 
struct  CpswAle_SetInterVLANConfigInArgs
 Output args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG IOCTL command. More...
 
struct  CpswAle_GetPolicerStatsInArgs
 Input args for CPSW_ALE_IOCTL_GET_POLICER_STATS IOCTL command. More...
 
struct  CpswAle_GetPolicerStatsOutArgs
 Output args for CPSW_ALE_IOCTL_GET_POLICER_STATS IOCTL command. More...
 
struct  CpswAle_SetBcastMcastRateLimitInArgs
 Input args for CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT IOCTL command. More...
 
struct  CpswAle_GetBcastMcastRateLimitOutArgs
 Output args for CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT IOCTL command. More...
 
struct  CpswAle_GetPortMacAddrInArgs
 Input args for CPSW_ALE_IOCTL_GET_PORT_MACADDR IOCTL command. More...
 
struct  CpswAle_GetPortMacAddrOutArgs
 Output args for CPSW_ALE_IOCTL_GET_PORT_MACADDR IOCTL command. More...
 
struct  CpswAle_DelLearntEntriesInArgs
 Input args for CPSW_ALE_IOCTL_DEL_LEARNT_ENTRIES command. More...
 
struct  CpswAle_SetPolicerThreadConfigInArgs
 Input args for CPSW_ALE_IOCTL_SET_POLICER_THREADCFG command. More...
 
struct  CpswAle_PolicerGlobalConfig
 Structure for policer global configuration parameters. More...
 
struct  CpswAle_AgingConfig
 Structure for ALE aging time configuration. More...
 
struct  CpswAle_InitVlanConfig
 Structure for Init time VLAN configuration. More...
 
struct  CpswAle_PortMacModeConfig
 Structure for port MAC mode configuration. More...
 
struct  CpswAle_MacAuthConfig
 Structure for MAC authentication configuration. More...
 
struct  CpswAle_PortVlanSecurityConfig
 Structure for Port specific VLAN security configuration. More...
 
struct  CpswAle_PortLearningSecurityConfig
 Structure for Port specific auto learning security configuration. More...
 
struct  CpswAle_IPPktSecurityConfig
 Structure for IP packet security configuration. More...
 
struct  CpswAle_MalformedPktSecurityConfig
 Structure for malformed packet handling configuration. More...
 
struct  CpswAle_LearningSecurityConfig
 Structure for ALE module level auto learning security configuration. More...
 
struct  CpswAle_NetworkSecurityConfig
 High level structure with ALE network security configuration. More...
 
struct  CpswAle_PortConfig
 ALE init time port specific configuration params. More...
 
struct  CpswAle_Config
 ALE configuration. More...
 
struct  CpswAle_RestartConfig
 ALE restore configuration. More...
 

Macros

#define CPSW_ALE_NUM_PORTS   ((uint32_t)9)
 Number of switch ports in the subsystem. More...
 
#define CPSW_ALE_NUM_MAC_PORTS   (CPSW_ALE_NUM_PORTS - 1U)
 Number of external ports in the subsystem. More...
 
#define CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR   (4U)
 Maximum IP next header whilelist. More...
 
#define CPSW_ALE_ALL_PORTS_MASK   ((1U << CPSW_ALE_NUM_PORTS) - 1U)
 Mask value for the all the PORTS. More...
 
#define CPSW_ALE_ALL_MACPORTS_MASK   (((1U << CPSW_ALE_NUM_PORTS) - 1U) - 1U)
 Mask value for the all MAC PORTS. More...
 
#define CPSW_ALE_HOST_PORT_MASK   (0x1U)
 Mask value for the host PORT. More...
 
#define CPSW_ALE_HOST_PORT_NUM   (0x0U)
 Port number for the host PORT. More...
 
#define CPSW_ALE_MCAST_IGN_BITS_MAX   (10U)
 Maximum number of ignore bits in multicast address. More...
 
#define CPSW_ALE_MACADDR_NUM_OCTETS   (CPSW_MAC_ADDR_LEN)
 Num of octets in MAC address. More...
 
#define CPSW_ALE_OUIADDR_NUM_OCTETS   (3U)
 Number of octets in OUI address. More...
 
#define CPSW_ALE_IPV4ADDR_NUM_OCTETS   (4U)
 Number of octets in IPV4 address. More...
 
#define CPSW_ALE_IPV6ADDR_NUM_OCTETS   (16U)
 Number of octets in IPV6 address. More...
 
#define CPSW_ALE_PEAKBITRATE_DISABLE   (0U)
 Disable peak bit rate. More...
 
#define CPSW_ALE_COMMITBITRATE_DISABLE   (0U)
 Disable commit bit rate. More...
 
#define CPSW_ALE_THREADID_INVALID   (~0U)
 ALE invalid thread id. More...
 
#define CPSW_ALE_MACPORT_BASE   (1U)
 Base index for MAC ports in ALE context. More...
 
#define CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum)   (CPSW_NORMALIZE_MACPORT(macPortNum) + CPSW_ALE_MACPORT_BASE)
 Macro to convert MAC port (Cpsw_MacPort) to ALE port number. More...
 
#define CPSW_ALE_ALEPORT_TO_MACPORT(alePortNum)   (CPSW_DENORMALIZE_MACPORT(alePortNum - CPSW_ALE_MACPORT_BASE))
 Macro to convert ALE port number to MAC port number(Cpsw_MacPort) More...
 
#define CPSW_ALE_MACPORT_TO_PORTMASK(macPortNum)   CPSW_SET_BIT(CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum))
 Macro to convert MAC port (Cpsw_MacPort) to ALE port mask. More...
 
#define CPSW_ALE_PUBLIC_IOCTL(x)   (CPSW_IOCTL_ALE_BASE | CPSW_IOCTL_MIN(x))
 Helper macro to create IOCTL commands for ALE submodule. More...
 
#define CPSW_ALE_CONFIG_MASK_ALE_MODULE_ENABLE   (CPSW_SET_BIT(0))
 Enable ALE. More...
 
#define CPSW_ALE_CONFIG_MASK_ALE_BYPASS_ENABLE   (CPSW_SET_BIT(1))
 
#define CPSW_ALE_CONFIG_MASK_UNKNOWN_UNICAST_FLOOD2HOST   (CPSW_SET_BIT(2))
 
ALE classifier match types

Classifier match type supported by ALE. Each type is represented by a bit To enable multiple classifiers in a single classifier entry, create bitmask ORing required classifier match type defines

#define CPSW_ALE_POLICER_MATCH_PORT   (CPSW_SET_BIT(0U))
 
#define CPSW_ALE_POLICER_MATCH_PRIORITY   (CPSW_SET_BIT(1U))
 
#define CPSW_ALE_POLICER_MATCH_OUI   (CPSW_SET_BIT(2U))
 
#define CPSW_ALE_POLICER_MATCH_MACDST   (CPSW_SET_BIT(3U))
 
#define CPSW_ALE_POLICER_MATCH_MACSRC   (CPSW_SET_BIT(4U))
 
#define CPSW_ALE_POLICER_MATCH_OVLAN   (CPSW_SET_BIT(5U))
 
#define CPSW_ALE_POLICER_MATCH_IVLAN   (CPSW_SET_BIT(6U))
 
#define CPSW_ALE_POLICER_MATCH_ETHERTYPE   (CPSW_SET_BIT(7U))
 
#define CPSW_ALE_POLICER_MATCH_IPSRC   (CPSW_SET_BIT(8U))
 
#define CPSW_ALE_POLICER_MATCH_IPDST   (CPSW_SET_BIT(9U))
 
ALE classifier aleEntry delete bitmask

Associated with some classifier types are ALE table entries. When deleting the classifier entry application needs to specify by means of below bitmask if the ALE entry associated with the classifier should also be deleted. If not set the ALE entry will remain.

#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OUI   (CPSW_ALE_POLICER_MATCH_PRIORITY)
 Delete OUI ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC   (CPSW_ALE_POLICER_MATCH_MACSRC)
 Delete MAC source address ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST   (CPSW_ALE_POLICER_MATCH_MACDST)
 Delete MAC destination address ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN   (CPSW_ALE_POLICER_MATCH_IVLAN)
 Delete InnerVLAN classifier associated ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN   (CPSW_ALE_POLICER_MATCH_OVLAN)
 Delete OuterVLAN classifier associated ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE   (CPSW_ALE_POLICER_MATCH_ETHERTYPE)
 Delete EtherType classifier associated ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC   (CPSW_ALE_POLICER_MATCH_IPSRC)
 Delete IPv4/IPv6 source address classifier associated ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST   (CPSW_ALE_POLICER_MATCH_IPDST)
 Delete IPv4/IPv6 destination address classifier associated ALE table entry. More...
 
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL
 Delete all ale entries associated with classifier entries. More...
 

Typedefs

typedef CpswAle_VlanEntryInfo CpswAle_PortVlanConfig
 Structure for port default VLAN configuration. More...
 
typedef CpswAle_SetDefaultThreadConfigInArgs CpswAle_GetDefaultThreadConfigOutArgs
 Output args for CPSW_ALE_IOCTL_GET_DEFAULT_THREADCFG IOCTL command. More...
 
typedef CpswAle_GetPolicerEntryOutArgs CpswAle_SetInterVLANConfigOutArgs
 Output args for CPSW_ALE_IOCTL_SET_INTERVLAN_CFG IOCTL command. More...
 
typedef CpswAle_GetPolicerEntryOutArgs CpswAle_BlockClassifierHostPortOutArgs
 Output args for CPSW_ALE_IOCTL_BLOCK_CLASSIFIER_HOSTPORT IOCTL command. More...
 
typedef CpswAle_GetPolicerEntryOutArgs CpswAle_SetPolicerThreadConfigOutArgs
 Output args for CPSW_ALE_IOCTL_SET_POLICER_THREADCFG IOCTL command. More...
 
typedef struct CpswAle_PolicerGlobalConfig_s CpswAle_SetPolicerGlobalConfigInArgs
 Input args for CPSW_ALE_IOCTL_SET_POLICER_GLOBAL_CONFIG IOCTL command. More...
 
typedef struct CpswAle_PolicerGlobalConfig_s CpswAle_GetPolicerGlobalConfigOutArgs
 Output args for CPSW_ALE_IOCTL_GET_POLICER_GLOBAL_CONFIG IOCTL command. More...
 
typedef struct CpswAle_Obj_s * CpswAle_Handle
 Opaque handle for ALE State structure. More...
 

Enumerations

enum  CPSW_ALE_IOCTL_E {
  CPSW_ALE_IOCTL_ADD_UNICAST = CPSW_ALE_PUBLIC_IOCTL(0U), CPSW_ALE_IOCTL_ADD_MULTICAST = CPSW_ALE_PUBLIC_IOCTL(1U), CPSW_ALE_IOCTL_ADD_VLAN = CPSW_ALE_PUBLIC_IOCTL(2U), CPSW_ALE_IOCTL_ADD_OUI = CPSW_ALE_PUBLIC_IOCTL(3U),
  CPSW_ALE_IOCTL_ADD_IPV4ADDR = CPSW_ALE_PUBLIC_IOCTL(4U), CPSW_ALE_IOCTL_ADD_IPV6ADDR = CPSW_ALE_PUBLIC_IOCTL(5U), CPSW_ALE_IOCTL_ADD_ETHERTYPE = CPSW_ALE_PUBLIC_IOCTL(6U), CPSW_ALE_IOCTL_LOOKUP_UNICAST = CPSW_ALE_PUBLIC_IOCTL(7U),
  CPSW_ALE_IOCTL_LOOKUP_MULTICAST = CPSW_ALE_PUBLIC_IOCTL(8U), CPSW_ALE_IOCTL_LOOKUP_VLAN = CPSW_ALE_PUBLIC_IOCTL(9U), CPSW_ALE_IOCTL_REMOVE_ADDR = CPSW_ALE_PUBLIC_IOCTL(10U), CPSW_ALE_IOCTL_REMOVE_VLAN = CPSW_ALE_PUBLIC_IOCTL(11U),
  CPSW_ALE_IOCTL_REMOVE_OUI = CPSW_ALE_PUBLIC_IOCTL(12U), CPSW_ALE_IOCTL_REMOVE_IPV4ADDR = CPSW_ALE_PUBLIC_IOCTL(13U), CPSW_ALE_IOCTL_REMOVE_IPV6ADDR = CPSW_ALE_PUBLIC_IOCTL(14U), CPSW_ALE_IOCTL_REMOVE_ETHERTYPE = CPSW_ALE_PUBLIC_IOCTL(15U),
  CPSW_ALE_IOCTL_SET_POLICER = CPSW_ALE_PUBLIC_IOCTL(16U), CPSW_ALE_IOCTL_GET_POLICER = CPSW_ALE_PUBLIC_IOCTL(17U), CPSW_ALE_IOCTL_DEL_POLICER = CPSW_ALE_PUBLIC_IOCTL(18U), CPSW_ALE_IOCTL_DUMP_TABLE = CPSW_ALE_PUBLIC_IOCTL(19U),
  CPSW_ALE_IOCTL_DUMP_POLICER_ENTRIES = CPSW_ALE_PUBLIC_IOCTL(20U), CPSW_ALE_IOCTL_GET_POLICER_STATS = CPSW_ALE_PUBLIC_IOCTL(21U), CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG = CPSW_ALE_PUBLIC_IOCTL(22U), CPSW_ALE_IOCTL_SET_TRUNK_CFG = CPSW_ALE_PUBLIC_IOCTL(23U),
  CPSW_ALE_IOCTL_SET_OAMLPBK_CFG = CPSW_ALE_PUBLIC_IOCTL(24U), CPSW_ALE_IOCTL_DEL_ALL_ENTRIES = CPSW_ALE_PUBLIC_IOCTL(25U), CPSW_ALE_IOCTL_SET_RX_FILTER = CPSW_ALE_PUBLIC_IOCTL(26U), CPSW_ALE_IOCTL_GET_RX_FILTER = CPSW_ALE_PUBLIC_IOCTL(27U),
  CPSW_ALE_IOCTL_SET_PORT_STATE = CPSW_ALE_PUBLIC_IOCTL(28U), CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT = CPSW_ALE_PUBLIC_IOCTL(29U), CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG = CPSW_ALE_PUBLIC_IOCTL(30U), CPSW_ALE_IOCTL_AGE_ALE_ENTRIES = CPSW_ALE_PUBLIC_IOCTL(31U),
  CPSW_ALE_IOCTL_SET_INTERVLAN_CFG = CPSW_ALE_PUBLIC_IOCTL(32U), CPSW_ALE_IOCTL_GET_INTERVLAN_CFG = CPSW_ALE_PUBLIC_IOCTL(33U), CPSW_ALE_IOCTL_DEL_LEARNT_ENTRIES = CPSW_ALE_PUBLIC_IOCTL(34U), CPSW_ALE_IOCTL_SET_POLICER_THREADCFG = CPSW_ALE_PUBLIC_IOCTL(35U),
  CPSW_ALE_IOCTL_GET_PORT_MACADDR = CPSW_ALE_PUBLIC_IOCTL(36U), CPSW_ALE_IOCTL_DISABLE_PORT_MIRROR = CPSW_ALE_PUBLIC_IOCTL(37U), CPSW_ALE_IOCTL_DISABLE_BCAST_MCAST_LIMIT = CPSW_ALE_PUBLIC_IOCTL(38U), CPSW_ALE_IOCTL_SET_POLICER_GLOBAL_CONFIG = CPSW_ALE_PUBLIC_IOCTL(39U),
  CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT = CPSW_ALE_PUBLIC_IOCTL(40U), CPSW_ALE_IOCTL_GET_PORT_STATE = CPSW_ALE_PUBLIC_IOCTL(41U), CPSW_ALE_IOCTL_GET_DEFAULT_THREADCFG = CPSW_ALE_PUBLIC_IOCTL(42U), CPSW_ALE_IOCTL_PRINT_REGS = CPSW_ALE_PUBLIC_IOCTL(43U),
  CPSW_ALE_IOCTL_GET_POLICER_GLOBAL_CONFIG = CPSW_ALE_PUBLIC_IOCTL(44U), CPSW_ALE_IOCTL_DEL_ALL_POLICER_THREADID = CPSW_ALE_PUBLIC_IOCTL(45U), CPSW_ALE_IOCTL_BLOCK_CLASSIFIER_HOSTPORT = CPSW_ALE_PUBLIC_IOCTL(46U)
}
 The ALE module IOCTL enums. More...
 
enum  CPSW_ALE_FWDSTLVL_E { CPSW_ALE_FWDSTLVL_FORWARDING = 0, CPSW_ALE_FWDSTLVL_BLK_FWD_LRN = 1, CPSW_ALE_FWDSTLVL_FWD_LRN = 2 }
 
enum  CPSW_ALE_POLICER_YELLOWTHRESH_E {
  CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_100, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_50, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_33, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_25,
  CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_20, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_17, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_14, CPSW_ALE_POLICER_YELLOWTHRESH_DROP_PERCENT_13
}
 Yellow Threshold Value. More...
 
enum  CPSW_ALE_POLICER_NOMATCH_MODE_E { CPSW_ALE_POLICER_NOMATCH_MODE_GREEN, CPSW_ALE_POLICER_NOMATCH_MODE_YELLOW, CPSW_ALE_POLICER_NOMATCH_MODE_RED, CPSW_ALE_POLICER_NOMATCH_MODE_UNREGULATED_TRAFFIC_POLICER }
 Policing Match Mode. More...
 
enum  CPSW_ALE_PORTSTATE_E { CPSW_ALE_PORTSTATE_DISABLED = 0, CPSW_ALE_PORTSTATE_BLOCKED, CPSW_ALE_PORTSTATE_LEARN, CPSW_ALE_PORTSTATE_FORWARD }
 Defines ALE port states. More...
 
enum  CPSW_ALE_IPADDR_CLASSIFIER_E { CPSW_ALE_IPADDR_CLASSIFIER_IPV4 = 0x00U, CPSW_ALE_IPADDR_CLASSIFIER_IPV6 = 0x01U }
 Defines IP address classifier type. More...
 
enum  CPSW_ALE_TBLENTRYTYPE_E {
  CPSW_ALE_TBLENTRYTYPE_ADDR, CPSW_ALE_TBLENTRYTYPE_VLAN, CPSW_ALE_TBLENTRYTYPE_ETHERTYPE, CPSW_ALE_TBLENTRYTYPE_OUI,
  CPSW_ALE_TBLENTRYTYPE_IPV4, CPSW_ALE_TBLENTRYTYPE_IPV6
}
 Defines IP address classifier type. More...
 
enum  CPSW_ALE_RXFILTER_E {
  CPSW_ALE_RXFILTER_NOTHING = 0x0000U, CPSW_ALE_RXFILTER_DIRECT = 0x0001U, CPSW_ALE_RXFILTER_BROADCAST = 0x0002U, CPSW_ALE_RXFILTER_MULTICAST = 0x0003U,
  CPSW_ALE_RXFILTER_ALLMULTICAST = 0x0004U, CPSW_ALE_RXFILTER_ALL = 0x0005U
}
 Packet Filtering Settings (cumulative) More...
 

Functions

void CpswAle_initParams (CpswAle_Config *pALEConfig)
 Initialize ALE configuration parameters. More...
 
CpswAle_Handle CpswAle_open (Cpsw_Type cpswType, const CpswAle_Config *pALEConfig)
 ALE open configuration. More...
 
int32_t CpswAle_close (CpswAle_Handle hAle)
 ALE close configuration. More...
 
int32_t CpswAle_ioctl (CpswAle_Handle hAle, CPSW_ALE_IOCTL_E cmd, Cpsw_IoctlPrms *prms)
 ALE IOCTL configuration. More...
 
CpswAle_Handle CpswAle_getHandle (Cpsw_Type cpswType)
 Get ALE handle to already opened ALE instance. More...
 
CpswAle_Handle CpswAle_restart (CpswAle_RestartConfig *pALERestartConfig)
 Restore ALE submodule driver after domain reboot. More...
 

Typedef Documentation

Structure for port default VLAN configuration.

typedef struct CpswAle_Obj_s* CpswAle_Handle

Opaque handle for ALE State structure.

Function Documentation

void CpswAle_initParams ( CpswAle_Config pALEConfig)

Initialize ALE configuration parameters.

Initializes ALE configuratiobn parameters with default values

Parameters
pALEConfig[IN] ALE configuration to be initialized
CpswAle_Handle CpswAle_open ( Cpsw_Type  cpswType,
const CpswAle_Config pALEConfig 
)

ALE open configuration.

Opens CPSW ALE.

Parameters
cpswType[IN] CPSW instance type
pALEConfig[IN] ALE config parameters
Returns
CPSW ALE opaque handle
int32_t CpswAle_close ( CpswAle_Handle  hAle)

ALE close configuration.

Closes ALE.

Parameters
hAle[IN] CPSW ALE opaque handle
Returns
Cpsw_ErrorCodes
int32_t CpswAle_ioctl ( CpswAle_Handle  hAle,
CPSW_ALE_IOCTL_E  cmd,
Cpsw_IoctlPrms prms 
)

ALE IOCTL configuration.

Issues a control operation on the CPSW ALE submodule.

Parameters
hAle[IN] CPSW ALE opaque handle
cmd[IN] IOCTL command Id
prms[IN] IOCTL parameters
Returns
Cpsw_ErrorCodes
CpswAle_Handle CpswAle_getHandle ( Cpsw_Type  cpswType)

Get ALE handle to already opened ALE instance.

Gets the ALE opaque handle to an already opened ALE instance.

Parameters
cpswType[IN] CPSW instance type
Returns
CPSW ALE opaque handle
CpswAle_Handle CpswAle_restart ( CpswAle_RestartConfig pALERestartConfig)

Restore ALE submodule driver after domain reboot.

ALE API to restore ALE software state after Main domain or watch dog reboot. The ALE register contents are retained due to CPSW IP reset isolation feature. The host port is disengaged and all software context is lost

Parameters
pALERestartConfig[IN] ALE restart configuration parameters
Returns
CPSW ALE opaque handle