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.

AM335X

Good day.

We are trying to implement the RSTP protocol on TIRTOS OS based on NDK using the CPSW ALE hardware filtering capabilities.

The ALE table is configured as follows:

Enabled VLAN_AWARE in ALE

ALE VLAN entry inserted (vid = 0, vlan_member_list = 0b111, untag = 0b111, reg_mcast = 0b111, unreg_mcast = 0b110)

MCAST entry inserted (mcast_addr = 01: 80: C2: 00: 00: 00, mcast_fwd_state = 0b01, super = 0b1, port_mask = 0b001)

For each of the ports (port 1 and port 2), entry inserted:

MCAST_VLAN (mcast_addr = FF: FF: FF: FF: FF: FF, vid = 0x0, mcast_fwd_state = 0b11, super = 0b0, port_mask = 0b001)

UCAST_VLAN (mcast_addr = Device MAC address (e.g. E8: EB: 11: E9: B5: 38), vid = 0x0, ucast_type = 0b00, block = 0, secure = 0, port_number = port_num (1 or 2), dlr_unicast = 0);

All ports have forwarding enabled.

This is how the CPSW is configured in the Linux driver, we’ve just rewrote some ideas from it.

With this configuration, we receive BPDUs from the switch (not TI), but our device cannot send BPDUs (even if packets are sent as directed (to_port_enable bit was set and the port number was set in the to_port field of the TX CPPI descriptor))

If in the ALE record for BPDUs (the second record) we set the field port_mask = 0b111, then our device sends and receives BPDUs, but it forwards received and sent BPDUs from port 1 to port 2 and vice versa. Also, with this configuration, a BPDU frame is sent with port 1 is sent to port 2 and vice versa.

 

To implement the RSTP, we need:

  1. Determine from which port the BPDU frame came (we’re  defining it using the from_port field of the RX CPPI descriptor).
  2. Send BPDUs to a specific port (for this we set the to_port_enable bit and the port number in the to_port of the CPPI TX descriptor). However, with our settings, a frame directed to port 1 is sent to port 2 as well, and vice versa.
  3. A frame sent by an external switch should be received on port 0 (Host port), but should not be forwarded to ports 1 and 2. We can do this by setting port_mask = 0b001 to write the BPDU address, but then we lose the opportunity send BPDU frames to port 1 and 2, if we set port_mask == 0b111, we both receive and transmit BPDU frames, but BPDU frames are forwarded from port 1 to port 2.

 

Is it possible to implement RSTP only with hardware filtering (software BPDU processing tolerance)? If yes, please help in configuring CPSW to achieve the above requirements

  • Hi Sergei,

    Sorry for the delay in the response. I do not have a direct input for you, as I do not see Processor SDK implement this in RTOS.

    I am not an expert on how Linux driver has implemented it. Have you gone through the details on how the Linux driver is using VLAN?

    Can you please confirm?

    Meanwhile, let me check on this internally, if I get any details and get back to you for any further Info if I get from any one.

    Thanks

  • Good day, Aravind

    Yes, we know that there is no RSTP implementation in the Processor SDK (and in particular in the NDK).

    As I mentioned in the first post of this topic, we learned how the CPSW driver works in Linux (cpsw_new.c / cpsw_new.h). The suggested settings that are loaded into the ALE table in the Linux driver are also mentioned in the first post.

    So the question remains the same - is it possible to implement RSTP using only hardware filtering?

    Best regards, Sergei

  • Hi Sergei,

    Good day.

    To my knowledge, I think this is an architecture implemented in the Linux that TI itself (to my knowledge) has chosen not to do in an RTOS.

    So, I will not be able to provide support on this. Also, please note that, there is no further NDK releases planned on any RTOS support. So, probably, you may need to investigate the issues to implement the necessary details.

    Sorry! I would not be able to provide support on this. I do not have any inputs/information on what is needed to support RSTP on CPSW driver for TI-RTOS.