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: PRU Ethernet error

Part Number: PROCESSOR-SDK-AM335X


Hi all,

I am using TI SDK 06.03.00.106 with kernel vs 4.19.94 on my custom board with PRUETH Dual EMAC configuration.

I am monitoring my industrial network by using a network analyzer TAP device. And getting IP level errors as described below. And I need help to learn the root cause of the problem.

When sending the ICMP package over 1020 bytes as seen in the picture below, getting "IPV4 total length exceeds length" error in the IPv4 field and so also ICMP checksum error.

I am using the same kernel and modules and rootfs on both TI ICEv2 and my custom board, but there is no problem such as similar on TI ICEv2. Obviously, DTS files and PHY chipset drivers are different from each other. I don't think so but I want to ask that, Can the issue be related to PHY driver (Micrel KSZ8081MNXIA)?

  • DHCP Server IP: 10.10.10.1
  • My custom board IP (I've set IP only for eth1 port of the board in this case): 10.10.10.190

Wireshark dump can be found below:

am335x-prueth__ip10.10.10.190_1000bytes-issue_20200605.pcapng.zip

  • Hello Murat,

    Give me a bit to look at this. Will reply on Monday.

    Regards,

    Nick

  • Hello Murat,

    Do you see the same behavior with a ping partner that you can see statistics for? e.g., ping your Linux laptop instead of the dhcp server and use
    $ cat /proc/net/snmp
    to check statistics like InEchos outEchos  InErrors OutErrors

    It could be that wireshark is correctly observing an issue with the packets getting sent out. It is also possible that wireshark is just having a capture issue at the same time that something else is going on.

    If you cannot replicate the issue on a TI board, that does make it more challenging to help with debug.

    Regards,

    Nick

  • Hi Nick, as shown in the attachment, packages seem as transmitted but can't get responses due to the wrong structure of transmitted messages.

    I have tried to tell you about the wrong structure those noticed over Wireshark logs in the previous posts. I think `/proc/net/snmp` output is compatible with Wireshark logs.

    But still, we are so far away from the root cause of the problem.

    Attachment:

    root@mgate-eth:~#
    root@mgate-eth:~# cat /proc/net/snmp
    Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
    Ip: 2 64 8 0 3 0 0 0 5 0 0 1 0 0 0 0 0 0 0
    Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
    Icmp: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
    Tcp: 1 200 120000 -1 0 0 0 0 0 0 0 0 0 0 0
    Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    Udp: 0 0 0 0 0 0 0 5
    UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    UdpLite: 0 0 0 0 0 0 0 0
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# ping -c 5 10.10.10.195
    PING 10.10.10.195 (10.10.10.195) 56(84) bytes of data.
    64 bytes from 10.10.10.195: icmp_seq=1 ttl=128 time=23.5 ms
    64 bytes from 10.10.10.195: icmp_seq=2 ttl=128 time=0.701 ms
    64 bytes from 10.10.10.195: icmp_seq=3 ttl=128 time=0.968 ms
    64 bytes from 10.10.10.195: icmp_seq=4 ttl=128 time=0.762 ms
    64 bytes from 10.10.10.195: icmp_seq=5 ttl=128 time=0.741 ms
    
    --- 10.10.10.195 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4004ms
    rtt min/avg/max/mdev = 0.701/5.349/23.577/9.114 ms
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# cat /proc/net/snmp
    Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
    Ip: 2 64 13 0 3 0 0 0 10 5 0 1 0 0 0 0 0 0 0
    Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
    Icmp: 5 0 0 0 0 0 0 0 0 5 0 0 0 0 5 0 0 0 0 0 0 5 0 0 0 0 0
    IcmpMsg: InType0 OutType8
    IcmpMsg: 5 5
    Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
    Tcp: 1 200 120000 -1 0 0 0 0 0 0 0 0 0 0 0
    Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    Udp: 0 0 0 0 0 0 0 5
    UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    UdpLite: 0 0 0 0 0 0 0 0
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# ping -s 999 -c 5 10.10.10.195
    PING 10.10.10.195 (10.10.10.195) 999(1027) bytes of data.
    1007 bytes from 10.10.10.195: icmp_seq=1 ttl=128 time=21.8 ms
    1007 bytes from 10.10.10.195: icmp_seq=2 ttl=128 time=1.05 ms
    1007 bytes from 10.10.10.195: icmp_seq=3 ttl=128 time=1.03 ms
    1007 bytes from 10.10.10.195: icmp_seq=4 ttl=128 time=1.20 ms
    1007 bytes from 10.10.10.195: icmp_seq=5 ttl=128 time=0.994 ms
    
    --- 10.10.10.195 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4006ms
    rtt min/avg/max/mdev = 0.994/5.224/21.839/8.307 ms
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# cat /proc/net/snmp
    Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
    Ip: 2 64 19 0 3 0 0 0 16 10 0 1 0 0 0 0 0 0 0
    Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
    Icmp: 10 0 0 0 0 0 0 0 0 10 0 0 0 0 10 0 0 0 0 0 0 10 0 0 0 0 0
    IcmpMsg: InType0 OutType8
    IcmpMsg: 10 10
    Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
    Tcp: 1 200 120000 -1 0 0 0 0 0 0 0 0 0 0 0
    Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    Udp: 0 0 0 0 0 0 0 6
    UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    UdpLite: 0 0 0 0 0 0 0 0
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# ping -s 1020 -c 5 10.10.10.195
    PING 10.10.10.195 (10.10.10.195) 1020(1048) bytes of data.
    
    --- 10.10.10.195 ping statistics ---
    5 packets transmitted, 0 received, 100% packet loss, time 4184ms
    
    root@mgate-eth:~#
    root@mgate-eth:~#
    root@mgate-eth:~# cat /proc/net/snmp
    Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
    Ip: 2 64 24 0 3 0 0 0 21 15 0 1 0 0 0 0 0 0 0
    Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
    Icmp: 10 0 0 0 0 0 0 0 0 10 0 0 0 0 15 0 0 0 0 0 0 15 0 0 0 0 0
    IcmpMsg: InType0 OutType8
    IcmpMsg: 10 15
    Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
    Tcp: 1 200 120000 -1 0 0 0 0 0 0 0 0 0 0 0
    Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    Udp: 0 0 0 0 0 0 0 11
    UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti
    UdpLite: 0 0 0 0 0 0 0 0
    root@mgate-eth:~#
    

  • Can the issue be related to PHY driver (Micrel KSZ8081MNXIA)? Or any alternative reason? May you advise something to evaluate the root cause of the problem? 

  • Hello Murat,

    We know that you are sending a ping out and not getting a response. Now we need to isolate where the issue is occurring (custom board TX -> linux PC RX -> Linux PC TX -> custom board RX). Once we know that for sure, then we can start looking into whether the issue is PRUETH driver, PHY driver, board level, etc.

    To dig into that, try looking at proc/net/snmp for both custom board and Linux PC. Also take a look at ethernet statistics on both boards as reported by ethtool -S to see if there is anything funny going on like CRC errors.

    Regards,

    Nick