AM2612: AM2612 - Enabling Cut Through

Part Number: AM2612

Hello,

I am currently using the following example application in order to experimentally verify the switch latency as integrated into my network: https://software-dl.ti.com/mcu-plus-sdk/esd/AM261X/latest/exports/docs/api_guide_am261x/EXAMPLES_ENET_LAYER2_CPSW_SWITCH.html

 

I noticed that the following results were taken using a modified version of the above application: https://software-dl.ti.com/mcu-plus-sdk/esd/AM261X/latest/exports/docs/api_guide_am261x/enetlld_performance.html

 

I was wondering what modifications to the EXAMPLES_ENET_LAYER2_CPSW_SWITCH code would I need to make to ensure that the internal switch has cut-through enabled on both mac ports for all packets with priority 6 or higher? (IET is turned on)

 

I tried taking measurements on round trip time latency on the example application and my initial measurements seem to imply that the CPSW is still configured for store and forward rather than cut-through. I'd like to achieve 2.0us @1Gbps for a 1518 byte packet.

  • It would be helpful to get clarity on this API as well from the Enet LLD:

    ...

  • Hi Nicholas,

    A few basic modifications over the enet layer 2 switch example i can suggest are:

    1. Remove all logs
    2. Test with release build for latency testing
    3. Disable CPSW Stats interrupt
    I'd like to achieve 2.0us @1Gbps for a 1518 byte packet.

    Q1. Is this round trip latency time or just the cut-thru switching time from one mac port to another.

    Q2, is this just hardware switching latency or the packet is expected to be duplicated by the CPU and populated back to the MAC Port?

    I was wondering what modifications to the EXAMPLES_ENET_LAYER2_CPSW_SWITCH code would I need to make to ensure that the internal switch has cut-through enabled on both mac ports

    Also, Cut-thru switching can be enabled/disabled for a particular priority, the screenshot you pasted basically configures the bitmask of the priorities, for example, if you want cut-thru only for priority 6 and priority 7, you can set it to '0b11000000'.

    To ensure the Cut through switching is turned on,

    Check the following file: mcu_plus_sdk_am261x_11_01_00_19/source/networking/enet/soc/am261x/enet_soc_cfg.h

    This file configures the CPSW for AM261x. Incase you make any changes to this file, the enet-cpsw library needs to be rebuilt using the below command

    all packets with priority 6 or higher? (IET is turned on)

    To turn on IET, you can follow the guide here:

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM261X/latest/exports/docs/api_guide_am261x/enet_iet_userguide.html

    Regards,
    Shaunak

  • Hello Shaunak,

    Thank you for your quick response.

    To answer Q1: I am attempting to characterize how much latency the CPSW inside the AM2612 adds when a packet simply passes through from one mac port to another with cut-through turned on.

    To answer question Q2: In my setup, the packet is not expected to be duplicated by the CPU and echoed on the mac port in my application. I believe I had modified the application so that the CPU will not echo packets addressed to it (but it will still process received packets in the background but silently ignore them).

    I've verified that ENET_CFG_CPSW_CUTTHRU is ENET_ON in enet_soc_cfg.h.

    Qa: Is it correct to say that in the case where IET is turned off (which seems to be the case for the unmodified EXAMPLES_ENET_LAYER2_CPSW_SWITCH code), and packets going through the switch are not VLAN tagged, cut through should be happening in the application by default on all traffic?

    Qb: I noticed that after going through the IET userguide, the syscfg generated variable gEnetCpswCfg.vlanCfg.vlanAware = false by default. I was wondering whether this should be turned on as part of application code? Or does it not matter?

  • Unfortunately, trying the above modifications did not help. However, after turning stats and logs back on, I did manage to capture the following stats during my test:

    I had noticed that txLateCollFrames was unusually high.