PDK API Guide for J721E
|
This file contains the structure definitions and function prototypes of the Address Lookup Engine (ALE).
Go to the source code of this file.
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... | |
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... | |
Structure for port default VLAN configuration.
typedef struct CpswAle_Obj_s* CpswAle_Handle |
Opaque handle for ALE State structure.
void CpswAle_initParams | ( | CpswAle_Config * | pALEConfig | ) |
Initialize ALE configuration parameters.
Initializes ALE configuratiobn parameters with default values
pALEConfig | [IN] ALE configuration to be initialized |
CpswAle_Handle CpswAle_open | ( | Cpsw_Type | cpswType, |
const CpswAle_Config * | pALEConfig | ||
) |
ALE open configuration.
Opens CPSW ALE.
cpswType | [IN] CPSW instance type |
pALEConfig | [IN] ALE config parameters |
int32_t CpswAle_close | ( | CpswAle_Handle | hAle | ) |
ALE close configuration.
Closes ALE.
hAle | [IN] CPSW ALE opaque handle |
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.
hAle | [IN] CPSW ALE opaque handle |
cmd | [IN] IOCTL command Id |
prms | [IN] IOCTL parameters |
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.
cpswType | [IN] CPSW instance type |
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
pALERestartConfig | [IN] ALE restart configuration parameters |