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.

Linux: CPSW Subsystem in AM335x

Tool/software: Linux

Do we have rate limiting feature in CPSW, when it is configured to work in Dual EMAC mode

  • Hi,

    Which Linux SDK are you using or planning to use? I will research this a little bit and get back to you. Are you asking about receive or transmit limiting? Could you also describe how you are planning to use rate limiting?

    Best Regards,
    Schuyler
  • Hi,

    This was a good question to ask because I thought there was support. After researching the question a bit and looking at the CPSW driver there does not appear to be support for rate limiting in dual mac mode, only in switch mode. Support may change for this rate limiting in dual mac mode in a future release of the cpsw driver in the Linux kernel.

    Best Regards,
    Schuyler
  • Hi,

    I cross verfied in AM335X TRM and got to know that, Switch config(Rate limiting) will not be available in dual emac interface mode, Can you confirm.

    Link which talks about this: processors.wiki.ti.com/.../Linux_Core_CPSW_User's_Guide

  • Hi,

    What type of rate limiting are you looking for TX or RX? I would like to know if possible the rate limiting use case that you have in mind.

    As you pointed out the wiki page does say that the switch config tool is not supported outside of switch mode. Though I don't see that exact statement in the TRM, I could be missing it though. There are a couple of different rate limiting use cases mentioned, traffic shaping and external port pass through and rx receive.

    Since there are different types of rate limiting I cannot say that rate limiting is not supported. Only that the current Linux driver does not support rate limiting in dual mac mode due to the switch config tool with the CPSW in switch mode being the only means to set parameters for a feature for which there does not currently exist when the CPSW is in dual mac mode.

    Best Regards,
    Schuyler
  • Hi,
    I am looking for RX rate limiting. Our CPU is going to halt mode, when it is subjected to network storm. To address this issue, we have implemented software rate limiting as a solution. If the CPSW hardware supports rate limiting in dual EMAC mode, we can get away with software stuff
  • HI,

    After looking through old e2e threads you might be able to leverage this thread for help on how to use RX rate limiting.

    possible example link to rate limiting example for dual mac

    These are possible steps and not an accepted change yet to the cpsw driver and have been tested. We plan to research this example for inclusion into the cpsw in  a future release. Some of the code above may already be in the kernel that you are using.

    Best Regards,

    Schuyler