PDK API Guide for AM65xx
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 } CpswAle_Ioctl;
764 
768 typedef enum CpswAle_PortState_e
769 {
772 
775 
779 
783 
795 typedef enum CpswAle_FwdStateLevel_e
796 {
799 
802 
806 
810 typedef enum CpswAle_RxFilter_e
811 {
814 
817 
820 
823 
826 
830 
834 typedef struct CpswAle_MacAddrInfo_s
835 {
838 
840  uint32_t vlanId;
842 
846 typedef struct CpswAle_UcastEntryInfo_s
847 {
850  uint32_t portNum;
851 
854  bool blocked;
855 
859  bool secure;
860 
863  bool super;
864 
866  bool ageable;
867 
869  bool trunk;
871 
875 typedef struct CpswAle_SetUcastEntryInArgs_s
876 {
879 
883 
887 typedef struct CpswAle_GetUcastEntryOutArgs_s
888 {
891 
894  bool touched;
895 
897  uint32_t aleEntryIdx;
899 
903 typedef struct CpswAle_McastEntryInfo_s
904 {
907  bool super;
908 
911 
913  uint32_t portMask;
914 
917  uint32_t numIgnBits;
919 
923 typedef struct CpswAle_SetMcastEntryInArgs_s
924 {
927 
931 
935 typedef struct CpswAle_GetMcastEntryInArgs_s
936 {
939 
941  uint32_t numIgnBits;
943 
947 typedef struct CpswAle_GetMcastEntryOutArgs_s
948 {
951 
953  uint32_t aleEntryIdx;
955 
959 typedef struct CpswAle_VlanIdInfo_s
960 {
962  uint32_t vlanId;
963 
967 
971 typedef struct CpswAle_VlanEntryInfo_s
972 {
975 
977  uint32_t vlanMemberList;
978 
982 
986 
990 
995  uint32_t noLearnMask;
996 
1000 
1004 
1009 
1013 typedef struct CpswAle_GetVlanEntryOutArgs_s
1014 {
1016  uint32_t vlanMemberList;
1017 
1020 
1023 
1026 
1028  uint32_t noLearnMask;
1029 
1032 
1035 
1038 
1040  uint32_t aleEntryIdx;
1042 
1046 typedef struct CpswAle_OuiEntryInfo_s
1047 {
1049  uint8_t ouiAddr[ENET_OUI_ADDR_LEN];
1051 
1055 typedef struct CpswAle_IPv4EntryInfo_s
1056 {
1058  uint8_t ipv4Addr[ENET_IPv4_ADDR_LEN];
1059 
1063 
1067 typedef struct CpswAle_IPv6EntryInfo_s
1068 {
1070  uint8_t ipv6Addr[ENET_IPv6_ADDR_LEN];
1071 
1075 
1079 typedef struct CpswAle_SetPortStateInArgs_s
1080 {
1082  uint32_t portNum;
1083 
1087 
1091 typedef struct CpswAle_GetPortMacAddrInArgs_s
1092 {
1094  uint32_t portNum;
1095 
1098 
1100  uint32_t addrCnt;
1102 
1106 typedef struct CpswAle_GetPortMacAddrOutArgs_s
1107 {
1111 
1114  uint32_t addrCnt;
1115 
1117  uint32_t totalAddrCnt;
1119 
1124 typedef struct CpswAle_DefaultThreadCfg_s
1125 {
1132 
1134  uint32_t threadId;
1135 
1138 
1142 
1146 typedef enum CpswAle_TableEntryType_s
1147 {
1150 
1153 
1156 
1159 
1162 
1166 
1171 typedef struct CpswAle_MacAddrClassifierInfo_s
1172 {
1175 
1177  uint32_t portNum;
1179 
1183 typedef struct CpswAle_MirrorMatchParams_s
1184 {
1187 
1191 
1195 
1199 
1203 
1207 
1210  uint16_t etherType;
1212 
1216 typedef struct CpswAle_PortMirroringCfg_s
1217 {
1221  bool srcEn;
1222 
1226  bool dstEnEn;
1227 
1231  bool matchEn;
1232 
1234  uint32_t dstPortNum;
1235 
1237  uint32_t toPortNum;
1238 
1243 
1245  uint32_t srcPortNumMask;
1247 
1251 typedef struct CpswAle_TrunkCfg_s
1252 {
1254  uint32_t trunkId;
1255 
1257  uint32_t numPorts;
1258 
1260  uint32_t trunkPortIdx[CPSW_ALE_NUM_PORTS];
1261 
1263  uint32_t trunkHashBase;
1264 
1268  bool dstIPEn;
1269 
1273  bool srcIPEn;
1274 
1280 
1285 
1289  bool srcEn;
1290 
1294  bool dstEnEn;
1296 
1300 typedef struct CpswAle_PortBcastMcastRateLimitParams_s
1301 {
1304  uint32_t portNum;
1305 
1309 
1313 
1316 
1320 
1324 typedef struct CpswAle_SetBcastMcastRateLimitInArgs_s
1325 {
1328 
1331  uint32_t numPorts;
1332 
1336 
1340 typedef struct CpswAle_GetBcastMcastRateLimitOutArgs_s
1341 {
1344 
1347 
1350  uint32_t numPorts;
1351 
1355 
1359 typedef enum CpswAle_IpAddrClassifierType_e
1360 {
1363 
1367 
1371 typedef struct CpswAle_IpAddrClassifierInfo_s
1372 {
1375 
1378 
1382 
1386 typedef struct CpswAle_PolicerMatchParams_s
1387 {
1391 
1395  uint32_t portNum;
1396 
1399 
1403  uint32_t priority;
1404 
1409 
1414 
1419 
1423  uint32_t ivlanId;
1424 
1428  uint32_t ovlanId;
1429 
1433  uint16_t etherType;
1434 
1439 
1445 
1449 typedef struct CpswAle_SetPolicerEntryInArgs_s
1450 {
1453 
1456 
1458  uint32_t threadId;
1459 
1462 
1466 
1470 typedef struct CpswAle_SetPolicerEntryOutArgs_s
1471 {
1475  uint32_t ouiAleEntryIdx;
1476 
1481 
1486 
1491 
1496 
1501 
1506 
1511 
1515 
1522 typedef struct CpswAle_PolicerEntryOutArgs_s
1523 {
1527 
1531  uint32_t port;
1532 
1537 
1541  uint32_t priority;
1542 
1546  uint32_t ouiAleEntryIdx;
1547 
1552 
1557 
1562 
1567 
1572 
1577 
1582 
1585 
1588  uint32_t threadId;
1589 
1592 
1595 
1598 
1601 
1607  uint32_t egressOpcode;
1608 
1612 
1615  uint32_t egressTrunkIdx;
1616 
1619  uint32_t dstPortMask;
1621 
1625 typedef struct CpswAle_DelPolicerEntryInArgs_s
1626 {
1629 
1633  uint32_t aleEntryMask;
1635 
1639 typedef struct CpswAle_GetPolicerStatsInArgs_s
1640 {
1643 
1647 
1651 typedef struct CpswAle_GetPolicerStatsOutArgs_s
1652 {
1657 
1662 
1668 
1674 typedef struct CpswAle_SetPolicerThreadCfgInArgs_s
1675 {
1678 
1681 
1683  uint32_t threadId;
1685 
1692 typedef enum CpswAle_PolicerYellowThresh_e
1693 {
1696 
1699 
1702 
1705 
1708 
1711 
1714 
1718 
1725 typedef enum CpswAle_PolicerNoMatchMode_e
1726 {
1729 
1732 
1735 
1739 
1743 typedef struct CpswAle_UnregulatedTrafficPolicer_s
1744 {
1747 
1751 
1755 typedef struct CpswAle_PolicerGlobalCfg_s
1756 {
1760 
1764 
1767 
1770 
1773 
1779 
1786 typedef struct CpswAle_SetInterVlanCfgInArgs_s
1787 {
1790 
1793 
1795  uint32_t dstPortMask;
1796 
1799  uint32_t routeIdx;
1800 
1806  uint32_t egressTrunkIdx;
1808 
1812 typedef struct CpswAle_AgingCfg_s
1813 {
1816 
1820 
1824 typedef struct CpswAle_InitVlanCfg_s
1825 {
1828 
1831 
1834 
1837 
1840 
1843 
1846 
1850 
1854 typedef struct CpswAle_MalformedPktSecurityCfg_s
1855 {
1858 
1864 
1868 typedef struct CpswAle_IPPktSecurityCfg_s
1869 {
1872 
1876 
1880 
1882  uint8_t ipNxtHdrWhitelist[CPSW_ALE_MAX_WHITELIST_IP_NXT_HDR];
1884 
1888 typedef struct CpswAle_MacAuthCfg_s
1889 {
1892 
1897  uint32_t macAuthDisMask;
1899 
1903 typedef struct CpswAle_NetworkSecurityCfg_s
1904 {
1912 
1917 
1920 
1923 
1927 
1931 typedef struct CpswAle_PortLearningSecurityCfg_s
1932 {
1934  bool noLearn;
1935 
1940 
1944 typedef struct CpswAle_PortVlanSecurityCfg_s
1945 {
1948 
1951 
1955 
1961 
1965 typedef struct CpswAle_PortMacModeCfg_s
1966 {
1974 
1986 
1991 
1995 typedef struct CpswAle_PortCfg_s
1996 {
1999 
2002 
2005 
2008 } CpswAle_PortCfg;
2009 
2016 typedef struct CpswAle_Cfg_s
2017 {
2019  uint32_t modeFlags;
2020 
2023 
2026 
2029 
2032 
2035 } CpswAle_Cfg;
2036 
2037 /* ========================================================================== */
2038 /* Global Variables Declarations */
2039 /* ========================================================================== */
2040 
2041 /* None */
2042 
2043 /* ========================================================================== */
2044 /* Function Declarations */
2045 /* ========================================================================== */
2046 
2052 void CpswAle_initCfg(CpswAle_Cfg *aleCfg);
2053 
2054 /* ========================================================================== */
2055 /* Deprecated Function Declarations */
2056 /* ========================================================================== */
2057 
2058 /* None */
2059 
2060 /* ========================================================================== */
2061 /* Static Function Definitions */
2062 /* ========================================================================== */
2063 
2064 /* None */
2065 
2066 #ifdef __cplusplus
2067 }
2068 #endif
2069 
2070 #endif /* CPSW_ALE_H_ */
2071 
bool dropDoubleVlan
Definition: cpsw_ale.h:1959
Delete entry info for given OUI address.
Definition: cpsw_ale.h:403
Definition: cpsw_ale.h:816
Output args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1651
CpswAle_PortState portState
Definition: cpsw_ale.h:1085
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1490
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1190
uint32_t agingPeriodInMs
Definition: cpsw_ale.h:1818
uint32_t portNum
Definition: cpsw_ale.h:1395
Set host port RX filter.
Definition: cpsw_ale.h:482
CpswAle_MacAuthCfg macAuthCfg
Definition: cpsw_ale.h:1925
bool limitIPNxtHdr
Definition: cpsw_ale.h:1034
Definition: cpsw_ale.h:774
CpswAle_NetworkSecurityCfg nwSecCfg
Definition: cpsw_ale.h:2031
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:1194
uint32_t portNum
Definition: cpsw_ale.h:1177
uint32_t noLearnMask
Definition: cpsw_ale.h:1028
Input args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command and out args for CPSW_ALE_IOCTL_GET_DEFAU...
Definition: cpsw_ale.h:1124
Unicast entry type info apart from MAC address that can be set.
Definition: cpsw_ale.h:846
Output args for CPSW_ALE_IOCTL_SET_DEFAULT_THREADCFG command.
Definition: cpsw_ale.h:1786
Input args for CPSW_ALE_IOCTL_SET_BCAST_MCAST_LIMIT command.
Definition: cpsw_ale.h:1324
Add unicast address entry.
Definition: cpsw_ale.h:273
uint32_t portMask
Definition: cpsw_ale.h:913
bool autoAgingEn
Definition: cpsw_ale.h:1815
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1495
bool macOnlyCafEn
Definition: cpsw_ale.h:1973
Definition: cpsw_ale.h:813
Delete entry info for given VLAN id.
Definition: cpsw_ale.h:392
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1202
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:1025
uint32_t forceUntaggedEgressMask
Definition: cpsw_ale.h:989
CpswAle_PolicerYellowThresh
Yellow threshold value.
Definition: cpsw_ale.h:1692
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1327
CpswAle_FwdStateLevel fwdState
Definition: cpsw_ale.h:910
Delete policer/classifier entry.
Definition: cpsw_ale.h:658
ALE configuration.
Definition: cpsw_ale.h:2016
bool yellowDropEn
Definition: cpsw_ale.h:1763
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1475
Definition: cpsw_ale.h:801
CpswAle_PortLearningSecurityCfg learningCfg
Definition: cpsw_ale.h:1998
ALE aging time configuration.
Definition: cpsw_ale.h:1812
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1461
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:1013
uint32_t unknownRegMcastFloodMask
Definition: cpsw_ale.h:1842
Output args for CPSW_ALE_IOCTL_GET_BCAST_MCAST_LIMIT IOCTL command.
Definition: cpsw_ale.h:1340
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1073
CpswAle_MacAddrInfo * addrs
Definition: cpsw_ale.h:1097
bool trunk
Definition: cpsw_ale.h:869
uint32_t ipNxtHdrWhitelistCnt
Definition: cpsw_ale.h:1879
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1377
uint32_t addrCnt
Definition: cpsw_ale.h:1100
Input args for CPSW_ALE_IOCTL_ADD_MCAST command.
Definition: cpsw_ale.h:923
uint32_t aleEntryIdx
Definition: cpsw_ale.h:897
Disable broadcast/multicast rate limit.
Definition: cpsw_ale.h:625
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:926
CpswAle_IpAddrClassifierInfo srcIpInfo
Definition: cpsw_ale.h:1438
bool authModeEn
Definition: cpsw_ale.h:1891
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1206
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1485
Definition: cpsw_ale.h:828
bool dropUntagged
Definition: cpsw_ale.h:1950
bool rateLimitAtTxPort
Definition: cpsw_ale.h:1346
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:938
uint32_t trunkId
Definition: cpsw_ale.h:1254
CpswAle_IpAddrClassifierType ipAddrType
Definition: cpsw_ale.h:1374
uint32_t noLearnMask
Definition: cpsw_ale.h:995
Add IPv6 address.
Definition: cpsw_ale.h:327
Definition: cpsw_ale.h:1728
uint32_t vlanId
Definition: cpsw_ale.h:962
bool autoLearnWithVlan
Definition: cpsw_ale.h:1833
uint32_t toPortNum
Definition: cpsw_ale.h:1237
bool ttlCheckEn
Definition: cpsw_ale.h:1792
bool srcIPEn
Definition: cpsw_ale.h:1273
uint32_t egressOpcode
Definition: cpsw_ale.h:1607
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1480
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:981
Add IPv4 address.
Definition: cpsw_ale.h:316
uint32_t ivlanAleEntryIdx
Definition: cpsw_ale.h:1561
CpswAle_PortMacModeCfg macModeCfg
Definition: cpsw_ale.h:2004
Get policer/classifier entry info.
Definition: cpsw_ale.h:647
uint32_t dstPortMask
Definition: cpsw_ale.h:1795
CpswAle_IPv4EntryInfo ipv4Info
Definition: cpsw_ale.h:1198
Unregulated traffic (no classifier hit) policing params.
Definition: cpsw_ale.h:1743
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:1174
uint32_t vlanMemberList
Definition: cpsw_ale.h:977
uint32_t portNum
Definition: cpsw_ale.h:850
uint32_t threadId
Definition: cpsw_ale.h:1683
uint32_t priority
Definition: cpsw_ale.h:1403
Definition: cpsw_ale.h:822
Delete all learned entries for a given port.
Definition: cpsw_ale.h:449
uint16_t etherType
Definition: cpsw_ale.h:1433
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1746
CpswAle_PolicerNoMatchMode policerNoMatchMode
Definition: cpsw_ale.h:1772
Definition: cpsw_ale.h:804
bool dstEnEn
Definition: cpsw_ale.h:1294
VLAN id info.
Definition: cpsw_ale.h:959
#define ENET_MAC_ADDR_LEN
MAC address length in bytes/octets.
Definition: enet_types.h:153
bool disallowIPFrag
Definition: cpsw_ale.h:1007
CpswAle_PolicerMatchParams policerInfo
Definition: cpsw_ale.h:1642
bool rateLimitEn
Definition: cpsw_ale.h:1343
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1677
Definition: cpsw_ale.h:781
uint32_t portNum
Definition: cpsw_ale.h:1094
bool mcastRateLimitForPortEn
Definition: cpsw_ale.h:1312
Enet_VlanTagType tagType
Definition: cpsw_ale.h:965
Definition: cpsw_ale.h:771
bool secure
Definition: cpsw_ale.h:859
CpswAle_IPPktSecurityCfg ipPktCfg
Definition: cpsw_ale.h:1922
ALE init time port specific configuration params.
Definition: cpsw_ale.h:1995
Definition: cpsw_ale.h:778
Definition: cpsw_ale.h:1362
Definition: cpsw_ale.h:1152
bool threadIdEn
Definition: cpsw_ale.h:1680
#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:1755
CpswAle_FwdStateLevel
Forward state level.
Definition: cpsw_ale.h:795
CpswAle_UnregulatedTrafficPolicer noMatchPolicer
Definition: cpsw_ale.h:1777
bool portIsTrunk
Definition: cpsw_ale.h:1398
CpswAle_TableEntryType
Defines ALE table entry type.
Definition: cpsw_ale.h:1146
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1505
CpswAle_Ioctl
ALE IOCTL commands.
Definition: cpsw_ale.h:249
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:985
uint32_t srcMacAleEntryIdx
Definition: cpsw_ale.h:1551
bool dropDualVlan
Definition: cpsw_ale.h:1954
bool bcastRateLimitForPortEn
Definition: cpsw_ale.h:1308
uint32_t numLSBIgnoreBits
Definition: cpsw_ale.h:1061
bool super
Definition: cpsw_ale.h:907
uint32_t ivlanId
Definition: cpsw_ale.h:1423
bool egressOpEn
Definition: cpsw_ale.h:1600
uint32_t dstMacAleEntryIdx
Definition: cpsw_ale.h:1556
uint32_t routeIdx
Definition: cpsw_ale.h:1799
Definition: cpsw_ale.h:1734
Input args for CPSW_ALE_IOCTL_ADD_UCAST command.
Definition: cpsw_ale.h:875
Get MAC addresses reachable on given port.
Definition: cpsw_ale.h:525
uint32_t ouiAleEntryIdx
Definition: cpsw_ale.h:1546
Definition: cpsw_ale.h:1365
IPv6 entry info.
Definition: cpsw_ale.h:1067
CpswAle_PortState
ALE port state.
Definition: cpsw_ale.h:768
bool hostOuiNoMatchDeny
Definition: cpsw_ale.h:1911
Port specific auto learning security configuration.
Definition: cpsw_ale.h:1931
Input args for CPSW_ALE_IOCTL_GET_POLICER_STATS command.
Definition: cpsw_ale.h:1639
uint32_t unknownVlanMemberListMask
Definition: cpsw_ale.h:1848
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:903
Definition: cpsw_ale.h:1149
bool macPortDfltThreadDis
Definition: cpsw_ale.h:1140
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:1827
Disable port mirror (match mirror, destination port mirror and source port mirror).
Definition: cpsw_ale.h:570
uint32_t numIgnBits
Definition: cpsw_ale.h:941
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1789
uint32_t aleEntryIdx
Definition: cpsw_ale.h:1040
ALE IP address classifier info.
Definition: cpsw_ale.h:1371
Set policer/classifier entry.
Definition: cpsw_ale.h:636
Get port state.
Definition: cpsw_ale.h:514
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:890
IPv4 entry info.
Definition: cpsw_ale.h:1055
uint32_t totalAddrCnt
Definition: cpsw_ale.h:1117
CpswAle_IPv6EntryInfo ipv6Info
Definition: cpsw_ale.h:1380
Output args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1106
CpswAle_TableEntryType entryType
Definition: cpsw_ale.h:1186
Get configured broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:614
bool srcEn
Definition: cpsw_ale.h:1221
Output args for CPSW_ALE_IOCTL_LOOKUP_UCAST command.
Definition: cpsw_ale.h:887
CpswAle_VlanEntryInfo CpswAle_PortVlanCfg
Port default VLAN configuration.
Definition: cpsw_ale.h:1990
bool vidIngressCheck
Definition: cpsw_ale.h:1031
Input args for CPSW_ALE_IOCTL_DEL_POLICER IOCTL command.
Definition: cpsw_ale.h:1625
#define CPSW_ALE_NUM_PORTS
Number of switch ports in the subsystem.
Definition: cpsw_ale.h:89
CpswAle_PortVlanCfg pvidCfg
Definition: cpsw_ale.h:2007
Return entry info for given multicast address.
Definition: cpsw_ale.h:359
IP packet security configuration.
Definition: cpsw_ale.h:1868
bool srcEn
Definition: cpsw_ale.h:1289
bool unknownVlanNoLearn
Definition: cpsw_ale.h:1836
bool badLenPktDropEn
Definition: cpsw_ale.h:1862
Set broadcast/multicast rate limit configuration.
Definition: cpsw_ale.h:603
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1749
Input args for CPSW_ALE_IOCTL_GET_PORT_MACADDR command.
Definition: cpsw_ale.h:1091
Enable OAM loopback for ports in the given port mask.
Definition: cpsw_ale.h:592
uint32_t portNum
Definition: cpsw_ale.h:1082
uint32_t ovlanAleEntryIdx
Definition: cpsw_ale.h:1566
bool dfltThreadEn
Definition: cpsw_ale.h:1131
Dump ALE table entries.
Definition: cpsw_ale.h:262
MAC address and VLAN Id.
Definition: cpsw_ale.h:834
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:1443
uint32_t srcIpAleEntryIdx
Definition: cpsw_ale.h:1576
uint32_t srcPortNumMask
Definition: cpsw_ale.h:1245
Age all entries now.
Definition: cpsw_ale.h:471
OUI entry info.
Definition: cpsw_ale.h:1046
CpswAle_RxFilter
Packet filtering type (cumulative).
Definition: cpsw_ale.h:810
uint64_t addr
Definition: csl_udmap_tr.h:214
bool policerHit
Definition: cpsw_ale.h:1656
CpswAle_PolicerGlobalCfg policerGlobalCfg
Definition: cpsw_ale.h:2022
bool vidIngressCheck
Definition: cpsw_ale.h:1947
bool cpswVlanAwareMode
Definition: cpsw_ale.h:1830
Init time VLAN configuration.
Definition: cpsw_ale.h:1824
uint32_t unknownForceUntaggedEgressMask
Definition: cpsw_ale.h:1839
#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:1536
Definition: cpsw_ale.h:819
bool dstEnEn
Definition: cpsw_ale.h:1226
ALE classifier/policer match parameters for source or destination MAC address.
Definition: cpsw_ale.h:1171
bool policerYellowHit
Definition: cpsw_ale.h:1666
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1510
bool vidIngressCheck
Definition: cpsw_ale.h:999
CpswAle_MacAddrClassifierInfo dstMacAddrInfo
Definition: cpsw_ale.h:1418
Get ALE policer statistics.
Definition: cpsw_ale.h:682
uint32_t mcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1318
CpswAle_VlanIdInfo vlanIdInfo
Definition: cpsw_ale.h:974
Get current host port Rx filter.
Definition: cpsw_ale.h:493
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1594
bool super
Definition: cpsw_ale.h:863
VLAN entry type info.
Definition: cpsw_ale.h:971
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:1571
uint32_t dstPortMask
Definition: cpsw_ale.h:1619
MAC authentication configuration.
Definition: cpsw_ale.h:1888
Get InterVLAN routing configuration.
Definition: cpsw_ale.h:762
uint32_t priority
Definition: cpsw_ale.h:1541
uint32_t macAuthDisMask
Definition: cpsw_ale.h:1897
bool macOnlyEn
Definition: cpsw_ale.h:1984
bool priorityOrEn
Definition: cpsw_ale.h:1137
bool vid0ModeEn
Definition: cpsw_ale.h:1916
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:1110
bool srcMcastDropDis
Definition: cpsw_ale.h:1857
uint32_t dstIpAleEntryIdx
Definition: cpsw_ale.h:1581
bool threadIdEn
Definition: cpsw_ale.h:1584
uint32_t numIgnBits
Definition: cpsw_ale.h:917
Add EtherType entry.
Definition: cpsw_ale.h:338
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1615
Definition: cpsw_ale.h:1158
uint32_t portNum
Definition: cpsw_ale.h:1304
bool clearStats
Definition: cpsw_ale.h:1645
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1597
Input args for CPSW_ALE_IOCTL_SET_TRUNK_CFG command.
Definition: cpsw_ale.h:1251
Output args for CPSW_ALE_IOCTL_GET_POLICER, CPSW_ALE_IOCTL_SET_POLICER_THREADCFG, CPSW_ALE_IOCTL_BLOC...
Definition: cpsw_ale.h:1522
bool threadIdEn
Definition: cpsw_ale.h:1455
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:950
bool ageable
Definition: cpsw_ale.h:866
uint32_t policerEntryIdx
Definition: cpsw_ale.h:1513
bool disallowIPFrag
Definition: cpsw_ale.h:1037
CpswAle_PolicerYellowThresh yellowThresh
Definition: cpsw_ale.h:1769
ALE port mirroring configuration for mirroring based on packet match.
Definition: cpsw_ale.h:1183
bool noLearn
Definition: cpsw_ale.h:1934
bool enablePri
Definition: cpsw_ale.h:1284
uint32_t addrCnt
Definition: cpsw_ale.h:1114
CpswAle_PortVlanSecurityCfg vlanCfg
Definition: cpsw_ale.h:2001
bool touched
Definition: cpsw_ale.h:894
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:1279
CpswAle_MalformedPktSecurityCfg malformedPktCfg
Definition: cpsw_ale.h:1919
uint32_t aleEntryMask
Definition: cpsw_ale.h:1633
CpswAle_MacAddrInfo addr
Definition: cpsw_ale.h:878
uint32_t commitRateInBitsPerSec
Definition: cpsw_ale.h:1464
bool dstIPEn
Definition: cpsw_ale.h:1268
Broadcast/multicast bandwidth limit configuration parameters.
Definition: cpsw_ale.h:1300
Port MAC mode configuration.
Definition: cpsw_ale.h:1965
uint32_t threadId
Definition: cpsw_ale.h:1588
Set port mirroring configuration.
Definition: cpsw_ale.h:558
Input args for CPSW_ALE_IOCTL_SET_PORT_MIRROR_CFG command.
Definition: cpsw_ale.h:1216
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:1390
CpswAle_PolicerNoMatchMode
Policing Match Mode.
Definition: cpsw_ale.h:1725
Definition: cpsw_ale.h:798
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:1674
Definition: cpsw_ale.h:1155
Malformed packet handling configuration.
Definition: cpsw_ale.h:1854
bool dfltNoFragEn
Definition: cpsw_ale.h:1871
uint32_t trunkHashBase
Definition: cpsw_ale.h:1263
uint32_t numPorts
Definition: cpsw_ale.h:1331
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1470
uint32_t threadId
Definition: cpsw_ale.h:1134
CpswAle_AgingCfg agingCfg
Definition: cpsw_ale.h:2025
uint32_t port
Definition: cpsw_ale.h:1531
Input args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:935
Delete all entries.
Definition: cpsw_ale.h:460
uint32_t threadId
Definition: cpsw_ale.h:1458
Output args for CPSW_ALE_IOCTL_LOOKUP_MCAST command.
Definition: cpsw_ale.h:947
uint32_t numPorts
Definition: cpsw_ale.h:1257
Input args for CPSW_ALE_IOCTL_SET_POLICER command.
Definition: cpsw_ale.h:1449
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:1161
ALE classifier/policer match parameters.
Definition: cpsw_ale.h:1386
bool ttlCheckEn
Definition: cpsw_ale.h:1611
bool redDropEn
Definition: cpsw_ale.h:1766
uint32_t unregMcastFloodMask
Definition: cpsw_ale.h:1019
uint32_t etherTypeAleEntryIdx
Definition: cpsw_ale.h:1500
Add OUI address entry. IOCTL params:
Definition: cpsw_ale.h:305
bool policerRedHit
Definition: cpsw_ale.h:1661
Delete entry info for given IPv6 address.
Definition: cpsw_ale.h:425
bool dfltNxtHdrWhitelistEn
Definition: cpsw_ale.h:1875
Definition: cpsw_ale.h:1164
uint32_t aleEntryIdx
Definition: cpsw_ale.h:953
uint32_t egressTrunkIdx
Definition: cpsw_ale.h:1806
bool noSaUpdateEn
Definition: cpsw_ale.h:1938
uint32_t dstPortNum
Definition: cpsw_ale.h:1234
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:1231
uint32_t regMcastFloodMask
Definition: cpsw_ale.h:1022
Definition: cpsw_ale.h:1731
CpswAle_MirrorMatchParams matchParams
Definition: cpsw_ale.h:1242
Set port trunking configuration.
Definition: cpsw_ale.h:581
uint32_t vlanMemberList
Definition: cpsw_ale.h:1016
CpswAle_OuiEntryInfo ouiInfo
Definition: cpsw_ale.h:1408
bool policingEn
Definition: cpsw_ale.h:1759
uint32_t policerMatchEnMask
Definition: cpsw_ale.h:1526
uint32_t modeFlags
Definition: cpsw_ale.h:2019
uint32_t bcastLimitNumPktsPerSec
Definition: cpsw_ale.h:1315
CpswAle_UcastEntryInfo info
Definition: cpsw_ale.h:881
bool blocked
Definition: cpsw_ale.h:854
uint32_t vlanId
Definition: cpsw_ale.h:840
CpswAle_InitVlanCfg vlanCfg
Definition: cpsw_ale.h:2028
Input args for CPSW_ALE_IOCTL_SET_PORT_STATE command.
Definition: cpsw_ale.h:1079
CpswAle_MacAddrClassifierInfo srcMacAddrInfo
Definition: cpsw_ale.h:1413
Delete entry info for given unicast/multicast address.
Definition: cpsw_ale.h:381
uint32_t ovlanId
Definition: cpsw_ale.h:1428
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:1903
uint32_t unknownUnregMcastFloodMask
Definition: cpsw_ale.h:1845
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1452
CpswAle_PolicerMatchParams policerMatch
Definition: cpsw_ale.h:1628
uint32_t peakRateInBitsPerSec
Definition: cpsw_ale.h:1591
CpswAle_IpAddrClassifierType
IP address classifier type.
Definition: cpsw_ale.h:1359
uint32_t numPorts
Definition: cpsw_ale.h:1350
Port specific VLAN security configuration.
Definition: cpsw_ale.h:1944
uint16_t etherType
Definition: cpsw_ale.h:1210
#define ENET_IPv6_ADDR_LEN
IPv6 address length in bytes/octets.
Definition: enet_types.h:162
Definition: cpsw_ale.h:825
void CpswAle_initCfg(CpswAle_Cfg *aleCfg)
Initialize CPSW ALE configuration parameters.
bool limitIPNxtHdr
Definition: cpsw_ale.h:1003
CpswAle_McastEntryInfo info
Definition: cpsw_ale.h:929