![]() |
![]() |
Macros | |
#define | CPSW_ALE_PUBLIC_IOCTL(x) |
Helper macro to create IOCTL commands for ALE module. More... | |
#define | CPSW_ALE_NUM_PORTS ((uint32_t)9U) |
Number of switch ports in the subsystem. | |
#define | CPSW_ALE_NUM_MAC_PORTS (CPSW_ALE_NUM_PORTS - 1U) |
Number of external ports in the subsystem. | |
#define | CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR (4U) |
Maximum IP next header whitelist. | |
#define | CPSW_ALE_ALL_PORTS_MASK ((1U << CPSW_ALE_NUM_PORTS) - 1U) |
Mask value for the all the ports. | |
#define | CPSW_ALE_ALL_MACPORTS_MASK (((1U << CPSW_ALE_NUM_PORTS) - 1U) - 1U) |
Mask value for the all MAC ports. | |
#define | CPSW_ALE_HOST_PORT_MASK (ENET_BIT(0)) |
Mask value for the host port. | |
#define | CPSW_ALE_HOST_PORT_NUM (0U) |
Port number for the host port. | |
#define | CPSW_ALE_MACPORT_BASE (1U) |
Base index for MAC ports in ALE context. | |
#define | CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum) (CPSW_NORMALIZE_MACPORT(macPortNum) + CPSW_ALE_MACPORT_BASE) |
Macro to convert MAC port (Enet_MacPort) to ALE port number. | |
#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 (Enet_MacPort). | |
#define | CPSW_ALE_MACPORT_TO_PORTMASK(macPortNum) (ENET_BIT(CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum))) |
Macro to convert MAC port (Enet_MacPort) to ALE port mask. | |
#define | CPSW_ALE_MCAST_IGN_BITS_MAX (10U) |
Maximum number of ignore bits in multicast address. | |
#define | CPSW_ALE_PEAKBITRATE_DISABLE (0U) |
Disable peak bit rate. | |
#define | CPSW_ALE_COMMITBITRATE_DISABLE (0U) |
Disable commit bit rate. | |
#define | CPSW_ALE_THREADID_INVALID (~0U) |
ALE invalid thread id. | |
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. | |
#define | CPSW_ALE_POLICER_MATCH_PRIORITY (ENET_BIT(1U)) |
Enable classifier match with received packet priority. | |
#define | CPSW_ALE_POLICER_MATCH_OUI (ENET_BIT(2U)) |
Enable classifier match with OUI portion of source MAC address. | |
#define | CPSW_ALE_POLICER_MATCH_MACDST (ENET_BIT(3U)) |
Enable classifier match with MAC destination address entry with/without VLAN. | |
#define | CPSW_ALE_POLICER_MATCH_MACSRC (ENET_BIT(4U)) |
Enable classifier match with MAC source address entry with/without VLAN. | |
#define | CPSW_ALE_POLICER_MATCH_OVLAN (ENET_BIT(5U)) |
Enable classifier match with outer VLAN entry. | |
#define | CPSW_ALE_POLICER_MATCH_IVLAN (ENET_BIT(6U)) |
Enable classifier match with inner VLAN entry. | |
#define | CPSW_ALE_POLICER_MATCH_ETHERTYPE (ENET_BIT(7U)) |
Enable classifier match with EtherType. | |
#define | CPSW_ALE_POLICER_MATCH_IPSRC (ENET_BIT(8U)) |
Enable classifier match with IPv4/IPv6 source address. | |
#define | CPSW_ALE_POLICER_MATCH_IPDST (ENET_BIT(9U)) |
Enable classifier match with IPv4/IPv6 destination address. | |
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. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC) |
Delete MAC source address ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST (CPSW_ALE_POLICER_MATCH_MACDST) |
Delete MAC destination address ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN (CPSW_ALE_POLICER_MATCH_IVLAN) |
Delete InnerVLAN classifier associated ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN (CPSW_ALE_POLICER_MATCH_OVLAN) |
Delete OuterVLAN classifier associated ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE) |
Delete EtherType classifier associated ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC) |
Delete IPv4/IPv6 source address classifier associated ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST (CPSW_ALE_POLICER_MATCH_IPDST) |
Delete IPv4/IPv6 destination address classifier associated ALE table entry. | |
#define | CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL |
Delete all ale entries associated with classifier entries. More... | |
The CPSW ALE module provides low level access to switch configuration.
The following features are supported:
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL |
Delete all ale entries associated with classifier entries.
#define CPSW_ALE_PUBLIC_IOCTL | ( | x | ) |
Helper macro to create IOCTL commands for ALE module.
typedef struct CpswAle_Cfg_s CpswAle_Cfg |
ALE configuration.
This data structure contains configuration items related to the ALE_CONTROL register fields.
typedef enum CpswAle_FwdStateLevel_e CpswAle_FwdStateLevel |
Forward state level.
Indicates the port state(s) required for the received port on a destination address lookup in order for the multicast packet to be forwarded to the transmit port(s).
A transmit port must be in the Forwarding state in order to forward the packet. If the transmit port mask has multiple set bits then each forward decision is independent of the other transmit port(s) forward decision.
typedef enum CpswAle_PolicerNoMatchMode_e CpswAle_PolicerNoMatchMode |
Policing Match Mode.
This field determines what happens to packets that fail to hit any policing/classifier entry.
typedef enum CpswAle_PolicerYellowThres_e CpswAle_PolicerYellowThresh |
Yellow threshold value.
When set, enables a portion of the yellow packets to be dropped based on the "yellow_drop_en" enable.
typedef struct CpswAle_SetInterVlanCfgInArgs_s CpswAle_SetInterVlanCfgInArgs |
Output args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command.
InterVLAN routing configuration in ALE is associated with each policer/classifier entry.
Input args for CPSW_ALE_IOCTL_SET_POLICER_THREADCFG command.
Configuration to set the thread/flow id associated with a classifier.
Forward state level.
Indicates the port state(s) required for the received port on a destination address lookup in order for the multicast packet to be forwarded to the transmit port(s).
A transmit port must be in the Forwarding state in order to forward the packet. If the transmit port mask has multiple set bits then each forward decision is independent of the other transmit port(s) forward decision.
Enumerator | |
---|---|
CPSW_ALE_FWDSTLVL_FWD |
Forwarding |
CPSW_ALE_FWDSTLVL_BLK_FWD_LRN |
Blocking/Forwarding/Learning |
CPSW_ALE_FWDSTLVL_FWD_LRN |
Forwarding/Learning |
enum CpswAle_Ioctl_e |
ALE IOCTL commands.
Enumerator | |
---|---|
CPSW_ALE_IOCTL_DUMP_TABLE |
Dump ALE table entries. Print current entries in the ALE table. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_UCAST |
Add unicast address entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_MCAST |
Add multicast address entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_VLAN |
Add inner/outer VLAN entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_OUI |
Add OUI address entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_IPV4ADDR |
Add IPv4 address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_IPV6ADDR |
Add IPv6 address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_ADD_ETHERTYPE |
Add EtherType entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_LOOKUP_UCAST |
Return entry info for given unicast address. IOCTL params:
|
CPSW_ALE_IOCTL_LOOKUP_MCAST |
Return entry info for given multicast address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_LOOKUP_VLAN |
Return entry info for given VLAN id. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_ADDR |
Delete entry info for given unicast/multicast address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_VLAN |
Delete entry info for given VLAN id. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_OUI |
Delete entry info for given OUI address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_IPV4ADDR |
Delete entry info for given IPv4 address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_IPV6ADDR |
Delete entry info for given IPv6 address. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_ETHERTYPE |
Delete entry info for given EtherType. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_LEARNED_ENTRIES |
Delete all learned entries for a given port. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_REMOVE_ALL_ENTRIES |
Delete all entries. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_AGE_ALL_ENTRIES |
Age all entries now. IOCTL params:
Calling context:ISR/SWI/Task |
CPSW_ALE_IOCTL_SET_RX_FILTER |
Set host port RX filter. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_RX_FILTER |
Get current host port Rx filter. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_PORT_STATE |
Set port state. IOCTL params:
|
CPSW_ALE_IOCTL_GET_PORT_STATE |
Get port state. IOCTL params:
Calling context: ISR/SWI/Task |
CPSW_ALE_IOCTL_GET_PORT_MACADDR |
Get MAC addresses reachable on given port. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG |
Set default thread configuration. IOCTL params:
Calling context:Task |
CPSW_ALE_IOCTL_GET_DEFAULT_THREADCFG |
Get default thread configuration. IOCTL params:
Calling context:Task |
CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG |
Set port mirroring configuration. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_DISABLE_PORT_MIRROR |
Disable port mirror (match mirror, destination port mirror and source port mirror). IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_TRUNK_CFG |
Set port trunking configuration. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_OAMLPBK_CFG |
Enable OAM loopback for ports in the given port mask. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT |
Set broadcast/multicast rate limit configuration. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT |
Get configured broadcast/multicast rate limit configuration. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_DISABLE_BCAST_MCAST_LIMIT |
Disable broadcast/multicast rate limit. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_POLICER |
Set policer/classifier entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_POLICER |
Get policer/classifier entry info. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_DEL_POLICER |
Delete policer/classifier entry. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_DUMP_POLICER_ENTRIES |
Dump ALE policer entries. Print ALE policy entries. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_POLICER_STATS |
Get ALE policer statistics. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_POLICER_THREADCFG |
Set thread id for given classifier/policer. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_POLICER_GLOBAL_CFG |
Configure policer global settings. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_POLICER_GLOBAL_CFG |
Configure policer global settings. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_DEL_ALL_POLICER_THREADID |
Delete all policer entries and associated ALE entry with the given thread id. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_BLOCK_CLASSIFIER_HOSTPORT |
Blacklist classifier to host port. ALE supports feature to allow packets matching policer match criteria that is destined for host port to be dropped. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_SET_INTERVLAN_CFG |
Set InterVLAN routing configuration. IOCTL params:
Calling context: Task |
CPSW_ALE_IOCTL_GET_INTERVLAN_CFG |
Get InterVLAN routing configuration. IOCTL params:
Calling context: Task |
Policing Match Mode.
This field determines what happens to packets that fail to hit any policing/classifier entry.
Yellow threshold value.
When set, enables a portion of the yellow packets to be dropped based on the "yellow_drop_en" enable.
enum CpswAle_PortState_e |
ALE port state.
enum CpswAle_RxFilter_e |
Packet filtering type (cumulative).
Defines ALE table entry type.