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.

TDA4VH-Q1: TDA4VH TSN

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH

Hi ti,

We want to implement the following functions on TDA4VH at the same time:

1) TSN IEEE 802.1Qbv

2) CPSW9G switching routing and forwarding function based on Layer 2 protocol

3) A72 linux in TSN can be used as Talker and Listener,

is there any solution for reference?

Thanks,

Ruijie Sun

  • Hi,

    1) TSN IEEE 802.1Qbv
    3) A72 linux in TSN can be used as Talker and Listener,

    Please refer to Linux SDK Documentation for information related to TSN features supported in CPSW Native Linux Diver.

    2) CPSW9G switching routing and forwarding function based on Layer 2 protocol

    You can add filters based on MAC Address and forward to the Ports intended.
    Please refer to Switch FDB support examples from SDK Documentation

    Best Regards,
    Sudheer

  • Dear Doredla,

    2) CPSW9G switching routing and forwarding function based on Layer 2 protocol

    Please refer to Switch FDB support examples from SDK Documentation

    -> refer to the documentation, The filter rules are also set through the bridge

    I've always wondered why I can't control CPSW ALE directly,

    and what should I do if I want to control CPSW ALE directly

  • Hi Sun,

    From linux, you should not control the ALE directly. You can add VLAN and multicast entries in the ALE by using the commands given the page you referenced above.

    This is because the linux framework has switchdev implementation for off loading bridge features to hardware which is implemented in TI driver.

    Strictly speaking, you can still manipulate the ALE from the driver and register mapping, but it is not advised to do so outside of linux framework.

    What are looking for for ALE modification?

    Regards,
    Tanmay

  • hi Tanmay,

    Thanks for the answer,a TI colleague said the forwarding rules set by the bridge will not be directly mapped to the hardware,

    so we understand that the bridge is a pure software forwarding protocol,

    which is not as efficient as hardware forwarding, and CPU resources will be consumed

  • Hi Tanmay,

    If we want to filter the network packet based on ethernet or IP header in chip, how to implement this in native Linux driver?  In EthFW, we achieve this through ALE Policer APIs, on native Linux driver, what kind of API we should use? could you please let us know if there is any document about this? just like the PDK API guide for EthFW, PDK API Guide for J721E: PDK API Guide (ti.com)?

  • Hi,

    Thanks for the answer,a TI colleague said the forwarding rules set by the bridge will not be directly mapped to the hardware,

    so we understand that the bridge is a pure software forwarding protocol,

    which is not as efficient as hardware forwarding, and CPU resources will be consumed

    This is not entirely true. The VLAN and mdb rules are offloaded to hardware. So the forwarding of unicast packets with VLAN will still happen in hardware and not software when the bridge is configured accordingly.

    The thing is that this is all done with the switchdev framework in linux (see this for more details on switchdev). This way, the switch is integrated with network stack and subsystem of linux and you can use all the other linux packages afterwards as required.

    If we want to filter the network packet based on ethernet or IP header in chip, how to implement this in native Linux driver?

    This is not implemented in native linux driver. But because native linux driver only supports one core (A72) connected to host port, I fail to see a use case where you will require this. As all the traffic is coming to linux, you can add filters in linux itself without additional high cpu usage.

    If you find this somewhere in any standard linux implementation, please let me know and I will work towards adding the feature to our SDK.

    Regards,
    Tanmay

  • Tanmay,

    Thanks a lot for the answer, and we want to implement ACL in chip for 2 purpose:

    1) Reduce host CPU resource consumption.

    2) Control the switching traffic that only happen in chip.

    Is there anyway to offload the ACL to hardware, just like we offload switching functionality to chip with the swichdev framework?  In EthFW mode, we achieve this through CpswAle_Ioctl CPSW_ALE_IOCTL_GET_POLICER, is there similar SDK API in Linux or any other solution in Native Linux enviroment?

    Regards,

    Weihua

  • Hi,

    Is there anyway to offload the ACL to hardware, just like we offload switching functionality to chip with the swichdev framework?

    Currently there is no support for this. With an initial search, I couldn't find any offload features in the netfilters for linux. Please let me know if you are aware of any such features in the netfilter/iptables framework.

    Regards,
    Tanmay

  • Hi Tanmay,

    There is no such features in Linux, and we develop a program to offload the features to chip in EthFW mode by changing the ioctl codes and pass related configure to ethFW which we also change code to use  CpswAle_Ioctl CPSW_ALE_IOCTL_SET_POLICER to achieve this.

     

    Now, we need to support TSN, so we need to switch to native ethernet driver and we need to discard the program we design for EthFW mode. So we want to write another program to use some SDK API in linux to achieve this but not sure if such ALE APIs already there in linux drivers.

    Regards,

    Weihua

  • Hi Weihua,

    Right now there are no API available for policer or classifier control for ALE.

    I will file a requirement for this to be added, but there isn't any support available now.

    Regards,

    Tanmay

  • Tanmay,

    It is a pity that chip already support such feature but no SDK API for user to enable them, and thanks for the feedback and look forward for such APIs in coming release.

    Thanks,

    Weihua