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.

PROCESSOR-SDK-AM335X: interrupt pacing cpsw

Part Number: PROCESSOR-SDK-AM335X

Hi Team,

I was testing the interrupt pacing functionality in the am335x BeagleBoneBlack evk with 5.10 kernel.
We are throttling tx via sending the raw packets to the ethernet. 
we are modifiying the rx-usecs by #ethtool -C eth0 rx-usecs 500
the initial value of the rx-usecs is 0

I'm checking the CPU load from the top command and  I'm unable to see any variation in the CPU load of ksortirq.

Please let me know the procedure to check interrupt-pacing and correct me if my understanding is correct or not.

  • Hi,

    What application(s) are you using in this use case?

    What is the expected throughput you are expecting for your use case?

    Is there a performance issue that you are trying to achieve with interrupt pacing?

    A couple of things to think about for this particular use case. First the BBB only has a 100Mbps PHY on it. Personal experience I have not seen the processor come close to maxing out when performing iperf tests. 

    The second thing is the CPSW driver RX path uses a network kernel scheduling technique called NAPI that provides a coalesce function as well.

    Best Regards,

    Schuyler

  • hi Patton,

    Thanks for reply.
    Scenario: We are trying to read Ethernet frames and it cause CPU Hog and eventually reboot the control board.
    Versions used: 4.9.59 with CPSW 1.0 , 5.10 with CPSW 2.0
    We are observing the above two scenarios CPU utilization is reaching upto 100%

    Information needed: We are trying to find a way to limit the number of packets received/parsed to reduce the CPU consumption. Is there way to do the packet drop/limit the Ethernet traffic for a period of time. If this is not possible, can we disable the Rx interrupts? 

  • Hi,

    This sounds like a flow control or scheduling challenge at the application level and not really a driver issue. Unless the driver is causing the issue I am not able to support this question. 

    Since the application is reading raw ethernet frames it is not taking advantage of flow control support  of an IP protocol such as TCPIP. I am assuming that the application reading raw ethernet frames does not have a flow control feature.  From the problem description it appears to be too many RX packets are overloading the processor. An equivalent might be the port is in promiscuous mode and too much traffic is overwhelming the AM335x.

    I do not know of a way to pause the RX outside of using a protocol like TCPIP to do that. Turning off RX interrupts is not a option, the cpsw driver registers a thread with the NAPI scheduler which will continually schedule the RX thread. 

    I am not able to comment on the throttling for the TX mentioned and how that relates to the RX thread here. 

    Best Regards,

    Schuyler