1 /*
2  * Copyright 2021-2024 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef NETC_ETHSWT_IP_H
8 #define NETC_ETHSWT_IP_H
9 
10 /**
11  *   @file Netc_EthSwt_Ip.h
12  *   @addtogroup NETC_ETHSWT_IP NETC_ETHSWT Driver
13  *   @{
14  */
15 
16 #ifdef __cplusplus
17 extern "C"{
18 #endif
19 
20 /*==================================================================================================
21 *                                          INCLUDE FILES
22 * 1) system and project includes
23 * 2) needed interfaces from external units
24 * 3) internal and external interfaces from this unit
25 ==================================================================================================*/
26 #include "Mcal.h"
27 #include "Netc_EthSwt_Ip_Types.h"
28 #include "Netc_EthSwt_Ip_Cfg.h"
29 
30 /*==================================================================================================
31 *                                 SOURCE FILE VERSION INFORMATION
32 ==================================================================================================*/
33 #define NETC_ETHSWT_IP_VENDOR_ID                    43
34 #define NETC_ETHSWT_IP_MODULE_ID                    89
35 #define NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION     4
36 #define NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION     7
37 #define NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION  0
38 #define NETC_ETHSWT_IP_SW_MAJOR_VERSION             2
39 #define NETC_ETHSWT_IP_SW_MINOR_VERSION             0
40 #define NETC_ETHSWT_IP_SW_PATCH_VERSION             0
41 
42 /*==================================================================================================
43 *                                       FILE VERSION CHECKS
44 ==================================================================================================*/
45 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
46 
47 /* Check if current file and Mcal.h header file are of the same Autosar version */
48 #if ((NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \
49      (NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION)    \
50     )
51     #error "AutoSar Version Numbers of Netc_EthSwt_Ip.h and Mcal.h are different"
52 #endif
53 #endif
54 
55 /* Checks against Netc_EthSwt_Ip_Types.h */
56 #if (NETC_ETHSWT_IP_VENDOR_ID !=  NETC_ETHSWT_IP_TYPES_VENDOR_ID)
57     #error "Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h have different vendor ids"
58 #endif
59 #if (( NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION    !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
60      ( NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION    !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
61      ( NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION !=  NETC_ETHSWT_IP_TYPES_AR_RELEASE_REVISION_VERSION))
62      #error "AUTOSAR Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h are different"
63 #endif
64 #if (( NETC_ETHSWT_IP_SW_MAJOR_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_MAJOR_VERSION) || \
65      ( NETC_ETHSWT_IP_SW_MINOR_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_MINOR_VERSION) || \
66      ( NETC_ETHSWT_IP_SW_PATCH_VERSION !=  NETC_ETHSWT_IP_TYPES_SW_PATCH_VERSION))
67     #error "Software Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Types.h are different"
68 #endif
69 
70 /* Checks against Netc_EthSwt_Ip_Cfg.h */
71 #if (NETC_ETHSWT_IP_VENDOR_ID !=  NETC_ETHSWT_IP_CFG_VENDOR_ID)
72     #error "Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h have different vendor ids"
73 #endif
74 #if (( NETC_ETHSWT_IP_AR_RELEASE_MAJOR_VERSION    !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
75      ( NETC_ETHSWT_IP_AR_RELEASE_MINOR_VERSION    !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
76      ( NETC_ETHSWT_IP_AR_RELEASE_REVISION_VERSION !=  NETC_ETHSWT_IP_CFG_AR_RELEASE_REVISION_VERSION))
77      #error "AUTOSAR Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h are different"
78 #endif
79 #if (( NETC_ETHSWT_IP_SW_MAJOR_VERSION !=  NETC_ETHSWT_IP_CFG_SW_MAJOR_VERSION) || \
80      ( NETC_ETHSWT_IP_SW_MINOR_VERSION !=  NETC_ETHSWT_IP_CFG_SW_MINOR_VERSION) || \
81      ( NETC_ETHSWT_IP_SW_PATCH_VERSION !=  NETC_ETHSWT_IP_CFG_SW_PATCH_VERSION))
82     #error "Software Version Numbers of Netc_EthSwt_Ip.h and Netc_EthSwt_Ip_Cfg.h are different"
83 #endif
84 /*==================================================================================================
85 *                                            CONSTANTS
86 ==================================================================================================*/
87 #define NETC_ETHSWT_IP_NOMATCHEDPORTMACADDR                (255U)
88 /*==================================================================================================
89 *                                       DEFINES AND MACROS
90 ==================================================================================================*/
91 #define ETHSWT_43_NETC_START_SEC_CONFIG_DATA_UNSPECIFIED
92 #include "EthSwt_43_NETC_MemMap.h"
93 
94 /** @brief   Export NETC ETHSWT configurations. */
95 NETC_ETHSWT_CONFIG_EXT
96 
97 #define ETHSWT_43_NETC_STOP_SEC_CONFIG_DATA_UNSPECIFIED
98 #include "EthSwt_43_NETC_MemMap.h"
99 
100 /* Base address of the registers for the MAC Ports */
101 extern Netc_EthSwt_Ip_PortBaseType* Netc_EthSwt_Ip_PortBaseTable[];
102 
103 /* Base address of the registers for the pseudo Port */
104 extern Netc_EthSwt_Ip_PseudoPortBaseType* Netc_EthSwt_Ip_PseudoPortBaseTable[];
105 extern SW_PORT0_Type *Netc_EthSwt_Ip_SW0_PortxBaseAddr[NETC_ETHSWT_IP_NUMBER_OF_PORTS];
106 
107 /* Ingress Port Filter Entry ID for mirroing */
108 extern uint32 MirroringIngressPortFilterEntryId;
109 
110 #define NETC_ETHSWT_IP_MACADDRLEN  (6U)                             /*!< mac addr length */
111 #define NETC_ETHSWT_IP_BITMAPLEN   (24U)                            /*!< bit map length */
112 #define NETC_ETHSWT_IP_32BIT_SHIFT (32U)                            /*!< 32 bits shift */
113 #define NETC_ETHSWT_IP_24BIT_SHIFT (24U)                            /*!< 24 bits shift */
114 #define NETC_ETHSWT_IP_16BIT_SHIFT (16U)                            /*!< 16 bits shift */
115 #define NETC_ETHSWT_IP_8BIT_SHIFT  (8U)                             /*!< 8 bits shift */
116 
117 #define NETC_ETHSWT_IP_16BIT_BYTE_SWAP(x)  ((((x) >> NETC_ETHSWT_IP_8BIT_SHIFT) & 0xFFU) | (((x) & 0xFFU) << NETC_ETHSWT_IP_8BIT_SHIFT))
118 
119 #define NETC_ETHSWT_IP_0XFF_MASK                           (0xFFU)
120 #define NETC_ETHSWT_IP_0XFFFF_MASK                         (0xFFFFU)
121 #define NETC_ETHSWT_IP_0XFFFF0000_MASK                     (0xFFFF0000UL)
122 
123 #define NETC_ETHSWT_IP_CBDR_NUM                            (2U)      /*!< number of switch commang ring */
124 #define NETC_ETHSWT_IP_CBDR_0                              (0U)      /*!< switch command ring 0 */
125 #define NETC_ETHSWT_IP_CBDR_1                              (1U)      /*!< switch command ring 1 */
126 
127 #define NETC_ETHSWT_IP_CBDR0_LENGTH                        (2U)      /*!< size of command ring 0. 2 means the size is 16 because it is in sets of 8 BDs */
128 #define NETC_ETHSWT_IP_SET_OF_BD                           (8U)       /*!< set of BD */
129 #define NETC_ETHSWT_IP_ACTUAL_CBDR0_LENGTH                 ((NETC_ETHSWT_IP_CBDR0_LENGTH) * (NETC_ETHSWT_IP_SET_OF_BD)) /*!< CBDR0 length */
130 #define NETC_ETHSWT_IP_CBDR1_LENGTH                        (2U)      /*!< size of command ring 1. 2 means the size is 16 because it is in sets of 8 BDs */
131 #define NETC_ETHSWT_IP_ACTUAL_CBDR1_LENGTH                 ((NETC_ETHSWT_IP_CBDR1_LENGTH) * 8U) /*!< CBDR1 length */
132 
133 #define NETC_ETHSWT_IP_CBD_ALIGNED_SIZE                    (128U)    /*!< 128-byte aligned memory for command buffer descriptors */
134 #define NETC_ETHSWT_IP_TABLE_ALIGNED_SIZE                  (16U)     /*!< 16-byte aligned memory for command tables */
135 
136 /* Macros for NTMP request message header */
137 #define NETC_ETHSWT_IP_CMDBD_REQFMT_PROTOCOL_VERSION       (2U)      /*!< protocol version = 0x2 */
138 #define NETC_ETHSWT_IP_CMDBD_REQFMT_NTMP_PROTOCOL_VERSION  (1U)      /*!< NTMP version is 2.0 */
139 
140 /* MDIO related defines */
141 #define NETC_ETHSWT_IP_MDIO_CLK_DIV                        (200U)   /*!< MDIO clock divisor, it has to be set to 0x40 */
142 #define NETC_ETHSWT_IP_MDIO_REG_READ_FLAG                  (0x80000003U)    /*!< An MDIO transaction is occurring, and MDIO read error occurs */
143 #define NETC_ETHSWT_IP_MDIO_REG_WRITE_FLAG                 (0x80000001U)    /*!< An MDIO transaction is occurring  */
144 /*==================================================================================================
145 *                                              ENUMS
146 ==================================================================================================*/
147 
148 /*==================================================================================================
149 *                                  STRUCTURES AND OTHER TYPEDEFS
150 ==================================================================================================*/
151 
152 /*==================================================================================================
153                                  GLOBAL VARIABLE DECLARATIONS
154 ==================================================================================================*/
155 
156 /*==================================================================================================
157                                      FUNCTION PROTOTYPES
158 ==================================================================================================*/
159 #define ETHSWT_43_NETC_START_SEC_CODE
160 #include "EthSwt_43_NETC_MemMap.h"
161 
162 /**
163 * @brief            Ethernet Switch switch initialization function.
164 * @details          Initializes the indexed swtich with a given configuration for the switch index
165 *                   EthSwt_Ip_Init shall:
166 *                   - Configure all configuration parameters (e.g. port structure, VLAN configuration, ...)
167 *                     at all ports of the switch and the switch itself.
168 *                   - Perform a soft reset
169 *
170 * @param[in]        SwitchIdx   Index of the switch within the context of the Ethernet Switch Driver
171 *                   Config      Structure for the initialization
172 *
173 * @return           Result of the operation
174 * @retval           E_OK        success
175 * @retval           E_NOT_OK    switch could not be initialized
176 */
177 Std_ReturnType Netc_EthSwt_Ip_Init(uint8 SwitchIdx, const Netc_EthSwt_Ip_ConfigType * Config);
178 
179 
180 /**
181 * @brief            Ethernet Switch switch function for starting TSN.
182 * @details          This function enables the statically configured TSN settings. If stream gating or time aware shaping is used, the API must be called after the clock is synchronized.
183 *                   EthSwt_Ip_StartTSN shall:
184 *                   - Populate all tables related to 802.1cb and 802.1qci .
185 *
186 * @param[in]        SwitchIdx   Index of the switch within the context of the Ethernet Switch Driver
187 *
188 * @return           Result of the operation
189 * @retval           E_OK        success
190 * @retval           E_NOT_OK    TSN could not be started
191 */
192 Std_ReturnType Netc_EthSwt_Ip_StartTSN(uint8 SwitchIdx);
193 
194 /**
195 * @brief            Ethernet Switch function to prepare the IPF table for PTP
196 * @details          Add hardcoded entries to the Ingress Port Filter table to redirect frames with PTP-specific DMACs
197 *
198 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
199 *
200 * @return           Result of the operation
201 * @retval           E_OK        success
202 * @retval           E_NOT_OK    entries could not be added
203 */
204 Std_ReturnType Netc_EthSwt_Ip_ConfigIngressPortFilterForTimestamping(uint8 SwitchIdx);
205 
206 /**
207  * @brief   Ethernet Switch read transceiver register function.
208  * @details Generic API for reading the content of a transceiver register.
209  *
210  * @param[in]  SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
211  * @param[in]  TrcvIdx         Index of the transceiver referenced by port
212  * @param[in]  RegIdx          Index of the register
213  * @param[out] RegVal          Pointer to the register content
214  *
215  * @return Result of the operation
216  * @retval E_OK        success
217  * @retval E_NOT_OK    Register could not be read
218  */
219 Std_ReturnType Netc_EthSwt_Ip_ReadTrcvRegister( uint8 SwitchIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 * RegVal );
220 
221 /**
222  * @brief   Ethernet Switch write transceiver reg function.
223  * @details Generic API for writing the content of a transceiver register
224  *
225  * @param[in] SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
226  * @param[in] TrcvIdx         Index of the transceiver referenced by port
227  * @param[in] RegIdx          Index of the register
228  * @param[in] RegVal          Content for the indexed register
229  *
230  * @return Result of the operation
231  * @retval E_OK        success
232  * @retval E_NOT_OK    Register could not be written to
233  */
234 Std_ReturnType Netc_EthSwt_Ip_WriteTrcvRegister( uint8 SwitchIdx, uint8 TrcvIdx, uint8 RegIdx, uint16 RegVal );
235 
236 /**
237  * @brief   Ethernet Switch Set switch port mode function
238  * @details Generic API for enabling/disabling ports
239  *
240     @param[in]      SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
241 *                   SwitchPortIdx   Index of the switch's port which is to be set
242 *                   PortEnable      FALSE: the port of the switch is disabled
243 *                                   TRUE: the port of the switch is enabled
244  *
245  * @return Result of the operation
246  * @retval E_OK        success
247  * @retval E_NOT_OK    The indexed switch port could not be set to PortMode
248  */
249 Std_ReturnType Netc_EthSwt_Ip_SetPortMode(uint8 SwitchIdx,
250                                           uint8 SwitchPortIdx,
251                                           boolean PortEnable);
252 
253 /**
254 * @brief            Ethernet Switch Get switch port mode function.
255 * @details          Obtains the mode of the indexed switch port
256 *                   The function EthSwt_GetPortMode shall read the mode of the indexed port of the switch.
257 *
258 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
259 *                   SwitchPortIdx   Index of the port at the addressed switch
260 *
261 * @param[out]       PortEnable     FALSE: the port of the switch is disabled
262 *                                  TRUE: the port of the switch is enabled
263 *
264 * @return           Result of the operation
265 * @retval           E_OK        success
266 * @retval           E_NOT_OK    The mode of the indexed switch port could not be obtained.
267 */
268 Std_ReturnType Netc_EthSwt_Ip_GetPortMode( uint8 SwitchIdx,
269                                            uint8 SwitchPortIdx,
270                                            boolean *PortEnable
271                                            );
272 
273 /**
274 * @brief            Ethernet Switch get baud rate function.
275 * @details          Obtains the baud rate of the indexed switch port
276 *                   The function EthSwt_GetBaudRate shall read the current baud rate of the indexed switch port.
277 *
278 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
279 *                   SwitchPortIdx   Index of the port at the addressed switch
280 *
281 * @param[out]       BaudRate     ETHTRCV_BAUD_RATE_10MBIT: 10MBit connection
282 *                                ETHTRCV_BAUD_RATE_100MBIT: 100MBit connection
283 *                                ETHTRCV_BAUD_RATE_1000MBIT: 1000MBit connection
284 *
285 * @return           Result of the operation
286 * @retval           E_OK        success
287 * @retval           E_NOT_OK    Baud rate of the indexed switch port could not be obtained
288 */
289 Std_ReturnType Netc_EthSwt_Ip_GetPortSpeed( uint8 SwitchIdx,
290                                             uint8 SwitchPortIdx,
291                                             EthTrcv_BaudRateType * BaudRate
292                                           );
293 
294 /**
295 * @brief            Ethernet Switch set baud rate function.
296 * @details          Set the baud rate of the indexed switch port
297 *                   The function EthSwt_SetBaudRate shall set the current baud rate of the indexed switch port.
298 *
299 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
300 *                   SwitchPortIdx   Index of the port at the addressed switch
301 *                   BaudRate     ETHTRCV_BAUD_RATE_10MBIT: 10MBit connection
302 *                                ETHTRCV_BAUD_RATE_100MBIT: 100MBit connection
303 *                                ETHTRCV_BAUD_RATE_1000MBIT: 1000MBit connection
304 *
305 * @return           Result of the operation
306 * @retval           E_OK        success
307 * @retval           E_NOT_OK    Baud rate of the indexed switch port could not be changed
308 */
309 Std_ReturnType Netc_EthSwt_Ip_SetPortSpeed( uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType BaudRate);
310 
311 /**
312 * @brief            Ethernet Switch get duplex mode function.
313 * @details          Obtains the duplex mode of the indexed switch port
314 *                   The function EthSwt_GetDuplexMode shall read the current duplex mode of the indexed switch
315 *                   port.
316 *
317 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
318 *                   SwitchPortIdx   Index of the port at the addressed switch
319 *
320 * @param[out]       DuplexModePtr   ETHTRCV_DUPLEX_MODE_HALF: half duplex connections
321 *                                   ETHTRCV_DUPLEXMODE_FULL: full duplex connection
322 *
323 * @return           Result of the operation
324 * @retval           E_OK        success
325 * @retval           E_NOT_OK    duplex mode of the indexed switch port could not be obtained
326 */
327 Std_ReturnType Netc_EthSwt_Ip_GetDuplexMode( uint8 SwitchIdx,
328                                              uint8 SwitchPortIdx,
329                                              EthTrcv_DuplexModeType * DuplexMode
330                                            );
331 
332 /**
333  * @brief       This function sets the MAC address of a certain
334  * @details     This will be used to set the MAC address asignated to a certain port of the switch
335  *
336  * @param[in]  SwitchIndex  the index of the switch
337  * @param[in]  PortIndex    the index of the port
338  * @param[in]  MacAddr      The physical address of the port
339  *
340  * @return     Result of the operation
341  * @retval     E_OK       Success
342  * @retval     E_NOT_OK   MAC Address could not be changed
343  */
344 Std_ReturnType Netc_EthSwt_Ip_SetMacAddr(uint8 SwitchIdx, uint8 PortIndex, const uint8 *MacAddr);
345 
346 /**
347  * @brief       This function reads the MAC address of a certain port
348  * @details     This will be used to read the MAC address asignated to a certain port of the switch
349  *
350  * @param[in]  SwitchIndex  the index of the switch
351  * @param[in]  PortIndex    the index of the port
352  * @param[out] MacAddr      The physical address of the port
353  */
354 void Netc_EthSwt_Ip_GetMacAddr(uint8 SwitchIdx, uint8 PortIndex, uint8 *MacAddr);
355 
356 /**
357 * @brief            Ethernet Switch get port MAC address function.
358 * @details          Obtains the port over which this MAC-address at the indexed switch can be reached.
359 *                   The result might be used for a DHCP-server which will need the port - MAC-resolution.
360 *                   If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot
361 *                   be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK.
362 *
363 * @param[in]        SwitchIdx    The switch index
364 *                   cbdrIndex:   Index of switch command BD rings
365 *                   Fid:         Filtering ID
366 *                   MacAddr      MAC-address for which a switch port is searched over which the node with this
367 *                                MAC-address can be reached.
368 *
369 * @param[out]       PortIdxPtr      Pointer to the port index
370 *
371 * @return           Result of the operation
372 * @retval           E_OK        success
373 * @retval           E_NOT_OK    multiple ports were found
374 */
375 Std_ReturnType Netc_EthSwt_Ip_GetPortMacAddr( uint8 SwitchIdx, uint16 Fid, const uint8 * MacAddr, uint8 * PortIdx);
376 
377 
378 /**
379 * @brief            Ethernet Switch get counter values function.
380 * @details          Reads a list with drop counter values of the corresponding port of the switch.
381 *                   The meaning of these values is described at Netc_EthSwt_Ip_CounterType.
382 *
383 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
384 *                   SwitchPortIdx   Index of the port at the addressed switch
385 *
386 * @param[out]       Counter      counter values. The meaning of these values is described at Netc_EthSwt_Ip_CounterType
387 *
388 * @return           Result of the operation
389 * @retval           E_OK        success
390 * @retval           E_NOT_OK    counter values read failure
391 */
392 Std_ReturnType Netc_EthSwt_Ip_GetCounters( uint8 SwitchIdx, uint8 SwitchPortIdx, Netc_EthSwt_Ip_CounterType *Counter );
393 
394 /**
395 * @brief            Ethernet Switch get counter values for each MAC function.
396 * @details          Reads a list with drop counter values for each MAC of the corresponding port of the switch.
397 *                   The meaning of these values is described at Netc_EthSwt_Ip_CounterType.
398 *                   For pseudoports with one pseduoMAC, only the first element of the counter array gets populated.
399 *
400 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
401 *                   SwitchPortIdx   Index of the port at the addressed switch
402 *
403 * @param[out]       Counter      Array for counter values. Position 0 contains counters for MAC0(EMAC) and position 1 for MAC1(PMAC).
404 *                                The meaning of these values is described at Netc_EthSwt_Ip_CounterType
405 *
406 * @return           Result of the operation
407 * @retval           E_OK        success
408 * @retval           E_NOT_OK    counter values read failure
409 */
410 Std_ReturnType Netc_EthSwt_Ip_GetAllCounters( uint8 SwitchIdx, uint8 SwitchPortIdx, Netc_EthSwt_Ip_CounterType Counters[2U] );
411 
412 /**
413  * @brief         Ethernet Switch get single counter value function.
414  * @details       Reads a single drop counter value from the corresponding port of the switch.
415  *                The meaning of these values is described at Netc_EthSwt_Ip_SingleCounterType.
416  *
417  * @param[in]     SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
418  *                SwitchPortIdx   Index of the port at the addressed switch
419  *
420  * @param[in]    Counter         single counter register offset
421  *
422  * @return       Single counter value. The meaning of these values is described at Netc_EthSwt_Ip_SingleCounterType.
423  */
424 Netc_EthSwt_Ip_CounterValueType Netc_EthSwt_Ip_GetCounter( uint8 SwitchIdx, uint8 SwitchPortIdx, Netc_EthSwt_Ip_SingleCounterType Counter );
425 
426 /**
427 * @brief            Ethernet switch enable VLAN function.
428 * @details          Enables or disables a pre-configured VLAN at a certain port of a switch.
429 *
430 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
431 *                   SwitchPortIdx   Index of the port at the addressed switch
432 *                   VlanId          VLAN-ID to a preconfigured configuration on the given ingress port
433 *                   Enable          1 = VLAN-configuration enabled
434 *                                   0 = VLAN-configuration disabled (frames with given VLAN-ID will be dropped)
435 *
436 * @return           Result of the operation
437 * @retval           E_OK        success
438 * @retval           E_NOT_OK    Query command error or no mached Vlan ID entry found
439 */
440 Std_ReturnType Netc_EthSwt_Ip_EnableVlan( uint8 SwitchIdx, uint8 SwitchPortIdx, uint16 VlanId, boolean Enable );
441 
442 /**
443 * @brief            Ethernet switch set MAC learning mode function.
444 * @details          Sets the MAC learning mode in one of the tree modes:
445 *                   1) HW learning enabled
446 *                   2) Hardware learning disabled
447 *
448 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
449 * @param[in]        MacLearningMode Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware
450 *
451 * @return           Result of the operation
452 * @retval           E_OK        success
453 * @retval           E_NOT_OK    MAC learning mode could not be set
454 */
455 Std_ReturnType Netc_EthSwt_Ip_SetMacLearningMode( uint8 SwitchIdx, Netc_EthSwt_Ip_MacLearningOptionType MacLearningMode );
456 
457 /**
458 * @brief            Ethernet switch get MAC learning mode function.
459 * @details          Returns the MAC learning mode:
460 *                   1) HW learning enabled
461 *                   2) Hardware learning disabled
462 *
463 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
464 *
465 * @param[out]       MacLearningMode Defines whether MAC addresses shall be learned and if they shall be learned in software or hardware
466 *
467 * @return           Result of the operation
468 * @retval           E_OK        success
469 * @retval           E_NOT_OK    MAC learning mode could not be read
470 */
471 Std_ReturnType Netc_EthSwt_Ip_GetMacLearningMode( uint8 SwitchIdx, Netc_EthSwt_Ip_MacLearningOptionType * MacLearningMode );
472 
473 /**
474 * @brief            Ethernet switch get loopback state function.
475 * @details          Obtain the current status of the port loopback for the indexed external Ethernet switch port
476 *
477 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
478 * @param[in]        SwitchPortIdx   Index of the port at the addressed switch
479 *
480 * @param[out]       LoopbackEnable  Pointer to the memory where the port loopback mode true/false
481 *
482 * @return           Result of the operation
483 * @retval           E_OK        the requested port loopback state for the indexed Ethernet switch port was set successfully.
484 * @retval           E_NOT_OK    the port loopback configuration for the indexed Ethernet switch returned not successfully.
485 *                               (i.e. indexed ethernet switch is not available)
486 */
487 Std_ReturnType Netc_EthSwt_Ip_PortGetLoopbackMode( uint8 SwitchIdx,
488                                                    uint8 SwitchPortIdx,
489                                                    boolean * LoopbackEnable
490                                                   );
491 
492 /**
493 * @brief            Ethernet switch set loopback state function.
494 * @details          Set the current state of port loopback for the indexed Ethernet external switch port
495 *
496 * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
497 *                   SwitchPortIdx   Index of the port at the addressed switch
498 *                   LoopbackEnable  Contain the requested port loopback mode
499 *
500 * @return           Result of the operation
501 * @retval           E_OK        the port loopback state for the indexed Ethernet switch port was set successfully.
502 * @retval           E_NOT_OK    the port loopback configuration for the indexed Ethernet switch was not set successfully.
503 *                               (i.e. indexed ethernet switch is not available)
504 */
505 Std_ReturnType Netc_EthSwt_Ip_PortSetLoopbackMode( uint8 SwitchIdx,
506                                                    uint8 SwitchPortIdx,
507                                                    boolean LoopbackEnable
508                                                   );
509 
510 /**
511  * @brief            Reset configuration of switch
512  * @details          External function for reseting the learned entries from the FDB table of the switch..
513  *
514  * @param[in]        SwitchIdx  Index of the switch within the context of the Ethernet Switch Driver
515  *
516  * @return           Result of the operation
517  * @retval           E_OK :  reset dynamic FDB entries successfully
518  * @retval           E_NOT_OK : fail to reset dynamic FDB entries
519  */
520 Std_ReturnType Netc_EthSwt_Ip_ResetConfiguration(uint8 SwitchIdx);
521 
522 /**
523  * @brief            Get Fdb Table Entry List function
524  * @details          External function for getting existing FDB table entries in command ring 0.
525  *                   Provide the static entries first and then the dynamic entries if the value of NumberOfElements is not 0.
526  *
527  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
528  * @param[in]        NumberOfElements Maximum number of entries which can be written into the FdbTableList
529  * @param[out]       NumberOfElements Number of available entries which are currently be written into the FdbTableList
530  * @param[out]       FdbTableList     A pointer points to a list of FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
531  *
532  * @return           Result of the operation
533  * @retval           0 :  success
534  * @retval           others : fail
535  */
536 Std_ReturnType Netc_EthSwt_Ip_GetFdbTable(uint8 SwitchIdx, uint16 * NumberOfElements, Netc_EthSwt_Ip_FdbEntryDataType * FdbTableList);
537 
538 /**
539  * @brief            Search Fdb Table Entry function
540  * @details          External function for searching existing FDB table entries one by one in command ring 0.
541  *
542  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
543  * @param[in]        ResumeEntryId      To start the search, ResumeEntryId should be set to 0xFFFFFFFF
544  * @param[in]        SearchCriteriaData The data of match criteria and match data. To start a specific search, you have to fill in SearchCriteriaData with Netc_EthSwt_Ip_FDBTableMatchCriteriaDataType
545  *                                      and its corresponding match data (ACTE data, CFGE data or KEYE data).
546  * @param[out]       ResumeEntryId      The next valid Entry ID that is used to continue the search. If ResumeEntryId equals 0xFFFFFFFF, then that means (a)the search is completed
547  *                                      or (b)there is no matched entry found.
548  * @param[out]       FdbTableEntry      A pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType.
549  *
550  * @return           Result of the operation
551  * @retval           0 :  success
552  * @retval           others : fail
553  */
554 Std_ReturnType Netc_EthSwt_Ip_SearchFdbTable( uint8 SwitchIdx,
555                                               uint32 * ResumeEntryId,
556                                               const Netc_EthSwt_Ip_FDBTableSearchCriteriaDataType * SearchCriteriaData,
557                                               Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
558                                             );
559 
560 /**
561  * @brief            Query Fdb Table Entry function
562  * @details          External function for querying one FDB entry with "Exact Match Key Element Match" access method.
563  *                   That means only "Exact Match Key Element Match" access method is supported.
564  *
565  * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
566  * @param[out]       MatchedEntries  Number of matched entry
567  * @param[in]        FdbTableEntry   Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
568  *                                   which provides the data for "query" operation
569  * @param[out]       FdbTableEntry   A pointer that returns the data of a matched entry by "query" operation
570  *                                   The data is valid only when MatchedEntries equals 1.
571  *
572  * @return           Result of the operation
573  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
574  * @retval           others : fail
575  */
576 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryFdbTableEntry( uint8 SwitchIdx,
577                                                                  uint32 *MatchedEntries,
578                                                                  Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
579                                                                );
580 
581 /**
582  * @brief            Delete Fdb Table Entry function
583  * @details          External function for deleting one FDB entry with "Exact Match Key Element Match" access method.
584  *                   That means only "Exact Match Key Element Match" access method is supported.
585  *
586  * @param[in]        SwitchIdx       Index of the switch within the context of the Ethernet Switch Driver
587  * @param[out]       MatchedEntries  Number of matched entry
588  * @param[in]        FdbTableEntry   Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
589  *
590  * @return           Result of the operation
591  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
592  * @retval           others : fail
593  */
594 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteFdbTableEntry( uint8 SwitchIdx,
595                                                                   uint32 *MatchedEntries,
596                                                                   const Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry
597                                                                 );
598 
599 /**
600  * @brief            Add or Update Fdb Table Entry function
601  * @details          External function for adding or updating one FDB entry with "Exact Match Key Element Match" access method.
602  *                   That means only "Exact Match Key Element Match" access method is supported.
603  *
604  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
605  * @param[in]        Cmd              Add, Update and AddOrUpdate commands are supported
606  * @param[out]       MatchedEntries   Number of matched entries
607  * @param[in]        FdbTableEntry    Pointer points to a FDB entry structure Netc_EthSwt_Ip_FdbEntryDataType
608  *
609  * @return           Result of the operation
610  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
611  * @retval           others : fail
612  */
613 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateFdbTableEntry( uint8 SwitchIdx, Netc_EthSwt_Ip_CommandsType Cmd, uint32 *MatchedEntries, const Netc_EthSwt_Ip_FdbEntryDataType * FdbTableEntry);
614 
615 /**
616  * @brief   Query the Switch Hardware Version
617  * @details External function for Query Switch Hardware Version
618  *
619  * @param[in]  SwitchIdx  Index of the switch within the context of the Ethernet Switch Driver
620  * @param[out] HwVersion  The switch hardware version.
621  *
622  * @return Result of the operation
623  * @retval E_OK : success
624  */
625 Std_ReturnType Netc_EthSwt_Ip_GetSwitchIdentifier(uint8 SwitchIdx, uint32 *HwVersion);
626 
627 /**
628  * @brief            Get Vlan filter Table Entry List function
629  * @details          External function for getting existing Vlan filter table entries in command ring 0.
630  *
631  * @param[in]        SwitchIdx               Index of the switch within the context of the Ethernet Switch Driver
632  * @param[in]        NumberOfElements        Maximum number of entries which can be written into the VlanFilterTableList
633  * @param[out]       NumberOfElements        Number of available entries which are currently be written into the VlanFilterTableList
634  * @param[out]       VlanFilterTableList     A pointer points to a list of Vlan filter entry structure Netc_EthSwt_Ip_VlanFilterEntryDataType
635  *
636  * @return           Result of the operation
637  * @retval           0 :  success
638  * @retval           others : fail
639  */
640 Std_ReturnType Netc_EthSwt_Ip_GetVlanFilterTable( uint8 SwitchIdx, uint16 * NumberOfElements, Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableList );
641 
642 /**
643  * @brief            Add or Update Vlan Filter Table Entry function
644  * @details          External function for adding or updating one Vlan Filter entry to command ring with "Exact Match Key Element Match" access method.
645  *                   That means only "Exact Match Key Element Match" access method is supported.
646  *
647  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
648  * @param[in]        Cmd                    Add, Update and AddOrUpdate commands are supported
649  * @param[out]       MatchedEntries         Number of matched entries
650  * @param[in]        VlanFilterTableEntry:  Pointer points to a Vlan Filter entry structure Netc_EthSwt_Ip_VlanFilterEntryDataType
651  *
652  * @return           Result of the operation
653  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
654  * @retval           others : fail
655  */
656 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateVlanFilterTableEntry( uint8 SwitchIdx,
657                                                                               Netc_EthSwt_Ip_CommandsType Cmd,
658                                                                               uint32 *MatchedEntries,
659                                                                               const Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableEntry
660                                                                             );
661 
662 /**
663  * @brief            Query Vlan Filter Table Entry function
664  * @details          External function for querying one Vlan Filter entry with "full query" and "Exact Match Key Element Match" access method.
665  *                   That means only "Exact Match Key Element Match" access method is supported.
666  *
667  * @param[in]        SwitchIdx                Index of the switch within the context of the Ethernet Switch Driver
668  * @param[out]       MatchedEntries           Number of matched entries
669  * @param[in]        VlanFilterTableEntry:    A pointer that provides the data needed by "query" operation, like Vlan Filter entry Id
670  * @param[out]       VlanFilterTableEntry:    A pointer that returns the data of a matched entry by "query" operation
671  *                                            The data is valid only when MatchedEntries equals 1.
672  *
673  * @return           Result of the operation
674  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
675  * @retval           others : fail
676  */
677 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryVlanFilterTableEntry( uint8 SwitchIdx,
678                                                                         uint32 *MatchedEntries,
679                                                                         Netc_EthSwt_Ip_VlanFilterEntryDataType * VlanFilterTableEntry
680                                                                       );
681 
682 /**
683  * @brief            Delete Vlan Filter Table Entry function
684  * @details          External function for deleting one Vlan Filter entry with "Exact Match Key Element Match" access method.
685  *
686  * @param[in]        SwitchIdx                Index of the switch within the context of the Ethernet Switch Driver
687  * @param[out]       MatchedEntries           Number of matched entries
688  * @param[in]        VlanFilterTableEntryId:  Vlan Filter entry Id
689  *
690  * @return           Result of the operation
691  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
692  * @retval           others : fail
693  */
694 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteVlanFilterTableEntry( uint8 SwitchIdx,
695                                                                          uint32 *MatchedEntries,
696                                                                          uint32 VlanFilterTableEntryId
697                                                                        );
698 
699 /**
700  * @brief            Query Egress Count Table Entry function
701  * @details          External function for querying one Egress Count entry with "Entry Id Match" access method.
702  *
703  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
704  * @param[out]       EntryId                Egress Counter Entry ID (EC_EID), an index to an entry in Egress Count Table.
705  *                                          The EC_EID is specified in the Egress Treatment table.
706  * @param[out]       MatchedEntries         Number of matched entries
707  * @param[out]       StatisticsData:        Pointer points to an Egress Count entry structure Netc_EthSwt_Ip_ECTableStatisticsDataType.
708  *                                          It contains the data of Enqueued Frame Count and Rejected Frame Count.
709  *
710  * @return           Result of the operation
711  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
712  * @retval           others : fail
713  */
714 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressCountTableEntry( uint8 SwitchIdx,
715                                                                          uint32 EntryId,
716                                                                          uint32 *MatchedEntries,
717                                                                          Netc_EthSwt_Ip_ECTableStatisticsDataType *StatisticsData
718                                                                        );
719 
720 #if (NETC_ETHSWT_NUMBER_OF_EGRESSTREATMENT_ENTRIES > 0U)
721 /**
722  * @brief            Get Egress Count Table function
723  * @details          External function for retrieving the whole Egress Count table.
724  *
725  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
726  * @param[out]       MatchedEntries         Number of matched entries
727  * @param[out]       EgressCountTable       Pointer points to an EgressCount table structure Netc_EthSwt_Ip_ECTableStatisticsDataType.
728  *                                          It contains the data of Enqueued Frame Count and Rejected Frame Count for each table entry.
729  *
730  * @return           Result of the operation
731  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
732  * @retval           others : fail
733  */
734 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_GetEgressCountTable(uint8 SwitchIdx, uint32 * MatchedEntries, Netc_EthSwt_Ip_ECTableStatisticsDataType * EgressCountTable);
735 #endif
736 
737 /**
738  * @brief            Reset Egress Count Table Entry function
739  * @details          External function for reseting one Egress Count entry with "Entry Id Match" access method.
740  *
741  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
742  * @param[out]       EntryId                Egress Counter Entry ID (EC_EID), an index to an entry in Egress Count Table.
743  *                                          The EC_EID is specified in the Egress Treatment table.
744  * @param[out]       MatchedEntries         Number of matched entries.
745  *                                          1: found a matched entry and reset the statistics data of the entry successfully.
746  *                                          0: no matched entry found.
747  *
748  * @return           Result of the operation
749  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
750  * @retval           others : fail
751  */
752 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_ResetEgressCountTableEntry( uint8 SwitchIdx,
753                                                                          uint32 EntryId,
754                                                                          uint32 *MatchedEntries
755                                                                        );
756 
757 /**
758  * @brief            Add or Update Egress Treatment Table Entry function
759  * @details          External function for adding or updating one Egress Treatment entry to command ring with "Entry Id Match" access method.
760  *                   That means only "Entry Id Match" access method is supported.
761  *
762  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
763  * @param[in]        Cmd                        Add, Update and AddOrUpdate commands are supported
764  * @param[out]       MatchedEntries             Number of matched entries
765  * @param[in]        EgressTreatmentTableEntry: Pointer points to a Egress Treatment entry structure Netc_EthSwt_Ip_EgressTreatmentEntryDataType
766  *
767  * @return           Result of the operation
768  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
769  * @retval           others : fail
770  */
771 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateEgressTreatmentTableEntry( uint8 SwitchIdx,
772                                                                                    Netc_EthSwt_Ip_CommandsType Cmd,
773                                                                                    uint32 *MatchedEntries,
774                                                                                    const Netc_EthSwt_Ip_EgressTreatmentEntryDataType * EgressTreatmentTableEntry
775                                                                                  );
776 
777 /**
778  * @brief            Query Egress Treatment Table Entry function
779  * @details          External function for querying one Egress Treatment entry with "Entry Id Match" access method.
780  *
781  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
782  * @param[in]        EgressTreatmentTableEntry      A pointer that provides the data needed by "query" operation
783  * @param[out]       MatchedEntries                 Number of matched entries
784  * @param[out]       EgressTreatmentTableEntry      A pointer that returns the data of a matched entry by "query" operation
785  *                                                  The data is valid only when MatchedEntries equals 1.
786  *
787  * @return           Result of the operation
788  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
789  * @retval           others : fail
790  */
791 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressTreatmentTableEntry( uint8 SwitchIdx,
792                                                                              uint32 *MatchedEntries,
793                                                                              Netc_EthSwt_Ip_EgressTreatmentEntryDataType * EgressTreatmentTableEntry
794                                                                            );
795 
796 /**
797  * @brief            Delete Egress Treatment Table Entry function
798  * @details          External function for deleting one Egress Treatment entry with "Entry Id Match" access method.
799  *
800  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
801  * @param[in]        EgressTreatmentTableEntryId    Egress Treatment Entry ID, an index to an entry in Egress Treatment Table.
802  * @param[out]       MatchedEntries                 Number of matched entries
803  *
804  * @return           Result of the operation
805  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
806  * @retval           others : fail
807  */
808 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteEgressTreatmentTableEntry( uint8 SwitchIdx,
809                                                                               uint32 EgressTreatmentTableEntryId,
810                                                                               uint32 *MatchedEntries
811                                                                             );
812 /**
813  * @brief            Add or Update Frame Modification Table Entry function
814  * @details          External function for adding or updating one Frame Modification entry to command ring with "Entry Id Match" access method.
815  *                   That means only "Entry Id Match" access method is supported.
816  *
817  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
818  * @param[in]        Cmd                        Add, Update and AddOrUpdate commands are supported
819  * @param[out]       MatchedEntries             Number of matched entries
820  * @param[in]        FrmModificationTableEntry: Pointer points to a Frame Modification entry structure Netc_EthSwt_Ip_FrmModificationEntryDataType
821  *
822  * @return           Result of the operation
823  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
824  * @retval           others : fail
825  */
826 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateFrmModificationTableEntry( uint8 SwitchIdx,
827                                                                                    Netc_EthSwt_Ip_CommandsType Cmd,
828                                                                                    uint32 *MatchedEntries,
829                                                                                    const Netc_EthSwt_Ip_FrmModificationEntryDataType * FrmModificationTableEntry
830                                                                                  );
831 
832 /**
833  * @brief            Query Frame Modification Table Entry function
834  * @details          External function for querying one Frame Modification entry with "Entry Id Match" access method.
835  *
836  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
837  * @param[in]        FrmModificationTableEntry      A pointer that provides the data needed by "query" operation
838  * @param[out]       MatchedEntries                 Number of matched entries
839  * @param[out]       FrmModificationTableEntry      A pointer that returns the data of a matched entry by "query" operation
840  *                                                  The data is valid only when MatchedEntries equals 1.
841  *
842  * @return           Result of the operation
843  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
844  * @retval           others : fail
845  */
846 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryFrmModificationTableEntry( uint8 SwitchIdx,
847                                                                              uint32 *MatchedEntries,
848                                                                              Netc_EthSwt_Ip_FrmModificationEntryDataType * FrmModificationTableEntry
849                                                                             );
850 
851 /**
852  * @brief            Delete Frame Modification Table Entry function
853  * @details          External function for deleting one Frame Modification entry with "Entry Id Match" access method.
854  *
855  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
856  * @param[in]        FrmModificationEntryID         Frame Modification Entry ID, an index to an entry in Frame Modification Table.
857  * @param[out]       MatchedEntries                 Number of matched entries
858  *
859  * @return           Result of the operation
860  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
861  * @retval           others : fail
862  */
863 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteFrmModificationTableEntry( uint8 SwitchIdx,
864                                                                               uint32 FrmModificationEntryID,
865                                                                               uint32 *MatchedEntries
866                                                                             );
867 
868 /**
869  * @brief            Add Ingress Port Filter Table Entry function
870  * @details          External function for adding ingress port filter table entry to command ring with "NETC_ETHSWT_TERNARY_MATCH_KEY_ELEMENT_MATCH" access method.
871  *
872  * @param[in]        SwitchIdx                    Index of the switch within the context of the Ethernet Switch Driver
873  * @param[out]       MatchedEntries               Number of matched entries
874  * @param[in]        IngressPortFilterTableEntry  Pointer points to an ingress port filter table entry structure Netc_EthSwt_Ip_IngressPortFilterEntryDataType
875  *
876  * @return           Result of the operation
877  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
878  * @retval           others : fail
879  */
880 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddIngressPortFilterTableEntry( uint8 SwitchIdx,
881                                                                              uint32 *MatchedEntries,
882                                                                              Netc_EthSwt_Ip_IngressPortFilterEntryDataType * IngressPortFilterTableEntry
883                                                                            );
884 
885 /**
886  * @brief            Query Ingress Port Filter Table Entry function
887  * @details          External function for querying one Ingress Port Filter Table entry with "Entry Id Match" access method.
888  *
889  * @param[in]        SwitchIdx                        Index of the switch within the context of the Ethernet Switch Driver
890  * @param[in]        IngressPortFilterTableEntry      A pointer that provides the data needed by "query" operation, Entry_ID specifically
891  * @param[out]       MatchedEntries                   Number of matched entries
892  * @param[out]       IngressPortFilterTableEntry      A pointer that returns the data of a matched entry by "query" operation
893  *                                                    The data is valid only when MatchedEntries equals 1.
894  *
895  * @return           Result of the operation
896  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
897  * @retval           others : fail
898  */
899 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressPortFilterTableEntry( uint8 SwitchIdx,
900                                                                                uint32 *MatchedEntries,
901                                                                                Netc_EthSwt_Ip_IngressPortFilterEntryDataType * IngressPortFilterTableEntry
902                                                                              );
903 
904 /**
905  * @brief            Delete Ingress Port Filter Table Entry function
906  * @details          External function for deleting one Ingress Port Filter entry with "Entry Id Match" access method.
907  *
908  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
909  * @param[in]        IngressPortFilterEntry         Ingress Port Filter Entry ID
910  * @param[out]       MatchedEntries                 Number of matched entries
911  *
912  * @return           Result of the operation
913  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
914  * @retval           others : fail
915  */
916 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressPortFilterTableEntry( uint8 SwitchIdx,
917                                                                                 uint32 *MatchedEntries,
918                                                                                 uint32 IngressPortFilterEntry
919                                                                               );
920 
921 /**
922  * @brief            Enable Ingress Port Filter Table Entry lookup function for ports
923  * @details          External function for enabling Ingress Port Filter entry lookup functions for ports.
924  *
925  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
926  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
927  * @param[in]        Enable                         Enable or disable the lookup function
928  *
929  * @return           Result of the operation
930  * @retval           E_OK : success
931  * @retval           others : fail
932  */
933 Std_ReturnType Netc_EthSwt_Ip_EnableIngressPortFiltering( uint8 SwitchIdx, uint8 SwitchPortIdx, boolean Enable );
934 
935 /**
936  * @brief            Enable/disable Switch mirroring
937  * @details          External function for setting mirroring state for the switch.
938  *
939  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
940  * @param[in]        MirrorState                    0: switch mirroring disabled. 1: switch mirroring enabled.
941  *
942  * @return           Result of the operation
943  * @retval           E_OK : success
944  * @retval           others : fail
945  */
946 Std_ReturnType Netc_EthSwt_Ip_SetMirrorState( uint8 SwitchIdx, Netc_EthSwt_Ip_SwitchMirrorStateType MirrorState );
947 
948 /**
949  * @brief            Obtain Switch mirroring state
950  * @details          External function for obtaining mirroring state of the switch.
951  *
952  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
953  * @param[out]       MirrorStatePtr                 0: switch mirroring disabled. 1: switch mirroring enabled.
954  *
955  * @return           Result of the operation
956  * @retval           E_OK : success
957  * @retval           others : fail
958  */
959 Std_ReturnType Netc_EthSwt_Ip_GetMirrorState( uint8 SwitchIdx, Netc_EthSwt_Ip_SwitchMirrorStateType *MirrorStatePtr );
960 
961 /**
962  * @brief            Write mirror configuration
963  * @details          External function for writing mirror configuration to the switch.
964  *
965  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
966  * @param[in]        MirrorConfigurationPtr         A Netc_EthSwt_Ip_SwitchMirrorCfgType pointer with the configuration data of mirroring
967  *
968  * @return           Result of the operation
969  * @retval           E_OK : success
970  * @retval           others : fail
971  */
972 Std_ReturnType Netc_EthSwt_Ip_WriteMirrorConfiguration( uint8 MirroredSwitchIdx, const Netc_EthSwt_Ip_SwitchMirrorCfgType* MirrorConfigurationPtr );
973 
974 /**
975  * @brief            Read mirror configuration
976  * @details          External function for obtaining mirror configuration of the switch.
977  *
978  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
979  * @param[out]       MirrorConfigurationPtr         A Netc_EthSwt_Ip_SwitchMirrorCfgType pointer with the configuration data of mirroring
980  *
981  * @return           Result of the operation
982  * @retval           E_OK : success
983  * @retval           others : fail
984  */
985 Std_ReturnType Netc_EthSwt_Ip_ReadMirrorConfiguration( uint8 MirroredSwitchIdx, Netc_EthSwt_Ip_SwitchMirrorCfgType* MirrorConfigurationPtr );
986 
987 /**
988  * @brief            Delete mirror configuration
989  * @details          External function for deleting the mirror configuration of the switch.
990  *
991  * @param[in]        MirroredSwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
992  *
993  * @return           Result of the operation
994  * @retval           E_OK : success
995  * @retval           others : fail
996  */
997 Std_ReturnType Netc_EthSwt_Ip_DeleteMirrorConfiguration( uint8 MirroredSwitchIdx );
998 
999 /**
1000  * @brief            Set the egress frame preemption feature for a port
1001  * @details          Set express and preemptive traffic classes for a port
1002  *
1003  * @param[in]         SwitchIdx                     Index of the switch within the context of the Ethernet Switch Driver
1004  * @param[in]         SwitchPortIdx                 Index of the port at the addressed switch
1005  * @param[in]         TrafficClass                  Flags to mark traffic classes as express (0) or preemptive (1)
1006  *
1007  * @return           Result of the operation
1008  * @retval           E_OK : success
1009  * @retval           others : fail
1010  */
1011 Std_ReturnType Netc_EthSwt_Ip_ConfigureEgressFramePreemption(uint8 SwitchIdx, const uint8 SwitchPortIdx, const boolean TrafficClass[8U]);
1012 
1013 /**
1014  * @brief            Enable egress frame preemption for a port
1015  * @details          The egress frame preemption is Enable/Disable
1016  *
1017  * @param[in]         SwitchIdx                     Index of the switch within the context of the Ethernet Switch Driver
1018  * @param[in]         SwitchPortIdx                 Index of the port at the addressed switch
1019  * @param[in]         Enable                        TRUE: enable egress frame preemption on the port. FALSE: disable egress frame preemption on the port.
1020  *
1021  * @return           Result of the operation
1022  * @retval           E_OK : success
1023  * @retval           others : fail
1024  */
1025 Std_ReturnType Netc_EthSwt_Ip_EnableEgressFramePreemption(uint8 SwitchIdx, const uint8 SwitchPortIdx, const boolean Enable);
1026 
1027 /**
1028  * @brief            Set the credit based shaper slope
1029  * @details          Set the idle slope for the credit based shaper
1030  *
1031  * Parameters:
1032  * -[in]     SwitchIdx           Index of the switch within the context of the Ethernet Switch Driver
1033  * -[in]     SwitchPortIdx   Index of the port at the addressed switch
1034  * -[in]     TrafficClass        The value range is 0 to 7
1035  * -[in]     idleSlope            Idleslope is the rate of credits that is accumulated (in bits per second)  when there  is  at  least  one packet waiting for transmission.
1036  *
1037  * @return           Result of the operation
1038  * @retval           E_OK : success
1039  * @retval           others : fail
1040  */
1041 Std_ReturnType Netc_EthSwt_Ip_ConfigureCreditBasedShaper(uint8 SwitchIdx, const uint8 SwitchPortIdx, const uint8 TrafficClass, const uint64 idleSlope);
1042 
1043 /**
1044  * @brief            Enable credit based shaper
1045  * @details          The credit base shaper TrafficClass is Enable/Disable
1046  *
1047  * Parameters:
1048  * -[in]     SwitchIdx            Index of the switch within the context of the Ethernet Switch Driver
1049  * -[in]     SwitchPortIdx    Index of the port at the addressed switch
1050  * -[in]     TrafficClass         The value range is 0 to 7
1051  * -[in]     Enable                  TRUE: enable credit based shaper on the port. FALSE: disable credit based shaper on the port.
1052  *
1053  * @return           Result of the operation
1054  * @retval           E_OK : success
1055  * @retval           others : fail
1056  */
1057 Std_ReturnType Netc_EthSwt_Ip_EnableCreditBasedShaper(uint8 SwitchIdx, const uint8 SwitchPortIdx, const uint8 TrafficClass, const boolean Enable);
1058 
1059 /**
1060  * @brief            Add or Update Time Gate Scheduling Table Entry function
1061  * @details          External function for adding/updating time gate scheduling table entry to command ring with "NETC_ETHSWT_ENTRY_ID_MATCH" access method.
1062  *
1063  * @param[in]        SwitchIdx                    Index of the switch within the context of the Ethernet Switch Driver
1064  * @param[in]        TimeGateSchedulingTableEntry Pointer points to an time gate scheduling table entry structure Netc_EthSwt_Ip_TimeGateSchedulingEntryDataType
1065  *
1066  * @return           Result of the operation
1067  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1068  * @retval           others : fail
1069  */
1070 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateTimeGateSchedulingTableEntry( uint8 SwitchIdx,
1071                                                                                       const Netc_EthSwt_Ip_TimeGateSchedulingEntryDataType *TimeGateSchedulingTableEntry
1072                                                                                     );
1073 
1074 /**
1075  * @brief            Enable or disable Time Gate Scheduling on a switch port.
1076  * @details          External function for enabling/disabling time gate scheduling on a switch port.
1077  *
1078  * @param[in]        SwitchIdx            Index of the switch within the context of the Ethernet Switch Driver
1079  * @param[in]        SwitchPortIdx        Index of the port at the addressed switch
1080  * @param[in]        Enable               Enable or disable the time gate scheduling
1081  *
1082  * @return           Result of the operation
1083  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1084  * @retval           others : fail
1085  */
1086 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_ConfigPortTimeGateScheduling( uint8 SwitchIdx,
1087                                                                            uint8 SwitchPortIdx,
1088                                                                            boolean Enable
1089                                                                          );
1090 
1091 /**
1092  * @brief            Set the mac layer duplex mode on a switch port.
1093  * @details
1094  *
1095  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1096  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1097  * @param[in]        EthSwtPortMacLayerDuplexMode   1 : full duplex mode; 0 : half duplex mode
1098  *
1099  * @return          Result of the operation
1100  * @retval          E_OK        success
1101  * @retval          E_NOT_OK    fail to set the duplx mode
1102  */
1103 Std_ReturnType Netc_EthSwt_Ip_SetPortMacLayerDuplexMode( uint8 SwitchIdx,
1104                                                          uint8 SwitchPortIdx,
1105                                                          Netc_EthSwt_Ip_PortDuplexType EthSwtPortMacLayerDuplexMode
1106                                                        );
1107 /**
1108  * @brief            Periodically called function to age the FDB entries.
1109  * @details
1110  *
1111  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1112  *
1113  */
1114 void Netc_EthSwt_Ip_MainFunction( uint8 SwitchIdx );
1115 
1116 /*
1117  * @brief            Set the pruning mode on a switch port.
1118  * @details
1119  *
1120  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1121  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1122  * @param[in]        PruningEnable                  TRUE : pruning is enabled; FALSE : pruning is disabled;
1123  *
1124  * @return          Result of the operation
1125  * @retval          E_OK        success
1126  * @retval          E_NOT_OK    fail to set the pruning mode
1127  */
1128 Std_ReturnType Netc_EthSwt_Ip_SetPruningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, boolean PruningEnable);
1129 
1130 /**
1131  * @brief            Get the pruning mode on a switch port.
1132  * @details
1133  *
1134  * @param[in]        SwitchIdx                      Index of the switch within the context of the Ethernet Switch Driver
1135  * @param[in]        SwitchPortIdx                  Index of the port at the addressed switch
1136  * @param[out]       PruningEnablePtr               TRUE : pruning is enabled; FALSE : pruning is disabled;
1137  *
1138  * @return          Result of the operation
1139  * @retval          E_OK        success
1140  * @retval          E_NOT_OK    fail to get the pruning mode
1141  */
1142 Std_ReturnType Netc_EthSwt_Ip_GetPruningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, boolean *PruningEnablePtr);
1143 
1144 /**
1145  * @brief            Retrieve time of free-running clock in the switch.
1146  * @details
1147  *
1148  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1149  * @param[out]       PtpTime            ptpTime Time of the free-running clock
1150  *
1151  * @return          Result of the operation
1152  * @retval          E_OK        success
1153  * @retval          E_NOT_OK    fail to get the time of free-running clock
1154  */
1155 Std_ReturnType Netc_EthSwt_Ip_GetPtpTSClk( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *PtpTime );
1156 
1157 /**
1158  * @brief            Retrieve time of corrected clock (synchronized time) in the switch.
1159  * @details
1160  *
1161  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1162  * @param[out]       PtpTime            ptpTime Time of the corrected clock
1163  *
1164  * @return          Result of the operation
1165  * @retval          E_OK        success
1166  * @retval          E_NOT_OK    fail to get the time of corrected clock
1167  */
1168 Std_ReturnType Netc_EthSwt_Ip_GetPtpClk( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *PtpTime );
1169 
1170 /**
1171  * @brief            Retrieve both time of free-running clock and corrected clock (synchronized time) in the switch.
1172  * @details
1173  *
1174  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1175  * @param[out]       FreeRunTime        Time of the free-running clock
1176  * @param[out]       CorrTime           Time of the corrected clock
1177  *
1178  * @return          Result of the operation
1179  * @retval          E_OK        success
1180  * @retval          E_NOT_OK    fail to get the time of free-running and corrected clock
1181  */
1182 Std_ReturnType Netc_EthSwt_Ip_GetPtpTimes( uint8 SwitchIdx, Netc_EthSwt_Ip_PtpTimeType *FreeRunTime, Netc_EthSwt_Ip_PtpTimeType *CorrTime );
1183 
1184 /**
1185  * @brief            Set a clk ratio for the corrected clock in the switch.
1186  * @details
1187  *
1188  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1189  * @param[in]        ClkRatio           is a fixed-point clock rate value with a single-bit integer part and a 31-bit fractional part.
1190  *
1191  * @return          Result of the operation
1192  * @retval          E_OK        success
1193  * @retval          E_NOT_OK    fail to set the clk ratio
1194  */
1195 Std_ReturnType Netc_EthSwt_Ip_SetPtpClkRatio( uint8 SwitchIdx, uint32 ClkRatio );
1196 
1197 /**
1198  * @brief            Add/Subtract an offset to/from the corrected clock (PTP_CLK).
1199  * @details
1200  *
1201  * @param[in]        SwitchIdx          Index of the switch within the context of the Ethernet Switch Driver
1202  * @param[in]        Offset             signed value, to add or substract from the offset register.
1203  *
1204  * @return          Result of the operation
1205  * @retval          E_OK        success
1206  * @retval          E_NOT_OK    fail to correct the offset
1207  */
1208 Std_ReturnType Netc_EthSwt_Ip_CorrectPtpClk( uint8 SwitchIdx, sint64 Offset );
1209 
1210 /**
1211  * @brief            Add or Update Rate Policer Table Entry function
1212  * @details          External function for adding or updating one Rate Policer entry with "Entry ID Match" access method.
1213  *                   That means only "Entry ID Match" access method is supported.
1214  *
1215  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1216  * @param[in]        Cmd              Add and Update commands are supported
1217  * @param[out]       MatchedEntries   Number of matched entries
1218  * @param[in]        RatePolicerTableEntry    Pointer points to a Rate policer entry structure Netc_EthSwt_Ip_RatePolicerEntryDataType
1219  *
1220  * @return           Result of the operation
1221  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1222  * @retval           others : fail
1223  */
1224 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateRatePolicerTableEntry( uint8 SwitchIdx,
1225                                                                                Netc_EthSwt_Ip_CommandsType Cmd,
1226                                                                                uint32 *MatchedEntries,
1227                                                                                const Netc_EthSwt_Ip_RatePolicerEntryDataType * RatePolicerTableEntry
1228                                                                              );
1229 
1230 /**
1231  * @brief            Query Rate Policer Table Entry function
1232  * @details          External function for querying one Rate Policer entry with "Entry ID Match" access method.
1233  *                   That means only "Entry ID Match" access method is supported.
1234  *
1235  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1236  * @param[out]       MatchedEntries         Number of matched entry
1237  * @param[in]        RatePolicerEntryId     Rate Policer table entry ID
1238  * @param[out]       RatePolicerTableEntry  A pointer that returns the data of a matched entry by "query" operation
1239  *                                          The data is valid only when MatchedEntries equals 1.
1240  *
1241  * @return           Result of the operation
1242  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1243  * @retval           others : fail
1244  */
1245 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryRatePolicerTableEntry( uint8 SwitchIdx,
1246                                                                          uint32 *MatchedEntries,
1247                                                                          uint32 RatePolicerEntryId,
1248                                                                          Netc_EthSwt_Ip_RatePolicerEntryRspDataType * RatePolicerTableEntry
1249                                                                        );
1250 
1251 /**
1252  * @brief            Delete Rate Policer Table Entry function
1253  * @details          External function for deleting one Rate Policer entry with "Entry ID Match" access method.
1254  *                   That means only "Entry ID Match" access method is supported.
1255  *
1256  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1257  * @param[out]       MatchedEntries         Number of matched entry
1258  * @param[in]        RatePolicerEntryId     Rate Policer entry ID
1259  *
1260  * @return           Result of the operation
1261  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1262  * @retval           others : fail
1263  */
1264 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteRatePolicerTableEntry( uint8 SwitchIdx,
1265                                                                           uint32 *MatchedEntries,
1266                                                                           uint32 RatePolicerEntryId
1267                                                                         );
1268 
1269 /**
1270  * @brief            Add or Update Ingress Stream Table Entry function
1271  * @details          External function for adding or updating one Ingress Stream entry with "Entry ID Match" access method.
1272  *                   That means only "Entry ID Match" access method is supported.
1273  *
1274  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1275  * @param[in]        Cmd              Add and Update commands are supported
1276  * @param[out]       MatchedEntries   Number of matched entries
1277  * @param[in]        IngressStreamTableEntry    Pointer points to a Ingress Stream entry structure Netc_EthSwt_Ip_IngressStreamEntryDataType
1278  *
1279  * @return           Result of the operation
1280  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1281  * @retval           others : fail
1282  */
1283 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamTableEntry( uint8 SwitchIdx,
1284                                                                                  Netc_EthSwt_Ip_CommandsType Cmd,
1285                                                                                  uint32 *MatchedEntries,
1286                                                                                  const Netc_EthSwt_Ip_IngressStreamEntryDataType * IngressStreamTableEntry
1287                                                                                );
1288 
1289 /**
1290  * @brief            Query Ingress Stream Table Entry function
1291  * @details          External function for querying one Ingress Stream entry with "Entry ID Match" access method.
1292  *                   That means only "Entry ID Match" access method is supported.
1293  *
1294  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1295  * @param[out]       MatchedEntries         Number of matched entry
1296  * @param[in]        IngressStreamEntryId     Ingress Stream table entry ID
1297  * @param[out]       IngressStreamTableEntry  A pointer that returns the data of a matched entry by "query" operation
1298  *                                            The data is valid only when MatchedEntries equals 1.
1299  *
1300  * @return           Result of the operation
1301  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1302  * @retval           others : fail
1303  */
1304 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamTableEntry( uint8 SwitchIdx,
1305                                                                            uint32 *MatchedEntries,
1306                                                                            uint32 IngressStreamEntryId,
1307                                                                            Netc_EthSwt_Ip_IngressStreamEntryDataType * IngressStreamTableEntry
1308                                                                          );
1309 
1310 /**
1311  * @brief            Delete Ingress Stream Table Entry function
1312  * @details          External function for deleting one Ingress Stream entry with "Entry ID Match" access method.
1313  *                   That means only "Entry ID Match" access method is supported.
1314  *
1315  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1316  * @param[out]       MatchedEntries         Number of matched entry
1317  * @param[in]        IngressStreamEntryId     Ingress Stream entry ID
1318  *
1319  * @return           Result of the operation
1320  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1321  * @retval           others : fail
1322  */
1323 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamTableEntry( uint8 SwitchIdx,
1324                                                                             uint32 *MatchedEntries,
1325                                                                             uint32 IngressStreamEntryId
1326                                                                           );
1327 
1328 /**
1329  * @brief            Add or Update Ingress Stream Count Table Entry function
1330  * @details          External function for adding or updating one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1331  *                   That means only "Exact Match Key Element Match" access method is supported.
1332  *
1333  * @param[in]        SwitchIdx                  Index of the switch within the context of the Ethernet Switch Driver
1334  * @param[in]        Cmd                        Add and Update commands are supported
1335  * @param[out]       MatchedEntries             Number of matched entries
1336  * @param[in]        IngressStreamCountEntryId  Index of the Ingress Stream Count Table Entry to be added or reset
1337  *
1338  * @return           Result of the operation
1339  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1340  * @retval           others : fail
1341  */
1342 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamCountTableEntry( uint8 SwitchIdx,
1343                                                                                        Netc_EthSwt_Ip_CommandsType Cmd,
1344                                                                                        uint32 *MatchedEntries,
1345                                                                                        uint32 IngressStreamCountId
1346                                                                                      );
1347 
1348 /**
1349  * @brief            Query Ingress Stream Count Table Entry function
1350  * @details          External function for querying one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1351  *                   That means only "Exact Match Key Element Match" access method is supported.
1352  *
1353  * @param[in]        SwitchIdx                       Index of the switch within the context of the Ethernet Switch Driver
1354  * @param[out]       MatchedEntries                  Number of matched entry
1355  * @param[in]        IngressStreamCountEntryId       Index of the Ingress Stream Count Table Entry to be queried
1356  * @param[out]       IngressStreamCountTableEntry    A pointer that returns the data of a matched entry by "query" operation
1357  *                                                   The data is valid only when MatchedEntries equals 1.
1358  *
1359  * @return           Result of the operation
1360  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1361  * @retval           others : fail
1362  */
1363 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamCountTableEntry( uint8 SwitchIdx,
1364                                                                                  uint32 *MatchedEntries,
1365                                                                                  uint32 IngressStreamCountEntryId,
1366                                                                                  Netc_EthSwt_Ip_IngressStreamCountTableRspDataType * IngressStreamCountTableEntry
1367                                                                                );
1368 
1369 /**
1370  * @brief            Delete Ingress Stream Count Table Entry function
1371  * @details          External function for deleting one Ingress Stream Count entry with "Exact Match Key Element Match" access method.
1372  *                   That means only "Exact Match Key Element Match" access method is supported.
1373  *
1374  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1375  * @param[out]       MatchedEntries         Number of matched entry
1376  * @param[in]        IngressStreamCountId   Index of the Ingress Stream Count Table Entry to be deleted
1377  *
1378  * @return           Result of the operation
1379  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1380  * @retval           others : fail
1381  */
1382 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamCountTableEntry( uint8 SwitchIdx,
1383                                                                                   uint32 *MatchedEntries,
1384                                                                                   uint32 IngressStreamCountId
1385                                                                                 );
1386 
1387 /**
1388  * @brief            Add or Update Ingress Stream Filter Table Entry function
1389  * @details          External function for adding or updating one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1390  *                   That means only "Exact Match Key Element Match" access method is supported.
1391  *
1392  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1393  * @param[in]        Cmd              Add and Update commands are supported
1394  * @param[out]       MatchedEntries   Number of matched entries
1395  * @param[in]        IngressStreamFilterTableEntry    Pointer points to a Ingress Stream Filter entry structure Netc_EthSwt_Ip_IngressStreamFilterEntryDataType
1396  *
1397  * @return           Result of the operation
1398  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1399  * @retval           others : fail
1400  */
1401 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressStreamFilterTableEntry( uint8 SwitchIdx,
1402                                                                                        Netc_EthSwt_Ip_CommandsType Cmd,
1403                                                                                        uint32 *MatchedEntries,
1404                                                                                        const Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1405                                                                                      );
1406 
1407 /**
1408  * @brief            Query Ingress Stream Filter Table Entry function
1409  * @details          External function for querying one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1410  *                   That means only "Exact Match Key Element Match" access method is supported.
1411  *
1412  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1413  * @param[out]       MatchedEntries         Number of matched entry
1414  * @param[in]        IngressStreamFilterTableEntry  A pointer that provides the data of KEYE_DATA filed for "query" operation
1415  * @param[out]       IngressStreamFilterTableEntry  A pointer that returns the data of a matched entry by "query" operation
1416  *                                            The data is valid only when MatchedEntries equals 1.
1417  *
1418  * @return           Result of the operation
1419  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1420  * @retval           others : fail
1421  */
1422 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressStreamFilterTableEntry( uint8 SwitchIdx,
1423                                                                                  uint32 *MatchedEntries,
1424                                                                                  Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1425                                                                                );
1426 
1427 /**
1428  * @brief            Delete Ingress Stream Filter Table Entry function
1429  * @details          External function for deleting one Ingress Stream Filter entry with "Exact Match Key Element Match" access method.
1430  *                   That means only "Exact Match Key Element Match" access method is supported.
1431  *
1432  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1433  * @param[out]       MatchedEntries         Number of matched entry
1434  * @param[in]        IngressStreamFilterTableEntry     A pointer that provides the data of KEYE_DATA filed for "delete" operation
1435  *
1436  * @return           Result of the operation
1437  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1438  * @retval           others : fail
1439  */
1440 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressStreamFilterTableEntry( uint8 SwitchIdx,
1441                                                                                   uint32 *MatchedEntries,
1442                                                                                   const Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1443                                                                                 );
1444 
1445 /**
1446  * @brief            Query Ingress Stream Filter Table Entry function with Search method
1447  * @details          External function for searching Ingress Stream Filter entry one by one with Search method.
1448  *
1449  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1450  * @param[in]        ResumeEntryId          resume entry id for searching
1451  * @param[out]       MatchedEntry         Number of matched entry
1452  * @param[out]       IngressStreamTableEntry  A pointer that returns the data of a matched entry by "search" operation
1453  *                                            The data is valid only when MatchedEntry equals 1.
1454  *
1455  * @return           Result of the operation
1456  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1457  * @retval           others : fail
1458  */
1459 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_SearchIngressStreamFilterTableEntry( uint8 SwitchIdx,
1460                                                                                   uint32 * ResumeEntryId,
1461                                                                                   uint32 * MatchedEntry,
1462                                                                                   Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableEntry
1463                                                                                 );
1464 
1465 /**
1466  * @brief            Dump Ingress Stream Filter Table Entry function
1467  * @details          External function for dumping all Ingress Stream Filter entries.
1468  *
1469  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1470  * @param[in]        NumberOfElements       Number of entries that want to be dumped
1471  * @param[out]       NumberOfElements       Number of entries that actually are dumped (number of existing entries)
1472  * @param[out]       IngressStreamFilterTableList  A pointer that returns the list of NumberOfElements entries
1473  *
1474  *
1475  * @return           Result of the operation
1476  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1477  * @retval           others : fail
1478  */
1479 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_GetIngressStreamFilterTable( uint8 SwitchIdx,
1480                                                                           uint16 * NumberOfElements,
1481                                                                           Netc_EthSwt_Ip_IngressStreamFilterEntryDataType * IngressStreamFilterTableList
1482                                                                         );
1483 
1484 /**
1485  * @brief            Add or Update Stream Gate Instance Table Entry function
1486  * @details          External function for adding or updating one Stream Gate Instance entry with "Entry ID Match" access method.
1487  *                   That means only "Entry ID Match" access method is supported.
1488  *
1489  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1490  * @param[in]        Cmd              Add and Update commands are supported
1491  * @param[out]       MatchedEntries   Number of matched entries
1492  * @param[in]        StreamGateInstanceTableEntry    Pointer points to a Stream Gate Instance entry structure Netc_EthSwt_Ip_StreamGateInstanceEntryDataType
1493  *
1494  * @return           Result of the operation
1495  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1496  * @retval           others : fail
1497  */
1498 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateStreamGateInstanceTableEntry( uint8 SwitchIdx,
1499                                                                                       Netc_EthSwt_Ip_CommandsType Cmd,
1500                                                                                       uint32 *MatchedEntries,
1501                                                                                       const Netc_EthSwt_Ip_StreamGateInstanceEntryDataType * StreamGateInstanceTableEntry
1502                                                                                     );
1503 
1504 /**
1505  * @brief            Query Stream Gate Instance Table Entry function
1506  * @details          External function for querying one Stream Gate Instance entry with "Entry ID Match" access method.
1507  *                   That means only "Entry ID Match" access method is supported.
1508  *
1509  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1510  * @param[out]       MatchedEntries         Number of matched entry
1511  * @param[in]        SGIEntryId             Stream Gate Instance entry ID
1512  * @param[out]       SGITableEntryRspData   A pointer that returns the data of a matched entry by "query" operation
1513  *                                          The data is valid only when MatchedEntries equals 1.
1514  *
1515  * @return           Result of the operation
1516  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1517  * @retval           others : fail
1518  */
1519 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryStreamGateInstanceTableEntry( uint8 SwitchIdx,
1520                                                                                 uint32 *MatchedEntries,
1521                                                                                 uint32 SGIEntryId,
1522                                                                                 Netc_EthSwt_Ip_StreamGateInstanceEntryRspDataType * SGITableEntryRspData
1523                                                                               );
1524 
1525 /**
1526  * @brief            Delete Stream Gate Instance Table Entry function
1527  * @details          External function for deleting one Stream Gate Instance entry with "Entry ID Match" access method.
1528  *                   That means only "Entry ID Match" access method is supported.
1529  *
1530  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1531  * @param[out]       MatchedEntries         Number of matched entry
1532  * @param[in]        SGIEntryId             Stream Gate Instance entry ID
1533  *
1534  * @return           Result of the operation
1535  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1536  * @retval           others : fail
1537  */
1538 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteStreamGateInstanceTableEntry( uint8 SwitchIdx,
1539                                                                                  uint32 *MatchedEntries,
1540                                                                                  uint32 SGIEntryId
1541                                                                                );
1542 
1543 /**
1544  * @brief            Add Stream Gate Control List Table Entry function
1545  * @details          External function for adding one Stream Gate Control List entry with "Entry ID Match" access method.
1546  *                   That means only "Entry ID Match" access method is supported.
1547  *
1548  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1549  * @param[in]        Cmd              Add and Update commands are supported
1550  * @param[out]       MatchedEntries   Number of matched entries
1551  * @param[in]        SGCLTableEntry   Pointer points to a Stream Gate Control List entry structure Netc_EthSwt_Ip_SGCLTableDataType
1552  *
1553  * @return           Result of the operation
1554  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1555  * @retval           others : fail
1556  */
1557 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddStreamGateControlListTableEntry( uint8 SwitchIdx,
1558                                                                                  Netc_EthSwt_Ip_CommandsType Cmd,
1559                                                                                  uint32 *MatchedEntries,
1560                                                                                  const Netc_EthSwt_Ip_SGCLTableDataType * SGCLTableEntry
1561                                                                                 );
1562 
1563 /**
1564  * @brief            Query Stream Gate Control List Table Entry function
1565  * @details          External function for querying one Stream Gate Control List entry with "Entry ID Match" access method.
1566  *                   That means only "Entry ID Match" access method is supported.
1567  *
1568  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1569  * @param[out]       MatchedEntries         Number of matched entry
1570  * @param[in]        SGCLEntryId            Stream Gate Control List entry ID
1571  * @param[in]        ListLen                Stream Gate Control List entry length, it has to be set to the same value as LIST_LENGTH when adding the entry
1572  * @param[out]       SGCLTableEntryRspData  A pointer that returns the data of a matched entry by "query" operation
1573  *                                          The data is valid only when MatchedEntries equals 1.
1574  *
1575  * @return           Result of the operation
1576  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1577  * @retval           others : fail
1578  */
1579 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryStreamGateControlListTableEntry( uint8 SwitchIdx,
1580                                                                                    uint32 *MatchedEntries,
1581                                                                                    uint32 SGCLEntryId,
1582                                                                                    uint8 ListLen,
1583                                                                                    Netc_EthSwt_Ip_SGCLTableDataType * SGCLTableEntryRspData
1584                                                                                  );
1585 
1586 /**
1587  * @brief            Delete Stream Gate Control List Table Entry function
1588  * @details          External function for deleting one Stream Gate Control List entry with "Entry ID Match" access method.
1589  *                   That means only "Entry ID Match" access method is supported.
1590  *
1591  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1592  * @param[out]       MatchedEntries         Number of matched entry
1593  * @param[in]        SGCLEntryId            Stream Gate Control List entry ID
1594  *
1595  * @return           Result of the operation
1596  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1597  * @retval           others : fail
1598  */
1599 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteStreamGateControlListTableEntry( uint8 SwitchIdx,
1600                                                                                     uint32 *MatchedEntries,
1601                                                                                     uint32 SGCLEntryId
1602                                                                                   );
1603 
1604 /**
1605  * @brief            Add or Update Ingress Sequence Generation Table Entry function
1606  * @details          External function for adding or updating one Ingress Sequence Generation entry with "Entry ID Match" access method.
1607  *                   That means only "Entry ID Match" access method is supported.
1608  *
1609  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1610  * @param[in]        Cmd              Add and Update commands are supported
1611  * @param[out]       MatchedEntries   Number of matched entries
1612  * @param[in]        ISQGTableEntry   Pointer points to a Stream Gate Instance entry structure Netc_EthSwt_Ip_ISQGTableDataType
1613  *
1614  * @return           Result of the operation
1615  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1616  * @retval           others : fail
1617  */
1618 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1619                                                                                         Netc_EthSwt_Ip_CommandsType Cmd,
1620                                                                                         uint32 *MatchedEntries,
1621                                                                                         const Netc_EthSwt_Ip_ISQGTableDataType * ISQGTableEntry
1622                                                                                       );
1623 
1624 /**
1625  * @brief            Query Ingress Sequence Generation Table Entry function
1626  * @details          External function for querying one Ingress Sequence Generation entry with "Entry ID Match" access method.
1627  *                   That means only "Entry ID Match" access method is supported.
1628  *
1629  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1630  * @param[out]       MatchedEntries         Number of matched entry
1631  * @param[in]        ISQGEntryId            Ingress Sequence Generation entry ID
1632  * @param[out]       ISQGRspData            A pointer that returns the data of a matched entry by "query" operation
1633  *                                          The data is valid only when MatchedEntries equals 1.
1634  *
1635  * @return           Result of the operation
1636  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1637  * @retval           others : fail
1638  */
1639 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1640                                                                                   uint32 *MatchedEntries,
1641                                                                                   uint32 ISQGEntryId,
1642                                                                                   Netc_EthSwt_Ip_ISQGTableDataType * ISQGRspData
1643                                                                                 );
1644 
1645 /**
1646  * @brief            Delete Ingress Sequence Generation Table Entry function
1647  * @details          External function for deleting one Ingress Sequence Generation entry with "Entry ID Match" access method.
1648  *                   That means only "Entry ID Match" access method is supported.
1649  *
1650  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1651  * @param[out]       MatchedEntries         Number of matched entry
1652  * @param[in]        ISQGEntryId            Ingress Sequence Generation entry ID
1653  *
1654  * @return           Result of the operation
1655  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1656  * @retval           others : fail
1657  */
1658 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngressSeqGenerationTableEntry( uint8 SwitchIdx,
1659                                                                                    uint32 *MatchedEntries,
1660                                                                                    uint32 ISQGEntryId
1661                                                                                  );
1662 
1663 /**
1664  * @brief            Update Egress Sequence Recovery Table Entry function
1665  * @details          External function for updating one Egress Sequence Recovery entry with "Entry ID Match" access method.
1666  *                   That means only "Entry ID Match" access method is supported.
1667  *
1668  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1669  * @param[out]       MatchedEntries   Number of matched entries
1670  * @param[in]        EgrSQRTableEntry   Pointer points to an Egress Sequence Recovery entry structure Netc_EthSwt_Ip_EgrSeqRecoveryTableDataType
1671  *
1672  * @return           Result of the operation
1673  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1674  * @retval           others : fail
1675  */
1676 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_UpdateEgressSeqRecoveryTableEntry( uint8 SwitchIdx,
1677                                                                                 uint32 *MatchedEntries,
1678                                                                                 const Netc_EthSwt_Ip_EgrSeqRecoveryTableDataType * EgrSQRTableEntry
1679                                                                               );
1680 
1681 /**
1682  * @brief            Query Egress Sequence Recovery Table Entry function
1683  * @details          External function for querying one Egress Sequence Recovery entry with "Entry ID Match" access method.
1684  *                   That means only "Entry ID Match" access method is supported.
1685  *
1686  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1687  * @param[out]       MatchedEntries         Number of matched entry
1688  * @param[in]        ESQREntryId            Egress Sequence Recovery entry ID
1689  * @param[out]       ESQRRspData            A pointer that returns the data of a matched entry by "query" operation
1690  *                                          The data is valid only when MatchedEntries equals 1.
1691  *
1692  * @return           Result of the operation
1693  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1694  * @retval           others : fail
1695  */
1696 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryEgressSeqRecoveryTableEntry( uint8 SwitchIdx,
1697                                                                                uint32 *MatchedEntries,
1698                                                                                uint32 ESQREntryId,
1699                                                                                Netc_EthSwt_Ip_EgrSeqRecoveryTableRspDataType * ESQRRspData
1700                                                                              );
1701 
1702 /**
1703  * @brief            Add or Update Ingress Stream Identification Table Entry function
1704  * @details          External function for adding or updating one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1705  *                   That means only "KEY_ELEMENT" access method is supported.
1706  *
1707  * @param[in]        SwitchIdx        Index of the switch within the context of the Ethernet Switch Driver
1708  * @param[in]        Cmd              Add and Update commands are supported
1709  * @param[out]       MatchedEntries   Number of matched entries
1710  * @param[in]        ISQGTableEntry   Pointer points to a Ingress Stream Identification entry structure Netc_EthSwt_Ip_IngrStremIdentificationTableDataType
1711  *
1712  * @return           Result of the operation
1713  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1714  * @retval           others : fail
1715  */
1716 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_AddOrUpdateIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1717                                                                                             Netc_EthSwt_Ip_CommandsType Cmd,
1718                                                                                             uint32 *MatchedEntries,
1719                                                                                             const Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1720                                                                                           );
1721 
1722 /**
1723  * @brief            Query Ingress Stream Identification Table Entry function
1724  * @details          External function for querying one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1725  *                   That means only "KEY_ELEMENT" access method is supported.
1726  *
1727  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1728  * @param[out]       MatchedEntries         Number of matched entry
1729  * @param[in]        ISITableEntry          A pointer that provides the data with the "query" operation
1730  * @param[out]       ISITableEntry          A pointer that returns the data of a matched entry by "query" operation
1731  *                                          The data is valid only when MatchedEntries equals 1.
1732  *
1733  * @return           Result of the operation
1734  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1735  * @retval           others : fail
1736  */
1737 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_QueryIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1738                                                                                       uint32 *MatchedEntries,
1739                                                                                       Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1740                                                                                     );
1741 
1742 /**
1743  * @brief            Delete Ingress Stream Identification Table Entry function
1744  * @details          External function for deleting one Ingress Stream Identification entry with "KEY_ELEMENT" access method.
1745  *                   That means only "KEY_ELEMENT" access method is supported.
1746  *
1747  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1748  * @param[out]       MatchedEntries         Number of matched entry
1749  * @param[in]        ISITableEntry          A pointer that provides the data with the "delete" operation
1750  *
1751  * @return           Result of the operation
1752  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1753  * @retval           others : fail
1754  */
1755 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_DeleteIngrStreamIdentificationTableEntry( uint8 SwitchIdx,
1756                                                                                        uint32 *MatchedEntries,
1757                                                                                        const Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableEntry
1758                                                                                      );
1759 
1760 /**
1761  * @brief            Dump all Ingress Stream Identification Table Entries function
1762  * @details          External function for dumping all Ingress Stream Identification entries with "SEARCH_CRITERIA" access method.
1763  *                   That means only "SEARCH_CRITERIA" access method is supported.
1764  *
1765  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1766  * @param[in]        NumberOfElements       Number of entries that want to be dumped
1767  * @param[out]       NumberOfElements       Number of entries that actually are dumped (number of existing entries)
1768  * @param[out]       ISITableList           A pointer that returns the list of NumberOfElements entries
1769  *
1770  * @return           Result of the operation
1771  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1772  * @retval           others : fail
1773  */
1774 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_GetIngrStreamIdentificationTable( uint8 SwitchIdx,
1775                                                                                uint16 * NumberOfElements,
1776                                                                                Netc_EthSwt_Ip_IngrStremIdentificationTableDataType * ISITableList
1777                                                                              );
1778 
1779                                                                              /**
1780  * @brief            Update Egress Scheduler Table Entry function
1781  * @details          External function for updating one Egress Scheduler Table entry with "ENTRY_ID" access method.
1782  *                   That means only "ENTRY_ID" access method is supported.
1783  *
1784  * @param[in]        SwitchIdx              Index of the switch within the context of the Ethernet Switch Driver
1785  * @param[in]        EntryId                Egress Scheduler entry ID
1786  * @param[out]       MatchedEntries         Number of matched entry
1787  * @param[in]        SchedulerTableEntry    A pointer that provides the data for the "update" operation
1788  *
1789  * @return           Result of the operation
1790  * @retval           0 : NETC_ETHSWT_IP_CBDRSTATUS_SUCCESS, success
1791  * @retval           others : fail
1792  */
1793 Netc_EthSwt_Ip_CBDRStatusType Netc_EthSwt_Ip_UpdateEgressSchedulerTableEntry( uint8 SwitchIdx,
1794                                                                             uint32 EntryId,
1795                                                                             uint32 *MatchedEntries,
1796                                                                             const Netc_EthSwt_Ip_PortSchedulerType * SchedulerTableEntry
1797                                                                         );
1798 
1799 /**
1800  * @brief           Set Timer Synchronization State.
1801  * @details         This function sets the Timer Synchronization state.
1802  *
1803  * @param[in]       SwitchIdx Index of the switch
1804  * @param[in]       SyncState Timer synchronization state
1805 
1806  * @return          Std_ReturnType
1807  * @retval          E_OK: successful.
1808  * @retval          E_NOT_OK: failed
1809  *
1810  */
1811 Std_ReturnType Netc_EthSwt_Ip_SetSyncState(uint8 SwitchIdx, boolean SyncState);
1812 
1813 #define ETHSWT_43_NETC_STOP_SEC_CODE
1814 #include "EthSwt_43_NETC_MemMap.h"
1815 
1816 #ifdef __cplusplus
1817 }
1818 #endif
1819 
1820 /** @} */
1821 
1822 #endif
1823