PDK API Guide for J721E
cpsw_ale.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
65 #ifndef CPSW_ALE_H_
66 #define CPSW_ALE_H_
67 
68 /* ========================================================================== */
69 /* Include Files */
70 /* ========================================================================== */
71 
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 /* ========================================================================== */
79 /* Macros */
80 /* ========================================================================== */
81 
83 #define CPSW_ALE_PUBLIC_IOCTL(x) (ENET_IOCTL_TYPE_PUBLIC | \
84  ENET_IOCTL_FDB_BASE | \
85  ENET_IOCTL_PER_CPSW | \
86  ENET_IOCTL_MIN(x))
87 
89 #define CPSW_ALE_NUM_PORTS (9U)
90 
92 #define CPSW_ALE_NUM_MAC_PORTS (CPSW_ALE_NUM_PORTS - 1U)
93 
95 #define CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR (4U)
96 
98 #define CPSW_ALE_ALL_PORTS_MASK ((uint32_t)((1U << CPSW_ALE_NUM_PORTS) - 1U))
99 
101 #define CPSW_ALE_ALL_MACPORTS_MASK ((uint32_t)(((1U << CPSW_ALE_NUM_PORTS) - 1U) - 1U))
102 
104 #define CPSW_ALE_HOST_PORT_MASK (ENET_BIT(0))
105 
107 #define CPSW_ALE_HOST_PORT_NUM (0U)
108 
110 #define CPSW_ALE_MACPORT_BASE (1U)
111 
113 #define CPSW_ALE_MACPORT_TO_ALEPORT(macPortNum) (ENET_MACPORT_NORM(macPortNum) + CPSW_ALE_MACPORT_BASE)
114 
116 #define CPSW_ALE_ALEPORT_TO_MACPORT(alePortNum) (ENET_MACPORT_DENORM(alePortNum - CPSW_ALE_MACPORT_BASE))
117 
119 #define CPSW_ALE_MACPORT_TO_PORTMASK(macPort) (ENET_BIT(CPSW_ALE_MACPORT_TO_ALEPORT(macPort)))
120 
122 #define CPSW_ALE_MCAST_IGN_BITS_MAX (10U)
123 
125 #define CPSW_ALE_PEAKBITRATE_DISABLE (0U)
126 
128 #define CPSW_ALE_COMMITBITRATE_DISABLE (0U)
129 
131 #define CPSW_ALE_THREADID_INVALID (~0U)
132 
143 #define CPSW_ALE_CFG_MODULE_EN (ENET_BIT(0U))
144 
146 #define CPSW_ALE_CFG_BYPASS_EN (ENET_BIT(1U))
147 
149 #define CPSW_ALE_CFG_UNKNOWN_UCAST_FLOOD2HOST (ENET_BIT(2U))
150 
164 #define CPSW_ALE_POLICER_MATCH_PORT (ENET_BIT(0U))
165 
167 #define CPSW_ALE_POLICER_MATCH_PRIORITY (ENET_BIT(1U))
168 
170 #define CPSW_ALE_POLICER_MATCH_OUI (ENET_BIT(2U))
171 
173 #define CPSW_ALE_POLICER_MATCH_MACDST (ENET_BIT(3U))
174 
176 #define CPSW_ALE_POLICER_MATCH_MACSRC (ENET_BIT(4U))
177 
179 #define CPSW_ALE_POLICER_MATCH_OVLAN (ENET_BIT(5U))
180 
182 #define CPSW_ALE_POLICER_MATCH_IVLAN (ENET_BIT(6U))
183 
185 #define CPSW_ALE_POLICER_MATCH_ETHERTYPE (ENET_BIT(7U))
186 
188 #define CPSW_ALE_POLICER_MATCH_IPSRC (ENET_BIT(8U))
189 
191 #define CPSW_ALE_POLICER_MATCH_IPDST (ENET_BIT(9U))
192 
207 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OUI (CPSW_ALE_POLICER_MATCH_PRIORITY)
208 
210 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC)
211 
213 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST (CPSW_ALE_POLICER_MATCH_MACDST)
214 
216 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN (CPSW_ALE_POLICER_MATCH_IVLAN)
217 
219 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN (CPSW_ALE_POLICER_MATCH_OVLAN)
220 
222 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE)
223 
225 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC)
226 
228 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST (CPSW_ALE_POLICER_MATCH_IPDST)
229 
231 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL (CPSW_ALE_POLICER_TABLEENTRY_DELETE_OUI | \
232  CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC | \
233  CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST | \
234  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN | \
235  CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN | \
236  CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE | \
237  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC | \
238  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST)
239 
242 /* ========================================================================== */
243 /* Structures and Enums */
244 /* ========================================================================== */
245 
249 typedef enum CpswAle_Ioctl_e
250 {
263 
274 
285 
296 
306 
317 
328 
339 
349 
360 
371 
382 
393 
404 
415 
426 
437 
450 
461 
472 
483 
494 
504 
515 
526 
537 
548 
559 
571 
582 
593 
604 
615 
626 
637 
648 
659 
672 
683 
694 
704 
715 
727 
741 
752 
763 
777 
791 } CpswAle_Ioctl;
792 
796 typedef enum CpswAle_PortState_e
797 {
800 
803 
807 
811 
823 typedef enum CpswAle_FwdStateLevel_e
824 {
827 
830 
834 
838 typedef enum CpswAle_RxFilter_e
839 {
842 
845 
848 
851 
854 
858 
862 typedef struct CpswAle_MacAddrInfo_s
863 {
866 
868  uint32_t vlanId;
870 
874 typedef struct CpswAle_UcastEntryInfo_s
875 {
878  uint32_t portNum;
879 
882  bool blocked;
883 
887  bool secure;
888 
891  bool super;
892 
894  bool ageable;
895 
897  bool trunk;
899 
903 typedef struct CpswAle_SetUcastEntryInArgs_s
904 {
907 
911 
915 typedef struct CpswAle_GetUcastEntryOutArgs_s
916 {
919 
922  bool touched;
923 
925  uint32_t aleEntryIdx;
927 
931 typedef struct CpswAle_McastEntryInfo_s
932 {
935  bool super;
936 
939 
941  uint32_t portMask;
942 
945  uint32_t numIgnBits;
947 
951 typedef struct CpswAle_SetMcastEntryInArgs_s
952 {
955 
959 
963 typedef struct CpswAle_GetMcastEntryInArgs_s
964 {
967 
969  uint32_t numIgnBits;
971 
975 typedef struct CpswAle_GetMcastEntryOutArgs_s
976 {
979 
981  uint32_t aleEntryIdx;
983 
987 typedef struct CpswAle_VlanIdInfo_s
988 {
990  uint32_t vlanId;
991 
995 
999 typedef struct CpswAle_VlanEntryInfo_s
1000 {
1003 
1005  uint32_t vlanMemberList;
1006 
1010 
1014 
1018 
1023  uint32_t noLearnMask;
1024 
1028 
1032 
1037 
1041 typedef struct CpswAle_GetVlanEntryOutArgs_s
1042 {
1044  uint32_t vlanMemberList;
1045 
1048 
1051 
1054 
1056  uint32_t noLearnMask;
1057 
1060 
1063 
1066 
1068  uint32_t aleEntryIdx;
1070 
1074 typedef struct CpswAle_OuiEntryInfo_s
1075 {
1077  uint8_t ouiAddr[ENET_OUI_ADDR_LEN];
1079 
1083 typedef struct CpswAle_IPv4EntryInfo_s
1084 {
1086  uint8_t ipv4Addr[ENET_IPv4_ADDR_LEN];
1087 
1091 
1095 typedef struct CpswAle_IPv6EntryInfo_s
1096 {
1098  uint8_t ipv6Addr[ENET_IPv6_ADDR_LEN];
1099 
1103 
1107 typedef struct CpswAle_SetPortStateInArgs_s
1108 {
1110  uint32_t portNum;
1111 
1115 
1119 typedef struct CpswAle_GetPortMacAddrInArgs_s
1120 {
1122  uint32_t portNum;
1123 
1126 
1128  uint32_t addrCnt;
1130 
1134 typedef struct CpswAle_GetPortMacAddrOutArgs_s
1135 {
1139 
1142  uint32_t addrCnt;
1143 
1145  uint32_t totalAddrCnt;
1147 
1152 typedef struct CpswAle_DefaultThreadCfg_s
1153 {
1160 
1162  uint32_t threadId;
1163 
1166 
1170 
1174 typedef enum CpswAle_TableEntryType_s
1175 {
1178 
1181 
1184 
1187 
1190 
1194 
1199 typedef struct CpswAle_MacAddrClassifierInfo_s
1200 {
1203 
1205  uint32_t portNum;
1207 
1211 typedef struct CpswAle_MirrorMatchParams_s
1212 {
1215 
1219 
1223 
1227 
1231 
1235 
1238  uint16_t etherType;
1240 
1244 typedef struct CpswAle_PortMirroringCfg_s
1245 {
1249  bool srcEn;
1250 
1254  bool dstEnEn;
1255 
1259  bool matchEn;
1260 
1262  uint32_t dstPortNum;
1263 
1265  uint32_t toPortNum;
1266 
1271 
1273  uint32_t srcPortNumMask;
1275 
1279 typedef struct CpswAle_TrunkCfg_s
1280 {
1282  uint32_t trunkId;
1283 
1285  uint32_t numPorts;
1286 
1288  uint32_t trunkPortIdx[CPSW_ALE_NUM_PORTS];
1289 
1291  uint32_t trunkHashBase;
1292 
1296  bool dstIPEn;
1297 
1301  bool srcIPEn;
1302 
1308 
1313 
1317  bool srcEn;
1318 
1322  bool dstEnEn;
1324 
1328 typedef struct CpswAle_PortBcastMcastRateLimitParams_s
1329 {
1332  uint32_t portNum;
1333 
1337 
1341 
1344 
1348 
1352 typedef struct CpswAle_SetBcastMcastRateLimitInArgs_s
1353 {
1356 
1359  uint32_t numPorts;
1360 
1364 
1368 typedef struct CpswAle_GetBcastMcastRateLimitOutArgs_s
1369 {
1372 
1375 
1378  uint32_t numPorts;
1379 
1383 
1387 typedef enum CpswAle_IpAddrClassifierType_e
1388 {
1391 
1395 
1399 typedef struct CpswAle_IpAddrClassifierInfo_s
1400 {
1403 
1406 
1410 
1414 typedef struct CpswAle_PolicerMatchParams_s
1415 {
1419 
1423  uint32_t portNum;
1424 
1427 
1431  uint32_t priority;
1432 
1437 
1442 
1447 
1451  uint32_t ivlanId;
1452 
1456  uint32_t ovlanId;
1457 
1461  uint16_t etherType;
1462 
1467 
1473 
1477 typedef struct CpswAle_SetPolicerEntryInArgs_s
1478 {
1481 
1484 
1486  uint32_t threadId;
1487 
1490 
1494 
1498 typedef struct CpswAle_SetPolicerEntryOutArgs_s
1499 {
1503  uint32_t ouiAleEntryIdx;
1504 
1509 
1514 
1519 
1524 
1529 
1534 
1539 
1543 
1550 typedef struct CpswAle_PolicerEntryOutArgs_s
1551 {
1555 
1559  uint32_t port;
1560 
1565 
1569  uint32_t priority;
1570 
1574  uint32_t ouiAleEntryIdx;
1575 
1580 
1585 
1590 
1595 
1600 
1605 
1610 
1613 
1616  uint32_t threadId;
1617 
1620 
1623 
1626 
1629 
1635  uint32_t egressOpcode;
1636 
1640 
1643  uint32_t egressTrunkIdx;
1644 
1647  uint32_t dstPortMask;
1649 
1653 typedef struct CpswAle_DelPolicerEntryInArgs_s
1654 {
1657 
1661  uint32_t aleEntryMask;
1663 
1667 typedef struct CpswAle_GetPolicerStatsInArgs_s
1668 {
1671 
1675 
1679 typedef struct CpswAle_GetPolicerStatsOutArgs_s
1680 {
1685 
1690 
1696 
1702 typedef struct CpswAle_SetPolicerThreadCfgInArgs_s
1703 {
1706 
1709 
1711  uint32_t threadId;
1713 
1720 typedef enum CpswAle_PolicerYellowThresh_e
1721 {
1724 
1727 
1730 
1733 
1736 
1739 
1742 
1746 
1753 typedef enum CpswAle_PolicerNoMatchMode_e
1754 {
1757 
1760 
1763 
1767 
1771 typedef struct CpswAle_UnregulatedTrafficPolicer_s
1772 {
1775 
1779 
1783 typedef struct CpswAle_PolicerGlobalCfg_s
1784 {
1788 
1792 
1795 
1798 
1801 
1807 
1814 typedef struct CpswAle_SetInterVlanCfgInArgs_s
1815 {
1818 
1821 
1823  uint32_t dstPortMask;
1824 
1827  uint32_t routeIdx;
1828 
1834  uint32_t egressTrunkIdx;
1836 
1840 typedef struct CpswAle_AgingCfg_s
1841 {
1844 
1848 
1852 typedef struct CpswAle_InitVlanCfg_s
1853 {
1856 
1859 
1862 
1865 
1868 
1871 
1874 
1878 
1882 typedef struct CpswAle_MalformedPktSecurityCfg_s
1883 {
1886 
1892 
1896 typedef struct CpswAle_IPPktSecurityCfg_s
1897 {
1900 
1904 
1908 
1910  uint8_t ipNxtHdrWhitelist[CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR];
1912 
1916 typedef struct CpswAle_MacAuthCfg_s
1917 {
1920 
1925  uint32_t macAuthDisMask;
1927 
1931 typedef struct CpswAle_NetworkSecurityCfg_s
1932 {
1940 
1945 
1948 
1951 
1955 
1959 typedef struct CpswAle_PortLearningSecurityCfg_s
1960 {
1962  bool noLearn;
1963 
1968 
1972 typedef struct CpswAle_PortVlanSecurityCfg_s
1973 {
1976 
1979 
1983 
1989 
1993 typedef struct CpswAle_PortMacModeCfg_s
1994 {
2002 
2014 
2019 
2023 typedef struct CpswAle_PortCfg_s
2024 {
2027 
2030 
2033 
2036 } CpswAle_PortCfg;
2037 
2044 typedef struct CpswAle_Cfg_s
2045 {
2047  uint32_t modeFlags;
2048 
2051 
2054 
2057 
2060 
2063 } CpswAle_Cfg;
2064 
2065 /* ========================================================================== */
2066 /* Global Variables Declarations */
2067 /* ========================================================================== */
2068 
2069 /* None */
2070 
2071 /* ========================================================================== */
2072 /* Function Declarations */
2073 /* ========================================================================== */
2074 
2080 void CpswAle_initCfg(CpswAle_Cfg *aleCfg);
2081 
2082 /* ========================================================================== */
2083 /* Deprecated Function Declarations */
2084 /* ========================================================================== */
2085 
2086 /* None */
2087 
2088 /* ========================================================================== */
2089 /* Static Function Definitions */
2090 /* ========================================================================== */
2091 
2092 /* None */
2093 
2094 #ifdef __cplusplus
2095 }
2096 #endif
2097 
2098 #endif /* CPSW_ALE_H_ */
2099 
bool dropDoubleVlan
Definition: cpsw_ale.h:1987
Delete entry info for given OUI address.
Definition: cpsw_ale.h:403
Definition: cpsw_ale.h:844
Output args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1679
CpswAle_PortState portState
Definition: cpsw_ale.h:1113
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1518
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1218
uint32_t agingPeriodInMs
Definition: cpsw_ale.h:1846
uint32_t portNum
Definition: cpsw_ale.h:1423
Set host port RX filter.
Definition: cpsw_ale.h:482
CpswAle_MacAuthCfg macAuthCfg
Definition: cpsw_ale.h:1953
bool limitIPNxtHdr
Definition: cpsw_ale.h:1062
Definition: cpsw_ale.h:802
CpswAle_NetworkSecurityCfg nwSecCfg
Definition: cpsw_ale.h:2059
Enable promiscuous mode on a MAC port.
Definition: cpsw_ale.h:776
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:1222
uint32_t portNum
Definition: cpsw_ale.h:1205
uint32_t noLearnMask
Definition: cpsw_ale.h:1056
Input args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command and out args for CPSW_ALE_IOCTL_GET_DEFAU...
Definition: cpsw_ale.h:1152
Unicast entry type info apart from MAC address that can be set.
Definition: cpsw_ale.h:874
Output args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command.
Definition: cpsw_ale.h:1814
Input args for CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT command.
Definition: cpsw_ale.h:1352
Add unicast address entry.
Definition: cpsw_ale.h:273
uint32_t portMask
Definition: cpsw_ale.h:941
bool autoAgingEn
Definition: cpsw_ale.h:1843
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1523
Disable promiscuous mode on a MAC port.
Definition: cpsw_ale.h:790
bool macOnlyCafEn
Definition: cpsw_ale.h:2001
Definition: cpsw_ale.h:841
Delete entry info for given VLAN id.
Definition: cpsw_ale.h:392
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1230
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:1053
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:1017
CpswAle_PolicerYellowThresh
Yellow threshold value.
Definition: cpsw_ale.h:1720
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1355
CpswAle_FwdStateLevel fwdState
Definition: cpsw_ale.h:938
Delete policer/classifier entry.
Definition: cpsw_ale.h:658
ALE configuration.
Definition: cpsw_ale.h:2044
bool yellowDropEn
Definition: cpsw_ale.h:1791
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1503
Definition: cpsw_ale.h:829
CpswAle_PortLearningSecurityCfg learningCfg
Definition: cpsw_ale.h:2026
ALE aging time configuration.
Definition: cpsw_ale.h:1840
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1489
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:1041
uint32_t unknownRegMcastFloodMask
Definition: cpsw_ale.h:1870
Output args for CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT IOCTL command.
Definition: cpsw_ale.h:1368
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1101
CpswAle_MacAddrInfo * addrs
Definition: cpsw_ale.h:1125
bool trunk
Definition: cpsw_ale.h:897
uint32_t ipNxtHdrWhitelistCnt
Definition: cpsw_ale.h:1907
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1405
uint32_t addrCnt
Definition: cpsw_ale.h:1128
Input args for CPSW_ALE_IOCTL_ADD_MCAST command.
Definition: cpsw_ale.h:951
uint32_t aleEntryIdx
Definition: cpsw_ale.h:925
Disable broadcast/multicast rate limit.
Definition: cpsw_ale.h:625
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:954
CpswAle_IpAddrClassifierInfo srcIpInfo
Definition: cpsw_ale.h:1466
bool authModeEn
Definition: cpsw_ale.h:1919
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1234
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1513
Definition: cpsw_ale.h:856
bool dropUntagged
Definition: cpsw_ale.h:1978
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1374
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:966
uint32_t trunkId
Definition: cpsw_ale.h:1282
CpswAle_IpAddrClassifierType ipAddrType
Definition: cpsw_ale.h:1402
uint32_t noLearnMask
Definition: cpsw_ale.h:1023
Add IPv6 address.
Definition: cpsw_ale.h:327
Definition: cpsw_ale.h:1756
uint32_t vlanId
Definition: cpsw_ale.h:990
bool autoLearnWithVlan
Definition: cpsw_ale.h:1861
uint32_t toPortNum
Definition: cpsw_ale.h:1265
bool ttlCheckEn
Definition: cpsw_ale.h:1820
bool srcIPEn
Definition: cpsw_ale.h:1301
uint32_t egressOpcode
Definition: cpsw_ale.h:1635
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1508
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:1009
Add IPv4 address.
Definition: cpsw_ale.h:316
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1589
CpswAle_PortMacModeCfg macModeCfg
Definition: cpsw_ale.h:2032
Get policer/classifier entry info.
Definition: cpsw_ale.h:647
uint32_t dstPortMask
Definition: cpsw_ale.h:1823
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1226
Unregulated traffic (no classifier hit) policing params.
Definition: cpsw_ale.h:1771
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:1202
uint32_t vlanMemberList
Definition: cpsw_ale.h:1005
uint32_t portNum
Definition: cpsw_ale.h:878
uint32_t threadId
Definition: cpsw_ale.h:1711
uint32_t priority
Definition: cpsw_ale.h:1431
Definition: cpsw_ale.h:850
Delete all learned entries for a given port.
Definition: cpsw_ale.h:449
uint16_t etherType
Definition: cpsw_ale.h:1461
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1774
CpswAle_PolicerNoMatchMode policerNoMatchMode
Definition: cpsw_ale.h:1800
Definition: cpsw_ale.h:832
bool dstEnEn
Definition: cpsw_ale.h:1322
VLAN id info.
Definition: cpsw_ale.h:987
#define ENET_MAC_ADDR_LEN
MAC address length in bytes/octets.
Definition: enet_types.h:153
bool disallowIPFrag
Definition: cpsw_ale.h:1035
CpswAle_PolicerMatchParams policerInfo
Definition: cpsw_ale.h:1670
bool rateLimitEn
Definition: cpsw_ale.h:1371
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1705
Definition: cpsw_ale.h:809
uint32_t portNum
Definition: cpsw_ale.h:1122
bool mcastRateLimitForPortEn
Definition: cpsw_ale.h:1340
Enet_VlanTagType tagType
Definition: cpsw_ale.h:993
Definition: cpsw_ale.h:799
bool secure
Definition: cpsw_ale.h:887
CpswAle_IPPktSecurityCfg ipPktCfg
Definition: cpsw_ale.h:1950
ALE init time port specific configuration params.
Definition: cpsw_ale.h:2023
Definition: cpsw_ale.h:806
Definition: cpsw_ale.h:1390
Definition: cpsw_ale.h:1180
bool threadIdEn
Definition: cpsw_ale.h:1708
#define CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR
Maximum IP next header whitelist.
Definition: cpsw_ale.h:95
Policer global configuration parameters.
Definition: cpsw_ale.h:1783
CpswAle_FwdStateLevel
Forward state level.
Definition: cpsw_ale.h:823
CpswAle_UnregulatedTrafficPolicer noMatchPolicer
Definition: cpsw_ale.h:1805
bool portIsTrunk
Definition: cpsw_ale.h:1426
CpswAle_TableEntryType
Defines ALE table entry type.
Definition: cpsw_ale.h:1174
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1533
CpswAle_Ioctl
ALE IOCTL commands.
Definition: cpsw_ale.h:249
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:1013
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1579
bool dropDualVlan
Definition: cpsw_ale.h:1982
bool bcastRateLimitForPortEn
Definition: cpsw_ale.h:1336
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1089
bool super
Definition: cpsw_ale.h:935
uint32_t ivlanId
Definition: cpsw_ale.h:1451
bool egressOpEn
Definition: cpsw_ale.h:1628
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1584
uint32_t routeIdx
Definition: cpsw_ale.h:1827
Definition: cpsw_ale.h:1762
Input args for CPSW_ALE_IOCTL_ADD_UCAST command.
Definition: cpsw_ale.h:903
Get MAC addresses reachable on given port.
Definition: cpsw_ale.h:525
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1574
Definition: cpsw_ale.h:1393
IPv6 entry info.
Definition: cpsw_ale.h:1095
CpswAle_PortState
ALE port state.
Definition: cpsw_ale.h:796
bool hostOuiNoMatchDeny
Definition: cpsw_ale.h:1939
Port specific auto learning security configuration.
Definition: cpsw_ale.h:1959
Input args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1667
uint32_t unknownVlanMemberListMask
Definition: cpsw_ale.h:1876
Delete all policer entries and associated ALE entry with the given thread id.
Definition: cpsw_ale.h:726
Multicast entry type info apart from MAC address.
Definition: cpsw_ale.h:931
Definition: cpsw_ale.h:1177
bool macPortDfltThreadDis
Definition: cpsw_ale.h:1168
Return entry info for given VLAN id.
Definition: cpsw_ale.h:370
#define CPSW_ALE_PUBLIC_IOCTL(x)
Helper macro to create IOCTL commands for ALE module.
Definition: cpsw_ale.h:83
bool aleVlanAwareMode
Definition: cpsw_ale.h:1855
Disable port mirror (match mirror, destination port mirror and source port mirror).
Definition: cpsw_ale.h:570
uint32_t numIgnBits
Definition: cpsw_ale.h:969
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1817
uint32_t aleEntryIdx
Definition: cpsw_ale.h:1068
ALE IP address classifier info.
Definition: cpsw_ale.h:1399
Set policer/classifier entry.
Definition: cpsw_ale.h:636
Get port state.
Definition: cpsw_ale.h:514
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:918
IPv4 entry info.
Definition: cpsw_ale.h:1083
uint32_t totalAddrCnt
Definition: cpsw_ale.h:1145
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1408
Output args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1134
CpswAle_TableEntryType entryType
Definition: cpsw_ale.h:1214
Get configured broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:614
bool srcEn
Definition: cpsw_ale.h:1249
Output args for CPSW_ALE_IOCTL_LOOKUP_UCAST command.
Definition: cpsw_ale.h:915
CpswAle_VlanEntryInfo CpswAle_PortVlanCfg
Port default VLAN configuration.
Definition: cpsw_ale.h:2018
bool vidIngressCheck
Definition: cpsw_ale.h:1059
Input args for CPSW_ALE_IOCTL_DEL_POLICER IOCTL command.
Definition: cpsw_ale.h:1653
#define CPSW_ALE_NUM_PORTS
Number of switch ports in the subsystem.
Definition: cpsw_ale.h:89
CpswAle_PortVlanCfg pvidCfg
Definition: cpsw_ale.h:2035
Return entry info for given multicast address.
Definition: cpsw_ale.h:359
IP packet security configuration.
Definition: cpsw_ale.h:1896
bool srcEn
Definition: cpsw_ale.h:1317
bool unknownVlanNoLearn
Definition: cpsw_ale.h:1864
bool badLenPktDropEn
Definition: cpsw_ale.h:1890
Set broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:603
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1777
Input args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1119
Enable OAM loopback for ports in the given port mask.
Definition: cpsw_ale.h:592
uint32_t portNum
Definition: cpsw_ale.h:1110
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1594
bool dfltThreadEn
Definition: cpsw_ale.h:1159
Dump ALE table entries.
Definition: cpsw_ale.h:262
MAC address and VLAN Id.
Definition: cpsw_ale.h:862
This file contains the type definitions and helper macros for the Enet Forwarding Database (FDB) modu...
Configure policer global settings.
Definition: cpsw_ale.h:714
CpswAle_IpAddrClassifierInfo dstIpInfo
Definition: cpsw_ale.h:1471
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1604
uint32_t srcPortNumMask
Definition: cpsw_ale.h:1273
Age all entries now.
Definition: cpsw_ale.h:471
OUI entry info.
Definition: cpsw_ale.h:1074
CpswAle_RxFilter
Packet filtering type (cumulative).
Definition: cpsw_ale.h:838
uint64_t addr
Definition: csl_udmap_tr.h:214
bool policerHit
Definition: cpsw_ale.h:1684
CpswAle_PolicerGlobalCfg policerGlobalCfg
Definition: cpsw_ale.h:2050
bool vidIngressCheck
Definition: cpsw_ale.h:1975
bool cpswVlanAwareMode
Definition: cpsw_ale.h:1858
Init time VLAN configuration.
Definition: cpsw_ale.h:1852
uint32_t unknownForceUntaggedEgressMask
Definition: cpsw_ale.h:1867
#define ENET_OUI_ADDR_LEN
Organization Unique Id (OUI) address length in bytes/octets.
Definition: enet_types.h:156
bool portIsTrunk
Definition: cpsw_ale.h:1564
Definition: cpsw_ale.h:847
bool dstEnEn
Definition: cpsw_ale.h:1254
ALE classifier/policer match parameters for source or destination MAC address.
Definition: cpsw_ale.h:1199
bool policerYellowHit
Definition: cpsw_ale.h:1694
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1538
bool vidIngressCheck
Definition: cpsw_ale.h:1027
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1446
Get ALE policer statistics.
Definition: cpsw_ale.h:682
uint32_t mcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1346
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:1002
Get current host port Rx filter.
Definition: cpsw_ale.h:493
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1622
bool super
Definition: cpsw_ale.h:891
VLAN entry type info.
Definition: cpsw_ale.h:999
Return entry info for given unicast address.
Definition: cpsw_ale.h:348
Add multicast address entry.
Definition: cpsw_ale.h:284
uint32_t etherTypeAleEntryIdx
Definition: cpsw_ale.h:1599
uint32_t dstPortMask
Definition: cpsw_ale.h:1647
MAC authentication configuration.
Definition: cpsw_ale.h:1916
Get InterVLAN routing configuration.
Definition: cpsw_ale.h:762
uint32_t priority
Definition: cpsw_ale.h:1569
uint32_t macAuthDisMask
Definition: cpsw_ale.h:1925
bool macOnlyEn
Definition: cpsw_ale.h:2012
bool priorityOrEn
Definition: cpsw_ale.h:1165
bool vid0ModeEn
Definition: cpsw_ale.h:1944
Delete entry info for given EtherType.
Definition: cpsw_ale.h:436
Get default thread configuration.
Definition: cpsw_ale.h:547
CpswAle_MacAddrInfo * addrs
Definition: cpsw_ale.h:1138
bool srcMcastDropDis
Definition: cpsw_ale.h:1885
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1609
bool threadIdEn
Definition: cpsw_ale.h:1612
uint32_t numIgnBits
Definition: cpsw_ale.h:945
Add EtherType entry.
Definition: cpsw_ale.h:338
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1643
Definition: cpsw_ale.h:1186
uint32_t portNum
Definition: cpsw_ale.h:1332
bool clearStats
Definition: cpsw_ale.h:1673
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1625
Input args for CPSW_ALE_IOCTL_SET_TRUNK_CFG command.
Definition: cpsw_ale.h:1279
Output args for CPSW_ALE_IOCTL_GET_POLICER, CPSW_ALE_IOCTL_SET_POLICER_THREADCFG, CPSW_ALE_IOCTL_BLOC...
Definition: cpsw_ale.h:1550
bool threadIdEn
Definition: cpsw_ale.h:1483
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:978
bool ageable
Definition: cpsw_ale.h:894
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1541
bool disallowIPFrag
Definition: cpsw_ale.h:1065
CpswAle_PolicerYellowThresh yellowThresh
Definition: cpsw_ale.h:1797
ALE port mirroring configuration for mirroring based on packet match.
Definition: cpsw_ale.h:1211
bool noLearn
Definition: cpsw_ale.h:1962
bool enablePri
Definition: cpsw_ale.h:1312
uint32_t addrCnt
Definition: cpsw_ale.h:1142
CpswAle_PortVlanSecurityCfg vlanCfg
Definition: cpsw_ale.h:2029
bool touched
Definition: cpsw_ale.h:922
Set InterVLAN routing configuration.
Definition: cpsw_ale.h:751
#define ENET_IPv4_ADDR_LEN
IPv4 address length in bytes/octets.
Definition: enet_types.h:159
bool innerVlanEn
Definition: cpsw_ale.h:1307
CpswAle_MalformedPktSecurityCfg malformedPktCfg
Definition: cpsw_ale.h:1947
uint32_t aleEntryMask
Definition: cpsw_ale.h:1661
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:906
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1492
bool dstIPEn
Definition: cpsw_ale.h:1296
Broadcast/multicast bandwidth limit configuration parameters.
Definition: cpsw_ale.h:1328
Port MAC mode configuration.
Definition: cpsw_ale.h:1993
uint32_t threadId
Definition: cpsw_ale.h:1616
Set port mirroring configuration.
Definition: cpsw_ale.h:558
Input args for CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG command.
Definition: cpsw_ale.h:1244
Dump ALE policer entries.
Definition: cpsw_ale.h:671
Set default thread configuration.
Definition: cpsw_ale.h:536
uint32_t policerMatchEnMask
Definition: cpsw_ale.h:1418
CpswAle_PolicerNoMatchMode
Policing Match Mode.
Definition: cpsw_ale.h:1753
Definition: cpsw_ale.h:826
Configure policer global settings. IOCTL params:
Definition: cpsw_ale.h:703
Input args for CPSW_ALE_IOCTL_SET_POLICER_THREADCFG command.
Definition: cpsw_ale.h:1702
Definition: cpsw_ale.h:1183
Malformed packet handling configuration.
Definition: cpsw_ale.h:1882
bool dfltNoFragEn
Definition: cpsw_ale.h:1899
uint32_t trunkHashBase
Definition: cpsw_ale.h:1291
uint32_t numPorts
Definition: cpsw_ale.h:1359
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1498
uint32_t threadId
Definition: cpsw_ale.h:1162
CpswAle_AgingCfg agingCfg
Definition: cpsw_ale.h:2053
uint32_t port
Definition: cpsw_ale.h:1559
Input args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:963
Delete all entries.
Definition: cpsw_ale.h:460
uint32_t threadId
Definition: cpsw_ale.h:1486
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:975
uint32_t numPorts
Definition: cpsw_ale.h:1285
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1477
Add inner/outer VLAN entry.
Definition: cpsw_ale.h:295
Set thread id for given classifier/policer.
Definition: cpsw_ale.h:693
Definition: cpsw_ale.h:1189
ALE classifier/policer match parameters.
Definition: cpsw_ale.h:1414
bool ttlCheckEn
Definition: cpsw_ale.h:1639
bool redDropEn
Definition: cpsw_ale.h:1794
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:1047
uint32_t etherTypeAleEntryIdx
Definition: cpsw_ale.h:1528
Add OUI address entry. IOCTL params:
Definition: cpsw_ale.h:305
bool policerRedHit
Definition: cpsw_ale.h:1689
Delete entry info for given IPv6 address.
Definition: cpsw_ale.h:425
bool dfltNxtHdrWhitelistEn
Definition: cpsw_ale.h:1903
Definition: cpsw_ale.h:1192
uint32_t aleEntryIdx
Definition: cpsw_ale.h:981
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1834
bool noSaUpdateEn
Definition: cpsw_ale.h:1966
uint32_t dstPortNum
Definition: cpsw_ale.h:1262
Enet_VlanTagType
Double tagging VLAN type.
Definition: enet_types.h:369
Set port state.
Definition: cpsw_ale.h:503
bool matchEn
Definition: cpsw_ale.h:1259
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:1050
Definition: cpsw_ale.h:1759
CpswAle_MirrorMatchParams matchParams
Definition: cpsw_ale.h:1270
Set port trunking configuration.
Definition: cpsw_ale.h:581
uint32_t vlanMemberList
Definition: cpsw_ale.h:1044
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1436
bool policingEn
Definition: cpsw_ale.h:1787
uint32_t policerMatchEnMask
Definition: cpsw_ale.h:1554
uint32_t modeFlags
Definition: cpsw_ale.h:2047
uint32_t bcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1343
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:909
bool blocked
Definition: cpsw_ale.h:882
uint32_t vlanId
Definition: cpsw_ale.h:868
CpswAle_InitVlanCfg vlanCfg
Definition: cpsw_ale.h:2056
Input args for CPSW_ALE_IOCTL_SET_PORT_STATE command.
Definition: cpsw_ale.h:1107
CpswAle_MacAddrClassifierInfo srcMacAddrInfo
Definition: cpsw_ale.h:1441
Delete entry info for given unicast/multicast address.
Definition: cpsw_ale.h:381
uint32_t ovlanId
Definition: cpsw_ale.h:1456
Delete entry info for given IPv4 address.
Definition: cpsw_ale.h:414
Blacklist classifier to host port.
Definition: cpsw_ale.h:740
High level structure with ALE network security configuration.
Definition: cpsw_ale.h:1931
uint32_t unknownUnregMcastFloodMask
Definition: cpsw_ale.h:1873
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1480
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1656
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1619
CpswAle_IpAddrClassifierType
IP address classifier type.
Definition: cpsw_ale.h:1387
uint32_t numPorts
Definition: cpsw_ale.h:1378
Port specific VLAN security configuration.
Definition: cpsw_ale.h:1972
uint16_t etherType
Definition: cpsw_ale.h:1238
#define ENET_IPv6_ADDR_LEN
IPv6 address length in bytes/octets.
Definition: enet_types.h:162
Definition: cpsw_ale.h:853
void CpswAle_initCfg(CpswAle_Cfg *aleCfg)
Initialize CPSW ALE configuration parameters.
bool limitIPNxtHdr
Definition: cpsw_ale.h:1031
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:957