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 
152 #define CPSW_ALE_CFG_MULTIHOST (ENET_BIT(3U))
153 
167 #define CPSW_ALE_POLICER_MATCH_PORT (ENET_BIT(0U))
168 
170 #define CPSW_ALE_POLICER_MATCH_PRIORITY (ENET_BIT(1U))
171 
173 #define CPSW_ALE_POLICER_MATCH_OUI (ENET_BIT(2U))
174 
176 #define CPSW_ALE_POLICER_MATCH_MACDST (ENET_BIT(3U))
177 
179 #define CPSW_ALE_POLICER_MATCH_MACSRC (ENET_BIT(4U))
180 
182 #define CPSW_ALE_POLICER_MATCH_OVLAN (ENET_BIT(5U))
183 
185 #define CPSW_ALE_POLICER_MATCH_IVLAN (ENET_BIT(6U))
186 
188 #define CPSW_ALE_POLICER_MATCH_ETHERTYPE (ENET_BIT(7U))
189 
191 #define CPSW_ALE_POLICER_MATCH_IPSRC (ENET_BIT(8U))
192 
194 #define CPSW_ALE_POLICER_MATCH_IPDST (ENET_BIT(9U))
195 
210 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OUI (CPSW_ALE_POLICER_MATCH_PRIORITY)
211 
213 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC)
214 
216 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST (CPSW_ALE_POLICER_MATCH_MACDST)
217 
219 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN (CPSW_ALE_POLICER_MATCH_IVLAN)
220 
222 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN (CPSW_ALE_POLICER_MATCH_OVLAN)
223 
225 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE)
226 
228 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC)
229 
231 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST (CPSW_ALE_POLICER_MATCH_IPDST)
232 
234 #define CPSW_ALE_POLICER_TABLEENTRY_DELETE_ALL (CPSW_ALE_POLICER_TABLEENTRY_DELETE_OUI | \
235  CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC | \
236  CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST | \
237  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN | \
238  CPSW_ALE_POLICER_TABLEENTRY_DELETE_OVLAN | \
239  CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE | \
240  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC | \
241  CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST)
242 
245 /* ========================================================================== */
246 /* Structures and Enums */
247 /* ========================================================================== */
248 
252 typedef enum CpswAle_Ioctl_e
253 {
266 
277 
288 
299 
309 
320 
331 
342 
352 
363 
374 
385 
396 
407 
418 
429 
440 
453 
464 
475 
486 
497 
507 
518 
529 
540 
551 
562 
574 
585 
596 
607 
618 
629 
640 
651 
662 
675 
686 
697 
707 
718 
730 
744 
755 
766 
780 
794 } CpswAle_Ioctl;
795 
799 typedef enum CpswAle_PortState_e
800 {
803 
806 
810 
814 
826 typedef enum CpswAle_FwdStateLevel_e
827 {
830 
833 
837 
841 typedef enum CpswAle_RxFilter_e
842 {
845 
848 
851 
854 
857 
861 
865 typedef struct CpswAle_MacAddrInfo_s
866 {
869 
871  uint32_t vlanId;
873 
877 typedef struct CpswAle_UcastEntryInfo_s
878 {
881  uint32_t portNum;
882 
885  bool blocked;
886 
890  bool secure;
891 
894  bool super;
895 
897  bool ageable;
898 
900  bool trunk;
902 
906 typedef struct CpswAle_SetUcastEntryInArgs_s
907 {
910 
914 
918 typedef struct CpswAle_GetUcastEntryOutArgs_s
919 {
922 
925  bool touched;
926 
928  uint32_t aleEntryIdx;
930 
934 typedef struct CpswAle_McastEntryInfo_s
935 {
938  bool super;
939 
942 
944  uint32_t portMask;
945 
948  uint32_t numIgnBits;
950 
954 typedef struct CpswAle_SetMcastEntryInArgs_s
955 {
958 
962 
966 typedef struct CpswAle_GetMcastEntryInArgs_s
967 {
970 
972  uint32_t numIgnBits;
974 
978 typedef struct CpswAle_GetMcastEntryOutArgs_s
979 {
982 
984  uint32_t aleEntryIdx;
986 
990 typedef struct CpswAle_VlanIdInfo_s
991 {
993  uint32_t vlanId;
994 
998 
1002 typedef struct CpswAle_VlanEntryInfo_s
1003 {
1006 
1008  uint32_t vlanMemberList;
1009 
1013 
1017 
1021 
1026  uint32_t noLearnMask;
1027 
1031 
1035 
1040 
1044 typedef struct CpswAle_GetVlanEntryOutArgs_s
1045 {
1047  uint32_t vlanMemberList;
1048 
1051 
1054 
1057 
1059  uint32_t noLearnMask;
1060 
1063 
1066 
1069 
1071  uint32_t aleEntryIdx;
1073 
1077 typedef struct CpswAle_OuiEntryInfo_s
1078 {
1080  uint8_t ouiAddr[ENET_OUI_ADDR_LEN];
1082 
1086 typedef struct CpswAle_IPv4EntryInfo_s
1087 {
1089  uint8_t ipv4Addr[ENET_IPv4_ADDR_LEN];
1090 
1094 
1098 typedef struct CpswAle_IPv6EntryInfo_s
1099 {
1101  uint8_t ipv6Addr[ENET_IPv6_ADDR_LEN];
1102 
1106 
1110 typedef struct CpswAle_SetPortStateInArgs_s
1111 {
1113  uint32_t portNum;
1114 
1118 
1122 typedef struct CpswAle_GetPortMacAddrInArgs_s
1123 {
1125  uint32_t portNum;
1126 
1129 
1131  uint32_t addrCnt;
1133 
1137 typedef struct CpswAle_GetPortMacAddrOutArgs_s
1138 {
1142 
1145  uint32_t addrCnt;
1146 
1148  uint32_t totalAddrCnt;
1150 
1155 typedef struct CpswAle_DefaultThreadCfg_s
1156 {
1163 
1165  uint32_t threadId;
1166 
1169 
1173 
1177 typedef enum CpswAle_TableEntryType_s
1178 {
1181 
1184 
1187 
1190 
1193 
1197 
1202 typedef struct CpswAle_MacAddrClassifierInfo_s
1203 {
1206 
1208  uint32_t portNum;
1210 
1214 typedef struct CpswAle_MirrorMatchParams_s
1215 {
1218 
1222 
1226 
1230 
1234 
1238 
1241  uint16_t etherType;
1243 
1247 typedef struct CpswAle_PortMirroringCfg_s
1248 {
1252  bool srcEn;
1253 
1257  bool dstEnEn;
1258 
1262  bool matchEn;
1263 
1265  uint32_t dstPortNum;
1266 
1268  uint32_t toPortNum;
1269 
1274 
1276  uint32_t srcPortNumMask;
1278 
1282 typedef struct CpswAle_TrunkCfg_s
1283 {
1285  uint32_t trunkId;
1286 
1288  uint32_t numPorts;
1289 
1291  uint32_t trunkPortIdx[CPSW_ALE_NUM_PORTS];
1292 
1294  uint32_t trunkHashBase;
1295 
1299  bool dstIPEn;
1300 
1304  bool srcIPEn;
1305 
1311 
1316 
1320  bool srcEn;
1321 
1325  bool dstEnEn;
1327 
1331 typedef struct CpswAle_PortBcastMcastRateLimitParams_s
1332 {
1335  uint32_t portNum;
1336 
1340 
1344 
1347 
1351 
1355 typedef struct CpswAle_SetBcastMcastRateLimitInArgs_s
1356 {
1359 
1362  uint32_t numPorts;
1363 
1367 
1371 typedef struct CpswAle_GetBcastMcastRateLimitOutArgs_s
1372 {
1375 
1378 
1381  uint32_t numPorts;
1382 
1386 
1390 typedef enum CpswAle_IpAddrClassifierType_e
1391 {
1394 
1398 
1402 typedef struct CpswAle_IpAddrClassifierInfo_s
1403 {
1406 
1409 
1413 
1417 typedef struct CpswAle_PolicerMatchParams_s
1418 {
1422 
1426  uint32_t portNum;
1427 
1430 
1434  uint32_t priority;
1435 
1440 
1445 
1450 
1454  uint32_t ivlanId;
1455 
1459  uint32_t ovlanId;
1460 
1464  uint16_t etherType;
1465 
1470 
1476 
1480 typedef struct CpswAle_SetPolicerEntryInArgs_s
1481 {
1484 
1487 
1489  uint32_t threadId;
1490 
1493 
1497 
1501 typedef struct CpswAle_SetPolicerEntryOutArgs_s
1502 {
1506  uint32_t ouiAleEntryIdx;
1507 
1512 
1517 
1522 
1527 
1532 
1537 
1542 
1546 
1553 typedef struct CpswAle_PolicerEntryOutArgs_s
1554 {
1558 
1562  uint32_t port;
1563 
1568 
1572  uint32_t priority;
1573 
1577  uint32_t ouiAleEntryIdx;
1578 
1583 
1588 
1593 
1598 
1603 
1608 
1613 
1616 
1619  uint32_t threadId;
1620 
1623 
1626 
1629 
1632 
1638  uint32_t egressOpcode;
1639 
1643 
1646  uint32_t egressTrunkIdx;
1647 
1650  uint32_t dstPortMask;
1652 
1656 typedef struct CpswAle_DelPolicerEntryInArgs_s
1657 {
1660 
1664  uint32_t aleEntryMask;
1666 
1670 typedef struct CpswAle_GetPolicerStatsInArgs_s
1671 {
1674 
1678 
1682 typedef struct CpswAle_GetPolicerStatsOutArgs_s
1683 {
1688 
1693 
1699 
1705 typedef struct CpswAle_SetPolicerThreadCfgInArgs_s
1706 {
1709 
1712 
1714  uint32_t threadId;
1716 
1723 typedef enum CpswAle_PolicerYellowThresh_e
1724 {
1727 
1730 
1733 
1736 
1739 
1742 
1745 
1749 
1756 typedef enum CpswAle_PolicerNoMatchMode_e
1757 {
1760 
1763 
1766 
1770 
1774 typedef struct CpswAle_UnregulatedTrafficPolicer_s
1775 {
1778 
1782 
1786 typedef struct CpswAle_PolicerGlobalCfg_s
1787 {
1791 
1795 
1798 
1801 
1804 
1810 
1817 typedef struct CpswAle_SetInterVlanCfgInArgs_s
1818 {
1821 
1824 
1826  uint32_t dstPortMask;
1827 
1830  uint32_t routeIdx;
1831 
1837  uint32_t egressTrunkIdx;
1839 
1843 typedef struct CpswAle_AgingCfg_s
1844 {
1847 
1851 
1855 typedef struct CpswAle_InitVlanCfg_s
1856 {
1859 
1862 
1865 
1868 
1871 
1874 
1877 
1881 
1885 typedef struct CpswAle_MalformedPktSecurityCfg_s
1886 {
1889 
1895 
1899 typedef struct CpswAle_IPPktSecurityCfg_s
1900 {
1903 
1907 
1911 
1913  uint8_t ipNxtHdrWhitelist[CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR];
1915 
1919 typedef struct CpswAle_MacAuthCfg_s
1920 {
1923 
1928  uint32_t macAuthDisMask;
1930 
1934 typedef struct CpswAle_NetworkSecurityCfg_s
1935 {
1943 
1948 
1951 
1954 
1958 
1962 typedef struct CpswAle_PortLearningSecurityCfg_s
1963 {
1965  bool noLearn;
1966 
1971 
1975 typedef struct CpswAle_PortVlanSecurityCfg_s
1976 {
1979 
1982 
1986 
1992 
1996 typedef struct CpswAle_PortMacModeCfg_s
1997 {
2005 
2017 
2022 
2026 typedef struct CpswAle_PortCfg_s
2027 {
2030 
2033 
2036 
2039 } CpswAle_PortCfg;
2040 
2047 typedef struct CpswAle_Cfg_s
2048 {
2050  uint32_t modeFlags;
2051 
2054 
2057 
2060 
2063 
2066 } CpswAle_Cfg;
2067 
2068 /* ========================================================================== */
2069 /* Global Variables Declarations */
2070 /* ========================================================================== */
2071 
2072 /* None */
2073 
2074 /* ========================================================================== */
2075 /* Function Declarations */
2076 /* ========================================================================== */
2077 
2083 void CpswAle_initCfg(CpswAle_Cfg *aleCfg);
2084 
2085 /* ========================================================================== */
2086 /* Deprecated Function Declarations */
2087 /* ========================================================================== */
2088 
2089 /* None */
2090 
2091 /* ========================================================================== */
2092 /* Static Function Definitions */
2093 /* ========================================================================== */
2094 
2095 /* None */
2096 
2097 #ifdef __cplusplus
2098 }
2099 #endif
2100 
2101 #endif /* CPSW_ALE_H_ */
2102 
bool dropDoubleVlan
Definition: cpsw_ale.h:1990
Delete entry info for given OUI address.
Definition: cpsw_ale.h:406
Definition: cpsw_ale.h:847
Output args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1682
CpswAle_PortState portState
Definition: cpsw_ale.h:1116
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1521
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1221
uint32_t agingPeriodInMs
Definition: cpsw_ale.h:1849
uint32_t portNum
Definition: cpsw_ale.h:1426
Set host port RX filter.
Definition: cpsw_ale.h:485
CpswAle_MacAuthCfg macAuthCfg
Definition: cpsw_ale.h:1956
bool limitIPNxtHdr
Definition: cpsw_ale.h:1065
Definition: cpsw_ale.h:805
CpswAle_NetworkSecurityCfg nwSecCfg
Definition: cpsw_ale.h:2062
Enable promiscuous mode on a MAC port.
Definition: cpsw_ale.h:779
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:1225
uint32_t portNum
Definition: cpsw_ale.h:1208
uint32_t noLearnMask
Definition: cpsw_ale.h:1059
Input args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command and out args for CPSW_ALE_IOCTL_GET_DEFAU...
Definition: cpsw_ale.h:1155
Unicast entry type info apart from MAC address that can be set.
Definition: cpsw_ale.h:877
Output args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command.
Definition: cpsw_ale.h:1817
Input args for CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT command.
Definition: cpsw_ale.h:1355
Add unicast address entry.
Definition: cpsw_ale.h:276
uint32_t portMask
Definition: cpsw_ale.h:944
bool autoAgingEn
Definition: cpsw_ale.h:1846
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1526
Disable promiscuous mode on a MAC port.
Definition: cpsw_ale.h:793
bool macOnlyCafEn
Definition: cpsw_ale.h:2004
Definition: cpsw_ale.h:844
Delete entry info for given VLAN id.
Definition: cpsw_ale.h:395
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1233
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:1056
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:1020
CpswAle_PolicerYellowThresh
Yellow threshold value.
Definition: cpsw_ale.h:1723
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1358
CpswAle_FwdStateLevel fwdState
Definition: cpsw_ale.h:941
Delete policer/classifier entry.
Definition: cpsw_ale.h:661
ALE configuration.
Definition: cpsw_ale.h:2047
bool yellowDropEn
Definition: cpsw_ale.h:1794
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1506
Definition: cpsw_ale.h:832
CpswAle_PortLearningSecurityCfg learningCfg
Definition: cpsw_ale.h:2029
ALE aging time configuration.
Definition: cpsw_ale.h:1843
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1492
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:1044
uint32_t unknownRegMcastFloodMask
Definition: cpsw_ale.h:1873
Output args for CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT IOCTL command.
Definition: cpsw_ale.h:1371
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1104
CpswAle_MacAddrInfo * addrs
Definition: cpsw_ale.h:1128
bool trunk
Definition: cpsw_ale.h:900
uint32_t ipNxtHdrWhitelistCnt
Definition: cpsw_ale.h:1910
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1408
uint32_t addrCnt
Definition: cpsw_ale.h:1131
Input args for CPSW_ALE_IOCTL_ADD_MCAST command.
Definition: cpsw_ale.h:954
uint32_t aleEntryIdx
Definition: cpsw_ale.h:928
Disable broadcast/multicast rate limit.
Definition: cpsw_ale.h:628
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:957
CpswAle_IpAddrClassifierInfo srcIpInfo
Definition: cpsw_ale.h:1469
bool authModeEn
Definition: cpsw_ale.h:1922
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1237
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1516
Definition: cpsw_ale.h:859
bool dropUntagged
Definition: cpsw_ale.h:1981
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1377
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:969
uint32_t trunkId
Definition: cpsw_ale.h:1285
CpswAle_IpAddrClassifierType ipAddrType
Definition: cpsw_ale.h:1405
uint32_t noLearnMask
Definition: cpsw_ale.h:1026
Add IPv6 address.
Definition: cpsw_ale.h:330
Definition: cpsw_ale.h:1759
uint32_t vlanId
Definition: cpsw_ale.h:993
bool autoLearnWithVlan
Definition: cpsw_ale.h:1864
uint32_t toPortNum
Definition: cpsw_ale.h:1268
bool ttlCheckEn
Definition: cpsw_ale.h:1823
bool srcIPEn
Definition: cpsw_ale.h:1304
uint32_t egressOpcode
Definition: cpsw_ale.h:1638
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1511
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:1012
Add IPv4 address.
Definition: cpsw_ale.h:319
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1592
CpswAle_PortMacModeCfg macModeCfg
Definition: cpsw_ale.h:2035
Get policer/classifier entry info.
Definition: cpsw_ale.h:650
uint32_t dstPortMask
Definition: cpsw_ale.h:1826
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1229
Unregulated traffic (no classifier hit) policing params.
Definition: cpsw_ale.h:1774
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:1205
uint32_t vlanMemberList
Definition: cpsw_ale.h:1008
uint32_t portNum
Definition: cpsw_ale.h:881
uint32_t threadId
Definition: cpsw_ale.h:1714
uint32_t priority
Definition: cpsw_ale.h:1434
Definition: cpsw_ale.h:853
Delete all learned entries for a given port.
Definition: cpsw_ale.h:452
uint16_t etherType
Definition: cpsw_ale.h:1464
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1777
CpswAle_PolicerNoMatchMode policerNoMatchMode
Definition: cpsw_ale.h:1803
Definition: cpsw_ale.h:835
bool dstEnEn
Definition: cpsw_ale.h:1325
VLAN id info.
Definition: cpsw_ale.h:990
#define ENET_MAC_ADDR_LEN
MAC address length in bytes/octets.
Definition: enet_types.h:153
bool disallowIPFrag
Definition: cpsw_ale.h:1038
CpswAle_PolicerMatchParams policerInfo
Definition: cpsw_ale.h:1673
bool rateLimitEn
Definition: cpsw_ale.h:1374
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1708
Definition: cpsw_ale.h:812
uint32_t portNum
Definition: cpsw_ale.h:1125
bool mcastRateLimitForPortEn
Definition: cpsw_ale.h:1343
Enet_VlanTagType tagType
Definition: cpsw_ale.h:996
Definition: cpsw_ale.h:802
bool secure
Definition: cpsw_ale.h:890
CpswAle_IPPktSecurityCfg ipPktCfg
Definition: cpsw_ale.h:1953
ALE init time port specific configuration params.
Definition: cpsw_ale.h:2026
Definition: cpsw_ale.h:809
Definition: cpsw_ale.h:1393
Definition: cpsw_ale.h:1183
bool threadIdEn
Definition: cpsw_ale.h:1711
#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:1786
CpswAle_FwdStateLevel
Forward state level.
Definition: cpsw_ale.h:826
CpswAle_UnregulatedTrafficPolicer noMatchPolicer
Definition: cpsw_ale.h:1808
bool portIsTrunk
Definition: cpsw_ale.h:1429
CpswAle_TableEntryType
Defines ALE table entry type.
Definition: cpsw_ale.h:1177
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1536
CpswAle_Ioctl
ALE IOCTL commands.
Definition: cpsw_ale.h:252
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:1016
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1582
bool dropDualVlan
Definition: cpsw_ale.h:1985
bool bcastRateLimitForPortEn
Definition: cpsw_ale.h:1339
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1092
bool super
Definition: cpsw_ale.h:938
uint32_t ivlanId
Definition: cpsw_ale.h:1454
bool egressOpEn
Definition: cpsw_ale.h:1631
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1587
uint32_t routeIdx
Definition: cpsw_ale.h:1830
Definition: cpsw_ale.h:1765
Input args for CPSW_ALE_IOCTL_ADD_UCAST command.
Definition: cpsw_ale.h:906
Get MAC addresses reachable on given port.
Definition: cpsw_ale.h:528
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1577
Definition: cpsw_ale.h:1396
IPv6 entry info.
Definition: cpsw_ale.h:1098
CpswAle_PortState
ALE port state.
Definition: cpsw_ale.h:799
bool hostOuiNoMatchDeny
Definition: cpsw_ale.h:1942
Port specific auto learning security configuration.
Definition: cpsw_ale.h:1962
Input args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1670
uint32_t unknownVlanMemberListMask
Definition: cpsw_ale.h:1879
Delete all policer entries and associated ALE entry with the given thread id.
Definition: cpsw_ale.h:729
Multicast entry type info apart from MAC address.
Definition: cpsw_ale.h:934
Definition: cpsw_ale.h:1180
bool macPortDfltThreadDis
Definition: cpsw_ale.h:1171
Return entry info for given VLAN id.
Definition: cpsw_ale.h:373
#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:1858
Disable port mirror (match mirror, destination port mirror and source port mirror).
Definition: cpsw_ale.h:573
uint32_t numIgnBits
Definition: cpsw_ale.h:972
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1820
uint32_t aleEntryIdx
Definition: cpsw_ale.h:1071
ALE IP address classifier info.
Definition: cpsw_ale.h:1402
Set policer/classifier entry.
Definition: cpsw_ale.h:639
Get port state.
Definition: cpsw_ale.h:517
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:921
IPv4 entry info.
Definition: cpsw_ale.h:1086
uint32_t totalAddrCnt
Definition: cpsw_ale.h:1148
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1411
Output args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1137
CpswAle_TableEntryType entryType
Definition: cpsw_ale.h:1217
Get configured broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:617
bool srcEn
Definition: cpsw_ale.h:1252
Output args for CPSW_ALE_IOCTL_LOOKUP_UCAST command.
Definition: cpsw_ale.h:918
CpswAle_VlanEntryInfo CpswAle_PortVlanCfg
Port default VLAN configuration.
Definition: cpsw_ale.h:2021
bool vidIngressCheck
Definition: cpsw_ale.h:1062
Input args for CPSW_ALE_IOCTL_DEL_POLICER IOCTL command.
Definition: cpsw_ale.h:1656
#define CPSW_ALE_NUM_PORTS
Number of switch ports in the subsystem.
Definition: cpsw_ale.h:89
CpswAle_PortVlanCfg pvidCfg
Definition: cpsw_ale.h:2038
Return entry info for given multicast address.
Definition: cpsw_ale.h:362
IP packet security configuration.
Definition: cpsw_ale.h:1899
bool srcEn
Definition: cpsw_ale.h:1320
bool unknownVlanNoLearn
Definition: cpsw_ale.h:1867
bool badLenPktDropEn
Definition: cpsw_ale.h:1893
Set broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:606
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1780
Input args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1122
Enable OAM loopback for ports in the given port mask.
Definition: cpsw_ale.h:595
uint32_t portNum
Definition: cpsw_ale.h:1113
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1597
bool dfltThreadEn
Definition: cpsw_ale.h:1162
Dump ALE table entries.
Definition: cpsw_ale.h:265
MAC address and VLAN Id.
Definition: cpsw_ale.h:865
This file contains the type definitions and helper macros for the Enet Forwarding Database (FDB) modu...
Configure policer global settings.
Definition: cpsw_ale.h:717
CpswAle_IpAddrClassifierInfo dstIpInfo
Definition: cpsw_ale.h:1474
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1607
uint32_t srcPortNumMask
Definition: cpsw_ale.h:1276
Age all entries now.
Definition: cpsw_ale.h:474
OUI entry info.
Definition: cpsw_ale.h:1077
CpswAle_RxFilter
Packet filtering type (cumulative).
Definition: cpsw_ale.h:841
uint64_t addr
Definition: csl_udmap_tr.h:216
bool policerHit
Definition: cpsw_ale.h:1687
CpswAle_PolicerGlobalCfg policerGlobalCfg
Definition: cpsw_ale.h:2053
bool vidIngressCheck
Definition: cpsw_ale.h:1978
bool cpswVlanAwareMode
Definition: cpsw_ale.h:1861
Init time VLAN configuration.
Definition: cpsw_ale.h:1855
uint32_t unknownForceUntaggedEgressMask
Definition: cpsw_ale.h:1870
#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:1567
Definition: cpsw_ale.h:850
bool dstEnEn
Definition: cpsw_ale.h:1257
ALE classifier/policer match parameters for source or destination MAC address.
Definition: cpsw_ale.h:1202
bool policerYellowHit
Definition: cpsw_ale.h:1697
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1541
bool vidIngressCheck
Definition: cpsw_ale.h:1030
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1449
Get ALE policer statistics.
Definition: cpsw_ale.h:685
uint32_t mcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1349
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:1005
Get current host port Rx filter.
Definition: cpsw_ale.h:496
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1625
bool super
Definition: cpsw_ale.h:894
VLAN entry type info.
Definition: cpsw_ale.h:1002
Return entry info for given unicast address.
Definition: cpsw_ale.h:351
Add multicast address entry.
Definition: cpsw_ale.h:287
uint32_t etherTypeAleEntryIdx
Definition: cpsw_ale.h:1602
uint32_t dstPortMask
Definition: cpsw_ale.h:1650
MAC authentication configuration.
Definition: cpsw_ale.h:1919
Get InterVLAN routing configuration.
Definition: cpsw_ale.h:765
uint32_t priority
Definition: cpsw_ale.h:1572
uint32_t macAuthDisMask
Definition: cpsw_ale.h:1928
bool macOnlyEn
Definition: cpsw_ale.h:2015
bool priorityOrEn
Definition: cpsw_ale.h:1168
bool vid0ModeEn
Definition: cpsw_ale.h:1947
Delete entry info for given EtherType.
Definition: cpsw_ale.h:439
Get default thread configuration.
Definition: cpsw_ale.h:550
CpswAle_MacAddrInfo * addrs
Definition: cpsw_ale.h:1141
bool srcMcastDropDis
Definition: cpsw_ale.h:1888
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1612
bool threadIdEn
Definition: cpsw_ale.h:1615
uint32_t numIgnBits
Definition: cpsw_ale.h:948
Add EtherType entry.
Definition: cpsw_ale.h:341
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1646
Definition: cpsw_ale.h:1189
uint32_t portNum
Definition: cpsw_ale.h:1335
bool clearStats
Definition: cpsw_ale.h:1676
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1628
Input args for CPSW_ALE_IOCTL_SET_TRUNK_CFG command.
Definition: cpsw_ale.h:1282
Output args for CPSW_ALE_IOCTL_GET_POLICER, CPSW_ALE_IOCTL_SET_POLICER_THREADCFG, CPSW_ALE_IOCTL_BLOC...
Definition: cpsw_ale.h:1553
bool threadIdEn
Definition: cpsw_ale.h:1486
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:981
bool ageable
Definition: cpsw_ale.h:897
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1544
bool disallowIPFrag
Definition: cpsw_ale.h:1068
CpswAle_PolicerYellowThresh yellowThresh
Definition: cpsw_ale.h:1800
ALE port mirroring configuration for mirroring based on packet match.
Definition: cpsw_ale.h:1214
bool noLearn
Definition: cpsw_ale.h:1965
bool enablePri
Definition: cpsw_ale.h:1315
uint32_t addrCnt
Definition: cpsw_ale.h:1145
CpswAle_PortVlanSecurityCfg vlanCfg
Definition: cpsw_ale.h:2032
bool touched
Definition: cpsw_ale.h:925
Set InterVLAN routing configuration.
Definition: cpsw_ale.h:754
#define ENET_IPv4_ADDR_LEN
IPv4 address length in bytes/octets.
Definition: enet_types.h:159
bool innerVlanEn
Definition: cpsw_ale.h:1310
CpswAle_MalformedPktSecurityCfg malformedPktCfg
Definition: cpsw_ale.h:1950
uint32_t aleEntryMask
Definition: cpsw_ale.h:1664
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:909
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1495
bool dstIPEn
Definition: cpsw_ale.h:1299
Broadcast/multicast bandwidth limit configuration parameters.
Definition: cpsw_ale.h:1331
Port MAC mode configuration.
Definition: cpsw_ale.h:1996
uint32_t threadId
Definition: cpsw_ale.h:1619
Set port mirroring configuration.
Definition: cpsw_ale.h:561
Input args for CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG command.
Definition: cpsw_ale.h:1247
Dump ALE policer entries.
Definition: cpsw_ale.h:674
Set default thread configuration.
Definition: cpsw_ale.h:539
uint32_t policerMatchEnMask
Definition: cpsw_ale.h:1421
CpswAle_PolicerNoMatchMode
Policing Match Mode.
Definition: cpsw_ale.h:1756
Definition: cpsw_ale.h:829
Configure policer global settings. IOCTL params:
Definition: cpsw_ale.h:706
Input args for CPSW_ALE_IOCTL_SET_POLICER_THREADCFG command.
Definition: cpsw_ale.h:1705
Definition: cpsw_ale.h:1186
Malformed packet handling configuration.
Definition: cpsw_ale.h:1885
bool dfltNoFragEn
Definition: cpsw_ale.h:1902
uint32_t trunkHashBase
Definition: cpsw_ale.h:1294
uint32_t numPorts
Definition: cpsw_ale.h:1362
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1501
uint32_t threadId
Definition: cpsw_ale.h:1165
CpswAle_AgingCfg agingCfg
Definition: cpsw_ale.h:2056
uint32_t port
Definition: cpsw_ale.h:1562
Input args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:966
Delete all entries.
Definition: cpsw_ale.h:463
uint32_t threadId
Definition: cpsw_ale.h:1489
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:978
uint32_t numPorts
Definition: cpsw_ale.h:1288
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1480
Add inner/outer VLAN entry.
Definition: cpsw_ale.h:298
Set thread id for given classifier/policer.
Definition: cpsw_ale.h:696
Definition: cpsw_ale.h:1192
ALE classifier/policer match parameters.
Definition: cpsw_ale.h:1417
bool ttlCheckEn
Definition: cpsw_ale.h:1642
bool redDropEn
Definition: cpsw_ale.h:1797
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:1050
uint32_t etherTypeAleEntryIdx
Definition: cpsw_ale.h:1531
Add OUI address entry. IOCTL params:
Definition: cpsw_ale.h:308
bool policerRedHit
Definition: cpsw_ale.h:1692
Delete entry info for given IPv6 address.
Definition: cpsw_ale.h:428
bool dfltNxtHdrWhitelistEn
Definition: cpsw_ale.h:1906
Definition: cpsw_ale.h:1195
uint32_t aleEntryIdx
Definition: cpsw_ale.h:984
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1837
bool noSaUpdateEn
Definition: cpsw_ale.h:1969
uint32_t dstPortNum
Definition: cpsw_ale.h:1265
Enet_VlanTagType
Double tagging VLAN type.
Definition: enet_types.h:372
Set port state.
Definition: cpsw_ale.h:506
bool matchEn
Definition: cpsw_ale.h:1262
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:1053
Definition: cpsw_ale.h:1762
CpswAle_MirrorMatchParams matchParams
Definition: cpsw_ale.h:1273
Set port trunking configuration.
Definition: cpsw_ale.h:584
uint32_t vlanMemberList
Definition: cpsw_ale.h:1047
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1439
bool policingEn
Definition: cpsw_ale.h:1790
uint32_t policerMatchEnMask
Definition: cpsw_ale.h:1557
uint32_t modeFlags
Definition: cpsw_ale.h:2050
uint32_t bcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1346
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:912
bool blocked
Definition: cpsw_ale.h:885
uint32_t vlanId
Definition: cpsw_ale.h:871
CpswAle_InitVlanCfg vlanCfg
Definition: cpsw_ale.h:2059
Input args for CPSW_ALE_IOCTL_SET_PORT_STATE command.
Definition: cpsw_ale.h:1110
CpswAle_MacAddrClassifierInfo srcMacAddrInfo
Definition: cpsw_ale.h:1444
Delete entry info for given unicast/multicast address.
Definition: cpsw_ale.h:384
uint32_t ovlanId
Definition: cpsw_ale.h:1459
Delete entry info for given IPv4 address.
Definition: cpsw_ale.h:417
Blacklist classifier to host port.
Definition: cpsw_ale.h:743
High level structure with ALE network security configuration.
Definition: cpsw_ale.h:1934
uint32_t unknownUnregMcastFloodMask
Definition: cpsw_ale.h:1876
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1483
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1659
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1622
CpswAle_IpAddrClassifierType
IP address classifier type.
Definition: cpsw_ale.h:1390
uint32_t numPorts
Definition: cpsw_ale.h:1381
Port specific VLAN security configuration.
Definition: cpsw_ale.h:1975
uint16_t etherType
Definition: cpsw_ale.h:1241
#define ENET_IPv6_ADDR_LEN
IPv6 address length in bytes/octets.
Definition: enet_types.h:162
Definition: cpsw_ale.h:856
void CpswAle_initCfg(CpswAle_Cfg *aleCfg)
Initialize CPSW ALE configuration parameters.
bool limitIPNxtHdr
Definition: cpsw_ale.h:1034
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:960