![]() |
![]() |
Modules | |
ALE IOCTLS | |
ALE OPENPARAMS | |
ALE ENUMS | |
ALE Configuration Definitions | |
Macros | |
#define | CPSW_ALE_NUM_PORTS ((uint32_t)9) |
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 whilelist. | |
#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 (0x1U) |
Mask value for the host PORT. | |
#define | CPSW_ALE_HOST_PORT_NUM (0x0U) |
Port number for the host PORT. | |
#define | CPSW_ALE_MCAST_IGN_BITS_MAX (10U) |
Maximum number of ignore bits in multicast address. | |
#define | CPSW_ALE_MACADDR_NUM_OCTETS (CPSW_MAC_ADDR_LEN) |
Num of octets in MAC address. | |
#define | CPSW_ALE_OUIADDR_NUM_OCTETS (3U) |
Number of octets in OUI address. | |
#define | CPSW_ALE_IPV4ADDR_NUM_OCTETS (4U) |
Number of octets in IPV4 address. | |
#define | CPSW_ALE_IPV6ADDR_NUM_OCTETS (16U) |
Number of octets in IPV6 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. | |
#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 (Cpsw_MacPort) to ALE port number. | |
#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. | |
#define | CPSW_ALE_PUBLIC_IOCTL(x) (CPSW_IOCTL_ALE_BASE | CPSW_IOCTL_MIN(x)) |
Helper macro to create IOCTL commands for ALE submodule. | |
Typedefs | |
typedef enum CPSW_ALE_FWDSTLVL_TAG | CPSW_ALE_FWDSTLVL_E |
typedef enum CPSW_ALE_POLICER_NOMATCH_MODE_TAG | CPSW_ALE_POLICER_NOMATCH_MODE_E |
Policing Match Mode. More... | |
typedef enum CPSW_ALE_PORTSTATE_TAG | CPSW_ALE_PORTSTATE_E |
Defines ALE port states. | |
typedef enum CPSW_ALE_IPADDR_CLASSIFIER_TAG | CPSW_ALE_IPADDR_CLASSIFIER_E |
Defines IP address classifier type. | |
typedef enum CPSW_ALE_TBLENTRYTYPE_TAG | CPSW_ALE_TBLENTRYTYPE_E |
Defines IP address classifier type. | |
typedef enum CPSW_ALE_RXFILTER_TAG | CPSW_ALE_RXFILTER_E |
Packet Filtering Settings (cumulative) | |
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. | |
#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 ALE Driver provides low level access to switch configuration
Following features are supported:
#define CPSW_ALE_POLICER_MATCH_ETHERTYPE (CPSW_SET_BIT(7U)) |
Enable classifier match with Ethertype
#define CPSW_ALE_POLICER_MATCH_IPDST (CPSW_SET_BIT(9U)) |
Enable classifier match with IPv4/IPv6 destination address
#define CPSW_ALE_POLICER_MATCH_IPSRC (CPSW_SET_BIT(8U)) |
Enable classifier match with IPv4/IPv6 source address
#define CPSW_ALE_POLICER_MATCH_IVLAN (CPSW_SET_BIT(6U)) |
Enable classifier match with inner VLAN entry
#define CPSW_ALE_POLICER_MATCH_MACDST (CPSW_SET_BIT(3U)) |
Enable classifier match with MAC destination address entry with/without VLAN
#define CPSW_ALE_POLICER_MATCH_MACSRC (CPSW_SET_BIT(4U)) |
Enable classifier match with MAC source address entry with/without VLAN
#define CPSW_ALE_POLICER_MATCH_OUI (CPSW_SET_BIT(2U)) |
Enable classifier match with OUI portion of source MAC address
#define CPSW_ALE_POLICER_MATCH_OVLAN (CPSW_SET_BIT(5U)) |
Enable classifier match with outer VLAN entry
#define CPSW_ALE_POLICER_MATCH_PORT (CPSW_SET_BIT(0U)) |
Enable classifier match with PORT number
#define CPSW_ALE_POLICER_MATCH_PRIORITY (CPSW_SET_BIT(1U)) |
Enable classifier match with received packet priority
#define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL |
Delete all ale entries associated with classifier entries.
typedef enum CPSW_ALE_FWDSTLVL_TAG CPSW_ALE_FWDSTLVL_E |
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.
Policing Match Mode.
This field determines what happens to packets that fail to hit any policing/classifier entry.
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_FORWARDING |
Forwarding |
CPSW_ALE_FWDSTLVL_BLK_FWD_LRN |
Blocking/Forwarding/Learning |
CPSW_ALE_FWDSTLVL_FWD_LRN |
Forwarding/Learning |
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.
Defines ALE port states.
Packet Filtering Settings (cumulative)
Defines IP address classifier type.