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.

TDA4AL-Q1: How do I get the load rate, packet loss rate, CRC error packet and other data on RGMI

Part Number: TDA4AL-Q1

Hi,

How do I get data on network load rate, packet loss rate, CRC error packets, etc., on RGMI.

  • Hi,

    The previous description was incorrect. All you need to do is get the network load on RGMI.

  • Hi, 

    You can get the statics of CPSW using below command. 

    #ethtool -S eth0

    You can find out error packets and rx, tx packet count from statistics, but you will not get load directly. 

    If you need load calculation,  capture CPSW statistics at regular internal and calculate rate of tx & rx packet count as per capture interval this becomes load rate as per the capture interval. 

    Best Regards, 

    Sudheer

  • I understand that CPSW data needs to be collected on the SOC side, right? In this regard, please provide us with some relevant specific operations and materials, thank you.

  • Hi,

    Which application you are using for CPSW, is it MCAL? or Linux Driver?

    If Linux you can get statics using below ethtool command to terminal output. you can write application for collecting stats and calculating the bandwidth based on Tx & Rx counters.
    #ethtool -S eth0

    In case of MCAL use some timer and read CPSW statistics and calculate the Bandwidth.

    Please refer to TRM for the details of Register address for CPSW statistics.

    Best Regards,
    Sudheer

  • HI,

    I'm not sure what you mean by TRM. Please provide a link about TRM for our reference.

  • Hi,

    I mean Technical Reference Manual of TDA4AL.
    Please find the TRM from SOC page from ti.com.

    Best Regards,
    Sudheer

  • HI,

    I would like to ask what is the meaning of these data obtained through ethtool -S eth0. I did not find a detailed explanation in the TRM document you provided. Which is the RX or TX data of a 100 Mbit/S network port or a Gigabit network port? Could you please take a look at it? Thank you very much!

  • Hi,

    You can find the register details from above TRM link, it will download .tar file having TRM PDF and Excel sheet with registers information.
    From Index sheet of excel, refer to CPSW sheet, you can find the CPSW statistics under CPSW sheet.

    Port0 (p0) stats corresponding to Host Port statistics, and p1 corresponding to external port statistics which is exposed for outside network connection.

    When you run "ethtool -S eth0" you will get the statistics of both p0 (Host Port) and p1 (external port) on the console.

    Which is the RX or TX data of a 100 Mbit/S network port or a Gigabit network port?

    You need to refer to p1 statistics, for the Gigabit network port statistics.

    Best Regards,
    Sudheer

  • hi,

    I understand that port0 refers to the data on the MCU side, and port1 refers to the data on the external test PC. Then the load calculation of RGMII on the SOC side is the load received by p0 divided by the load sent by p1, right?

    Hope to receive your reply, thank you very much!

  • Hi,

    I understand that port0 refers to the data on the MCU side, and port1 refers to the data on the external test PC. Then the load calculation of RGMII on the SOC side is the load received by p0 divided by the load sent by p1, right?

    No.
    CPSW2G has two ports one is external port where you will connect the PHY and use to connect with external network, and other one is internal to H/W which is Host Port (or CPPI (Communications Port Programming Interface) Port) for transferring of packets to the internal core via UDMA.

    There could be possibility that packet can drop at External port when no rule to forward it to the Host port.

    Usually packet received on external port will be sent to internal Host Port and then to the core where application is running (in your case Linux A72 cores).

    For identifying the Load of CPSW, you need to capture statistics at regular interval (Ex: once per sec) and check the tx_good_frames difference for the Tx data rate, similarly rx_good_frames for Rx data rate. Check for the p1 statistics for the Gigbabit port data rate, p0 for the host port data rate ideally both should be same if there is no packet drop at p0 & p1.

    For External PC statistics you have run same ethtool command at PC side and check statistics if that driver supports.

    Best Regards,
    Sudheer