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.

MCU-PLUS-SDK-AM243X: How to configure Enet ICSSG switch to receive LLDP ethernet frames?

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG

Hi,

our goal is to integrate LLDP functionality on top the ICSSG switch including the Lwip stack. To do this we need to be able to receive and process ethernet frames with destination mac "01:80:c2:00:00:0e" on the host port.

I tried to do this using several examples even without lwip (e.g. enet_layer2_icssg) of the AM243x MCU+ SDK 08.05.00.24 on an EVM board, but I was not able to receive frames with this destination MAC in the corresponding RX handlers. I suspect this happens because of the default multicast filtering configuration.

Could someone please guide me how to apply the necessary configuration, that frames to this particular mac (or any multicast address including it) are not filtered out somewhere in the Enet-LLD/ICSSG/PRU chain?

As a comparison I also looked at ICSS-EMAC based examples like "examples/industrial_comms/hsr_prp_demo". I was able to receive frames to (almost) arbitrary mac addresses, but still not any LLDP frames, even though there is code related to exactly the LLDP relevant mac address of interest (see hsrprp_processHighPrioFrames() at hsr_prp_main.c:1068. Receiving frames to the timesync MAC "01:1b:019:00:00:00" works fine. Even more confusing is the fact, that the example "enet_layer2_multi_channel" contains similar code, but the corresponding LLDP mac branch has been made permanently evaluate to true...?

Thanks and best regards

Daniel

  • Hi Daniel,

    Could someone please guide me how to apply the necessary configuration, that frames to this particular mac (or any multicast address including it) are not filtered out somewhere in the Enet-LLD/ICSSG/PRU chain?

    I will try this on our end for the Enet Layer 2 ICSSG example that you mentioned. 

    As a comparison I also looked at ICSS-EMAC based examples like "examples/industrial_comms/hsr_prp_demo". I was able to receive frames to (almost) arbitrary mac addresses, but still not any LLDP frames, even though there is code related to exactly the LLDP relevant mac address of interest (see hsrprp_processHighPrioFrames() at hsr_prp_main.c:1068.

    This is expected as HSR_PRP example does not have LLDP frame support. For ICSS EMAC based examples we will have this support for Ethernet/IP and Profinet only(This feature will be present in SDK 8.6 onwards. Planned for April End 2023)

    he fact, that the example "enet_layer2_multi_channel" contains similar code, but the corresponding LLDP mac branch has been made permanently evaluate to true...?

    Could you please explain what do you mean by "LLDP mac branch has been made permanently evaluate to true."

  • Thanks for looking into it.

    This is expected as HSR_PRP example does not have LLDP frame support. For ICSS EMAC based examples we will have this support for Ethernet/IP and Profinet only(This feature will be present in SDK 8.6 onwards. Planned for April End 2023)

    In our project we use the Enet (ICSS) networking configured through Sysconfig. The integration is similar to the enet_lwip_icssg example and I'm not sure if it would be feasible to switch to the ICSS-EMAC networking. Do I understand correctly that the ICSS-EMAC driver based networking, without also using the Ethernet/IP or Profinet stacks from TI, would still not allow to receive LLDP frames after the 8.6 SDK update?

    Could you please explain what do you mean by "LLDP mac branch has been made permanently evaluate to true."

    Sorry, I was thinking about the following code in the "enet_layer2_multi_channel" example (see timeSync_ptp.c:323).

    /**PTP MAC ID for comparison*/
    uint8_t timeSyncMAC[6] = {0x1, 0x1b, 0x19, 0x0, 0x0, 0x0};
    uint8_t linkLocalMAC[6] = {0x1, 0x80, 0xc2, 0x0, 0x0, 0xE};
    
    /* ... */
    
    void TimeSyncPtp_processRxNotifyTask(void *arg)
    {
        uint32_t size  = 0;
    
    /* ... */
                    do
                    {
                        status = EnetApp_getPtpFrame(hTimeSyncPtp->enet_perctxt,
                                                      &rxFrame[0],
                                                      &size,
                                                      &rxPort);
                        if (status == TIMESYNC_OK)
                        {
                            dstMacId = rxFrame;
    
                            if (TIMESYNC_COMPARE_MAC(dstMacId, timeSyncMAC))
                            {
                                TimeSyncPtp_processPtpFrame(hTimeSyncPtp, rxFrame, rxPort, size, 0);
                            }
                            else if (true || TIMESYNC_COMPARE_MAC(dstMacId, linkLocalMAC))
                            {
                                TimeSyncPtp_processPtpFrame(hTimeSyncPtp, rxFrame, rxPort, size, 1);
                            }
                        }
    
    /* ... */
    
    }

    This example is even less related to out project configuration, but contains LLDP mac address related code similar to the HSR PRP demo. However, in this case with a "true ||" prepended to the if condition, which may indicate that there is something special about LLDP frames even in the CPSW examples.

  • Hi Daniel,

    Let me try to come back by Thursday on this.

    BR

    Nilabh A.

  • Hi Nilabh,

    is there already any update on this topic?

    Thank you and best regards,

    Daniel

  • Hi Nilabh,

    is there still no update for this topic?

    We are facing EIP certification (not with TI stack).

    For external stacks: Is this feature working on AM243x with current sdk? Is there an example available?

    Best regards,

    Tommy

  • Hi Daniel/TOmmy,

    Apologies for not being able to get back sooner. I was OOO.

    For adding LLDP support to ICSSG application 1. The forwarding rules are programmed using FDB table. The forwarding and tagging information has to set using an IOCTL. ICSSG_PER_IOCTL_VLAN_SET_ENTRY is the IOCTL used to set an entry. Use this ENET_IOCTL() API and pass ICSSG_PER_IOCTL_VLAN_SET_ENTRY command with valid params. 

    Can you please let me know if you want to use vlan aware mode or unaware mode:

    For unaware mode you can use following ioctl:  https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/latest/exports/docs/api_guide_am243x/group__DRV__ENET__ICSSG.html#gga2e2b170ba4c7c2f45b86da4bc27898bbaf872f28fc60ce1535a4bec36ae46b449

    For vlan aware mode please refer following eample:software-dl.ti.com/.../EXAMPLES_ENET_VLAN_ICSSG.html

  • Thanks Nilabh,

    we check the suggestions and give you feedback as soon as possible.

    Best regards,

    Tommy