This file contains the type definitions and helper macros for the CPSW Address Lookup Engine (ALE) module interface.
Go to the source code of this file.
Macros | |
#define | CPSW_ALE_PUBLIC_IOCTL(x) |
Helper macro to create IOCTL commands for ALE module. More... | |
#define | CPSW_ALE_PRIVATE_IOCTL(x) |
Helper macro to create IOCTL commands for ALE module. 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 whitelist. More... | |
#define | CPSW_ALE_ALL_PORTS_MASK ((uint32_t)((1U << CPSW_ALE_NUM_PORTS) - 1U)) |
Mask value for the all the ports. More... | |
#define | CPSW_ALE_ALL_MACPORTS_MASK ((uint32_t)(((1U << CPSW_ALE_NUM_PORTS) - 1U) - 1U)) |
Mask value for the all MAC ports. More... | |
#define | CPSW_ALE_HOST_PORT_MASK (ENET_BIT(0)) |
Mask value for the host port. More... | |
#define | CPSW_ALE_HOST_PORT_NUM (0U) |
Port number for the host port. More... | |
#define | CPSW_ALE_MACPORT_BASE (1U) |
Base index for MAC ports in ALE context. More... | |
#define | CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum) (ENET_MACPORT_NORM(macPortNum) + CPSW_ALE_MACPORT_BASE) |
Macro to convert MAC port (Enet_MacPort) to ALE port number. More... | |
#define | CPSW_ALE_ALEPORT_TO_MACPORT(alePortNum) (ENET_MACPORT_DENORM(alePortNum - CPSW_ALE_MACPORT_BASE)) |
Macro to convert ALE port number to MAC port number(Enet_MacPort) More... | |
#define | CPSW_ALE_MACPORT_TO_PORTMASK(macPort) (ENET_BIT(CPSW_ALE_MACPORT_TO_ALEPORT(macPort))) |
Macro to convert MAC port (Enet_MacPort) to ALE port mask. More... | |
#define | CPSW_ALE_MCAST_IGN_BITS_MAX (10U) |
Maximum number of ignore bits in multicast 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... | |
ALE configuration definitions. | |
ALE mode of operation configuration options. Each configuration option is represented by a bit in a configuration bitmask. | |
#define | CPSW_ALE_CFG_MODULE_EN (ENET_BIT(0U)) |
Enable ALE. More... | |
#define | CPSW_ALE_CFG_BYPASS_EN (ENET_BIT(1U)) |
Enable ALE bypass. More... | |
#define | CPSW_ALE_CFG_UNKNOWN_UCAST_FLOOD2HOST (ENET_BIT(2U)) |
Enable Unknown unicast packet flooding to host port. More... | |
ALE classifier match types. | |
Classifier match type supported by ALE. Each type is represented by a bit in a bitmask. To enable multiple classifiers in a single classifier entry, create bitmask ORing required classifier match type defines. | |
#define | CPSW_ALE_POLICER_MATCH_PORT (ENET_BIT(0U)) |
Enable classifier match with port number. More... | |
#define | CPSW_ALE_POLICER_MATCH_PRIORITY (ENET_BIT(1U)) |
Enable classifier match with received packet priority. More... | |
#define | CPSW_ALE_POLICER_MATCH_OUI (ENET_BIT(2U)) |
Enable classifier match with OUI portion of source MAC address. More... | |
#define | CPSW_ALE_POLICER_MATCH_MACDST (ENET_BIT(3U)) |
Enable classifier match with MAC destination address entry with/without VLAN. More... | |
#define | CPSW_ALE_POLICER_MATCH_MACSRC (ENET_BIT(4U)) |
Enable classifier match with MAC source address entry with/without VLAN. More... | |
#define | CPSW_ALE_POLICER_MATCH_OVLAN (ENET_BIT(5U)) |
Enable classifier match with outer VLAN entry. More... | |
#define | CPSW_ALE_POLICER_MATCH_IVLAN (ENET_BIT(6U)) |
Enable classifier match with inner VLAN entry. More... | |
#define | CPSW_ALE_POLICER_MATCH_ETHERTYPE (ENET_BIT(7U)) |
Enable classifier match with EtherType. More... | |
#define | CPSW_ALE_POLICER_MATCH_IPSRC (ENET_BIT(8U)) |
Enable classifier match with IPv4/IPv6 source address. More... | |
#define | CPSW_ALE_POLICER_MATCH_IPDST (ENET_BIT(9U)) |
Enable classifier match with IPv4/IPv6 destination address. More... | |
ALE classifier 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_PortVlanCfg |
Port default VLAN configuration. More... | |
Functions | |
void | CpswAle_initCfg (CpswAle_Cfg *aleCfg) |
Initialize CPSW ALE configuration parameters. More... | |