This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/PROCESSOR-SDK-RTOS-AM57X:Dual MAC behavior is strange.

Other Parts Discussed in Thread: AM5748

CCS Version: 9.3.0.00012
pdk_am57xx_1_0_17
ndk_3_61_01_01
TMDSIDK574

Hello,

I tried to make a project out of NIMU_DualMacExample_idkAM574x_armExampleproject.txt in PDK.
I was able to build this project and it works, but some of the behavior is strange.
It is that when some packets are received from one I/F, they pass through to the other I/F.

I read the AM574x Technical Reference Manual (SPRUIH8B), and in section 25.12.4.8.2 Address Lookup Engine (ALE), it says
"The ALE may be configured to operate in bypass mode by setting the ALE_BYPASS bit in the ALE_CONTROL register.
When in bypass mode, all CPGMAC_SL received packets are forwarded only to the host port (port 0). "
I found this written.

So I checked the PDK source file. I found the following part in cspw_nimu_eth.c

#if defined (SOC_AM335x) || defined(SOC_AM437x)

HW_WR_FIELD32((emac_cfg.ale_base + CPSW_ALE_CTRL),
CPSW_ALE_CTRL_BYPASS, CPSW_ALE_CTRL_BYPASS_ENABLE);
#else
CSL_CPSW_enableAle((CSL_cpswHandle)emac_cfg.ss_base);
#endif

Since my IDK SoC is an AM5748, I determined that the bypass function is not enabled by this source.
However, this source is strange. In the #if clause, the bypass function is enabled, but in the #else clause, the ALE itself is enabled, so there is no balance.

I looked into it a bit more.
I found out that CSL_CPSW_enableAle((CSL_cpswHandle)emac_cfg.ss_base); is executed elsewhere.
This is my guess, but the above source is wrong and the correct one is

#if defined (SOC_AM335x) || defined(SOC_AM437x)

HW_WR_FIELD32((emac_cfg.ale_base + CPSW_ALE_CTRL),
CPSW_ALE_CTRL_BYPASS, CPSW_ALE_CTRL_BYPASS_ENABLE);
#else
CSL_CPSW_enableAleBypass((CSL_cpswHandle)emac_cfg.ss_base);
#endif

Isn't this the case?
Please let me know what you think.

There is also a chapter in SPRUIH8B called 25.12.4.8.5.2 Dual MAC Mode. It describes the procedure for configuring Dual MAC mode.
One of the operations is to set the ALE_VLAN_AWARE bit in the ALE_CONTROL register.
So I searched for the keyword ALE_VLAN_AWARE in all the PDK and NDK sources, but none of them manipulate the ALE_VLAN_AWARE bit.
Is this not necessary?
If it is necessary, I would be happy to see an example of a sample source, since the procedure in chapter 25.12.4.8.5.2 is not very specific.

Of course, if there is any other process required to configure Dual MAC, please let me know.

Regards,

Satoru

  • Hi,

    1. Is this the default application or did you make any changes ? Please share any changes you made so we can reproduce the issue.

    2. What is your test setup ? Which ports are receiving packets and what kind of traffic ? Please describe your exact issue with wireshark capture if possible.

    3. I am assuming that you have the AM574 IDK. Please confirm.

    Regards

    Vineet

  • Hi Roy, and please forgive me for the late reply.


    1.
    Yes, the project shown in C: \ ti \ ppk_am57xx_1_0_17 \ packages \ ti \ transport \ ndk \ nimu \ example \ am574x \ armv7 \ bios \ NIMU_BasicExample_idkAM574x_armExampleproject.txt is a fully default application. I haven't made any changes.


    2.
    The test combines two TMD SIDK574 Ethernet interfaces and a one PC (Win10Pro) Ethernet interface with a 1Gbps switching hub. The IP addresses of the two Ethernets of TMDSIDK574 are set to 192.168.1.4 and 192.168.2.4. A broadcast storm begins when I ping one of the IP addresses from my PC.

    Wireshark packet view

    Note that this behavior is as described above in cpsw_nimu_eth.c:


    CSL_CPSW_enableAle ((CSL_cpswHandle) emac_cfg.ss_base);


    To


    CSL_CPSW_enableAleBypass ((CSL_cpswHandle) emac_cfg.ss_base);


    If you change it to, it will be solved.


    3.
    Okay. I have a REV B of TMDSIDK574.


    Regards,

    Satoru

  • Hi,

    Sorry, re-opening this thread after some time.

    Is this issue still open ?

    Regards

    Vineet

  • Hello,
    This is a gentle reminder.
    Regards,
    Satoru