I have ported the PRU-ICSS-EthernetIP-Adapter and the ICSS_EMAC to our existing product platform (CPU: AM4376, RTOS: Nucleus-Plus). I also adapted the NIMU_ICSS to our networking stack (Nucleus-NET). Initialization of the PRUs, EIP-Adapter and ICSS_EMAC is done, link can be established and TCP/IP communication is running successfully. What is missing is the scheduling function that calls NIMU_ICSS_pktPoll in order to process the aging of the MAC address table and to reset the storm prevention counter of the ICSS_EMAC.
After inspecting the call stack of NIMU_ICSS_pktPoll I have some problems in understanding the scheduling and timer intervals. Can you please check, if my understanding is correct and answear my open questions?
- NIMU_ICSS_pktPoll is being called by NetScheduler with a timer interval of 100 ms.
- In switch mode NIMU_ICSS_pktPoll checks, if learning is enabled and (if yes) increments the aging counters of the entries within the MAC address table. This is done using the IOCTL function ICSS_EMAC_LEARN_CTRL_INC_COUNTER. This step alone does not remove any MAC address entries from the table, but just increments the timer count up to AGEING_COUNT (= 100).
- The remove of MAC address entries is done in the next step using the IOCTL function ICSS_EMAC_LEARN_CTRL_AGEING. But this function is only called, if aleTimerActive is != 0 and aleTicks is > 0.
- In the initialization of the NUMU_ICSS aleTicks is set to 3000 and aleTimerActive is set to 0. So the timer counter of the MAC address entries will be incremented to 100 but they will not be removed from the MAC address table of the ICSS_EMAC.
- If aleTimerActive would be set to != 0, MAC address entries with timer count >= AGEING_COUNT (100) will be not be removed until aleTickCount has reached the value of aleTicks (each 300 s).
Is this correct so far?
What is the purpose of the 2 different threshold values: AGEING_COUNT for timerCount and (NIMU_ICSS_ALE_AGE_OUT_TIME / 100) for aleTickCount?
Or in other words: Why does timerCount expires much erlier than aleTickCount? Does this have any effect, if aleTickCount is > AGEING_COUNT?
Why is aleTimerActive set to 0? I would have expected that aging is enabled by default (like other switches do).
Thanks in advance and best regards
Stefan