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/AM5728: CPSW driver failure at high bit rates

Part Number: AM5728

Tool/software: Linux

Hi,

I am using Kernel 4.4.41-rt50-g968d071ce9 on a custom board.

My board receives data over the network port at 220Mb / s without problems,but when I raise my rate to 370Mb / s,

a watchdog timeout occurs after more than an hour, and all future connections are lost. PING has no effect.

If you continue to increase the rate, this time will be shorter.

When I re-plug network port no problem.

The following is a printed message (appears only once):

root@am57xx-evm:~# [  159.424622] NOHZ: local_softirq_pending 88
[  159.424765] NOHZ: local_softirq_pending 88
[  159.703834] NOHZ: local_softirq_pending 40
[  165.176612] NOHZ: local_softirq_pending 80
[  165.176830] NOHZ: local_softirq_pending 80
[  165.177724] NOHZ: local_softirq_pending 80
[  165.178399] NOHZ: local_softirq_pending 80
[  165.179709] NOHZ: local_softirq_pending 80
[  165.180460] NOHZ: local_softirq_pending 80
[  165.181027] NOHZ: local_softirq_pending 80

root@am57xx-evm:~#
root@am57xx-evm:~# [  558.983743] ------------[ cut here ]------------
[  558.988406] WARNING: CPU: 1 PID: 18 at net/sched/sch_generic.c:306 dev_watchdog+0x26c/0x278()
[  558.996977] NETDEV WATCHDOG: eth0 (cpsw): transmit queue 0 timed out
[  559.003357] Modules linked in: bc_example(O) rpmsg_pru rpmsg_rpc rpmsg_proto xhci_plat_hcd xhci_hcd usbcore sd_mod dwc3 udc_core cbc virtio_rpmsg_bus jitterentropy_rng drbg xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo pru_rproc pruss_intc ecb snd_soc_simple_card sha512_generic sha512_arm sha256_generic hmac md5 sha1_generic snd_soc_omap_hdmi_audio sha1_arm_neon sha1_arm pvrsrvkm(O) c_can_platform omap_aes_driver pruss c_can omap_sham can_dev omap_wdt ahci_platform libahci_platform libahci libata scsi_mod ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap rtc_omap extcon_palmas extcon rtc_palmas palmas_pwrbutton snd_soc_tlv320aic3x rtc_ds1307 omap_des omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) cryptodev(O) cmemk(O)
[  559.076063] CPU: 1 PID: 18 Comm: ktimersoftd/1 Tainted: G           O    4.4.41-rt50-g968d071ce9 #16
[  559.076066] Hardware name: Generic DRA74X (Flattened Device Tree)
[  559.076070] Backtrace:
[  559.076087] [<c0013100>] (dump_backtrace) from [<c00132fc>] (show_stack+0x18/0x1c)
[  559.076097]  r7:c057f7a8 r6:200e0013 r5:00000000 r4:c0950374
[  559.076107] [<c00132e4>] (show_stack) from [<c02bb384>] (dump_stack+0x8c/0xa0)
[  559.076117] [<c02bb2f8>] (dump_stack) from [<c0034794>] (warn_slowpath_common+0x88/0xb8)
[  559.076125]  r7:c057f7a8 r6:00000132 r5:00000009 r4:ee4d1e00
[  559.076134] [<c003470c>] (warn_slowpath_common) from [<c00347fc>] (warn_slowpath_fmt+0x38/0x40)
[  559.076143]  r8:edf44800 r7:00000001 r6:c0922580 r5:edcb4000 r4:c0882a70
[  559.076152] [<c00347c8>] (warn_slowpath_fmt) from [<c057f7a8>] (dev_watchdog+0x26c/0x278)
[  559.076157]  r3:edcb4000 r2:c0882a70
[  559.076160]  r4:00000000
[  559.076168] [<c057f53c>] (dev_watchdog) from [<c0093848>] (call_timer_fn.constprop.3+0x30/0xa0)
[  559.076177]  r10:c057f53c r9:edcb4000 r8:eed2f614 r7:c057f53c r6:00000000 r5:00000000
[  559.076180]  r4:ffffe000
[  559.076187] [<c0093818>] (call_timer_fn.constprop.3) from [<c0093a54>] (run_timer_softirq+0x19c/0x228)
[  559.076193]  r7:00000200 r6:00000000 r5:00000000 r4:eed2f5c0
[  559.076200] [<c00938b8>] (run_timer_softirq) from [<c00384e4>] (do_current_softirqs+0x1b8/0x254)
[  559.076209]  r10:00000001 r9:ee4d1ed0 r8:00000000 r7:04208140 r6:ee4d0000 r5:00000004
[  559.076212]  r4:c091c2fc
[  559.076218] [<c003832c>] (do_current_softirqs) from [<c003883c>] (run_ksoftirqd+0x34/0x64)
[  559.076226]  r10:00000000 r9:00000000 r8:ffffe000 r7:c0934eec r6:00000001 r5:ee460440
[  559.076229]  r4:ffffe000
[  559.076237] [<c0038808>] (run_ksoftirqd) from [<c0053bdc>] (smpboot_thread_fn+0x164/0x2b8)
[  559.076242]  r5:ee460440 r4:ee4d0000
[  559.076249] [<c0053a78>] (smpboot_thread_fn) from [<c00507cc>] (kthread+0xe4/0xfc)
[  559.076258]  r10:00000000 r9:00000000 r8:00000000 r7:c0053a78 r6:ee460440 r5:ee4604c0
[  559.076262]  r4:00000000 r3:ee4c8740
[  559.076269] [<c00506e8>] (kthread) from [<c000fb10>] (ret_from_fork+0x14/0x24)
[  559.076275]  r7:00000000 r6:00000000 r5:c00506e8 r4:ee4604c0
[  559.076278] ---[ end trace 0000000000000002 ]---

This is the result of my review using some commands.

Triage report.

Kernel version and source, also include the results of this command: uname -a

	Linux am57xx-evm 4.4.41-rt50-g968d071ce9 #16 SMP PREEMPT RT Fri Nov 17 15:22:05 CST 2017 armv7l GNU/Linux

File system, TI SDK or Arago/Yocto based filesytem

	Yocto on ext4

Custom board or TI board? Please include device tree source file.

	Custom Board based on AM5728 EVM. See below for device tree snippet

Console log of the boot process that includes U-Boot and the Kernel.

	See Below

ethtool, ethtool -S, ifconfig shown below...

##################################
#### From bootup (dmesg)
##################################

~# dmesg | grep cpsw
[    1.769285] cpsw 48484000.ethernet: Detected MACID = d4:36:39:27:75:86
[    1.775930] cpsw 48484000.ethernet: cpts: overflow check period 800
[    1.782907] cpsw 48484000.ethernet: cpsw: Detected MACID = d4:36:39:27:75:87
[   10.544688] net eth1: initializing cpsw version 1.15 (0)
[   10.576420] net eth0: initialized cpsw ale version 1.4
[   10.928899] net eth0: initializing cpsw version 1.15 (0)
[   15.036849] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

##################################
#### ethtool
##################################

root@cut:~# ethtool eth0

Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes


##################################
#### ifconfig
##################################

~# ifconfig
eth0      Link encap:Ethernet  HWaddr D4:36:39:27:75:86
          inet addr:192.168.1.29  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d636:39ff:fe27:7586%132400/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:102 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6505 (6.3 KiB)  TX bytes:10463 (10.2 KiB)
          Interrupt:98

eth1      Link encap:Ethernet  HWaddr D4:36:39:27:75:87
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%132400/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:706 errors:0 dropped:0 overruns:0 frame:0
          TX packets:706 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:366681 (358.0 KiB)  TX bytes:366681 (358.0 KiB)


##################################
#### After Kernel trace (watchdog timeout)
##################################
~# ethtool eth0

Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000000 (0)

        Link detected: yes

~# ifconfig

eth0      Link encap:Ethernet  HWaddr D4:36:39:27:75:86
          inet addr:192.168.1.29  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d636:39ff:fe27:7586%132400/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27430701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72574707 errors:1052 dropped:13 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4114712377 (3.8 GiB)  TX bytes:1122281772 (1.0 GiB)
          Interrupt:98

eth1      Link encap:Ethernet  HWaddr D4:36:39:27:75:87
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%132400/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:953785 errors:0 dropped:0 overruns:0 frame:0
          TX packets:953785 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:2537938201 (2.3 GiB)  TX bytes:2537938201 (2.3 GiB)



I try to use 04.00.00 SDK, the maximum rate of only 200Mb / s. This is not suitable for my use.

Thanks,

  • Please follow this checklist and post the results here: processors.wiki.ti.com/.../5x_CPSW
  • Hi Biser,

    I've attached the requested info to this message. 

    Triage report.
    
    Kernel version and source, also include the results of this command: uname -a
    
    	Linux am57xx-evm 4.4.41-rt50-g968d071ce9 #16 SMP PREEMPT RT Fri Nov 17 15:22:05 CST 2017 armv7l GNU/Linux
    
    File system, TI SDK or Arago/Yocto based filesytem
    
    	Yocto on ext4
    
    Custom board or TI board? Please include device tree source file.
    
    	Custom Board based on AM5728 EVM. See below for device tree snippet
    
    Console log of the boot process that includes U-Boot and the Kernel.
    
    	See Below
    
    ethtool, ethtool -S, ifconfig shown below...
    
    ##################################
    #### From bootup (dmesg)
    ##################################
    
    
    [    1.587461] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
    [    1.593586] davinci_mdio 48485000.mdio: detected phy mask fffffffd
    [    1.605834] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [    1.616225] cpsw 48484000.ethernet: Detected MACID = a0:f6:fd:c2:33:8e
    [    1.622875] cpsw 48484000.ethernet: cpts: overflow check period 800
    [    1.629847] cpsw 48484000.ethernet: cpsw: Detected MACID = a0:f6:fd:c2:33:8f
    [   10.297896] net eth1: initializing cpsw version 1.15 (0)
    [   10.303245] net eth0: initialized cpsw ale version 1.4
    [   10.511436] net eth0: initializing cpsw version 1.15 (0)
    [   14.616152] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    
    
    ##################################
    #### ethtool
    ##################################
    ~# ethtool eth0
    Settings for eth0:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Supported pause frame use: Symmetric
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Advertised pause frame use: Symmetric
            Advertised auto-negotiation: Yes
            Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                                 100baseT/Half 100baseT/Full
                                                 1000baseT/Full
            Link partner advertised pause frame use: No
            Link partner advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: MII
            PHYAD: 1
            Transceiver: external
            Auto-negotiation: on
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000000 (0)
    
            Link detected: yes
    
    
    ##################################
    #### ethtool -S 
    ##################################
    ~# ethtool -S eth0
    NIC statistics:
         Good Rx Frames: 1513915
         Broadcast Rx Frames: 175
         Multicast Rx Frames: 58
         Pause Rx Frames: 0
         Rx CRC Errors: 0
         Rx Align/Code Errors: 0
         Oversize Rx Frames: 0
         Rx Jabbers: 0
         Undersize (Short) Rx Frames: 0
         Rx Fragments: 0
         Rx Octets: 289202958
         Good Tx Frames: 4325332
         Broadcast Tx Frames: 13
         Multicast Tx Frames: 52
         Pause Tx Frames: 0
         Deferred Tx Frames: 0
         Collisions: 0
         Single Collision Tx Frames: 0
         Multiple Collision Tx Frames: 0
         Excessive Collisions: 0
         Late Collisions: 0
         Tx Underrun: 0
         Carrier Sense Errors: 0
         Tx Octets: 2183162096
         Rx + Tx 64 Octet Frames: 1375778
         Rx + Tx 65-127 Octet Frames: 7907
         Rx + Tx 128-255 Octet Frames: 7988
         Rx + Tx 256-511 Octet Frames: 18355
         Rx + Tx 512-1023 Octet Frames: 47038
         Rx + Tx 1024-Up Octet Frames: 4382181
         Net Octets: 2472365054
         Rx Start of Frame Overruns: 121
         Rx Middle of Frame Overruns: 0
         Rx DMA Overruns: 121
         Rx DMA chan: head_enqueue: 1
         Rx DMA chan: tail_enqueue: 1513885
         Rx DMA chan: pad_enqueue: 0
         Rx DMA chan: misqueued: 55
         Rx DMA chan: desc_alloc_fail: 0
         Rx DMA chan: pad_alloc_fail: 0
         Rx DMA chan: runt_receive_buf: 0
         Rx DMA chan: runt_transmit_buf: 0
         Rx DMA chan: empty_dequeue: 0
         Rx DMA chan: busy_dequeue: 155099
         Rx DMA chan: good_dequeue: 1513758
         Rx DMA chan: requeue: 0
         Rx DMA chan: teardown_dequeue: 0
         Tx DMA chan: head_enqueue: 57118
         Tx DMA chan: tail_enqueue: 4268290
         Tx DMA chan: pad_enqueue: 0
         Tx DMA chan: misqueued: 160259
         Tx DMA chan: desc_alloc_fail: 1
         Tx DMA chan: pad_alloc_fail: 0
         Tx DMA chan: runt_receive_buf: 0
         Tx DMA chan: runt_transmit_buf: 290
         Tx DMA chan: empty_dequeue: 54140
         Tx DMA chan: busy_dequeue: 188771
         Tx DMA chan: good_dequeue: 4325331
         Tx DMA chan: requeue: 42943
         Tx DMA chan: teardown_dequeue: 0
    
    
    ##################################
    #### ifconfig
    ##################################
    
    ~# ifconfig
    
    eth0      Link encap:Ethernet  HWaddr A0:F6:FD:C2:33:8E
              inet addr:192.168.1.29  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a2f6:fdff:fec2:338e%132688/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1697767 errors:0 dropped:3 overruns:0 frame:0
              TX packets:4758363 errors:0 dropped:1 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:307428096 (293.1 MiB)  TX bytes:2816467865 (2.6 GiB)
              Interrupt:93
    
    eth1      Link encap:Ethernet  HWaddr A0:F6:FD:C2:33:8F
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1%132688/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:80274 errors:0 dropped:0 overruns:0 frame:0
              TX packets:80274 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1
              RX bytes:212221644 (202.3 MiB)  TX bytes:212221644 (202.3 MiB)
    
    
    
    ##################################
    #### Device Tree snippet
    ##################################
    
            mac: ethernet@48484000 {
                compatible = "ti,dra7-cpsw","ti,cpsw";
                ti,hwmods = "gmac";
                clocks = <&gmac_main_clk>, <&gmac_rft_clk_mux>;
                clock-names = "fck", "cpts";
                cpdma_channels = <8>;
                ale_entries = <1024>;
                bd_ram_size = <0x2000>;
                mac_control = <0x20>;
                slaves = <2>;
                active_slave = <0>;
                cpts_clock_mult = <0x784CFE14>;
                cpts_clock_shift = <29>;
                reg = <0x48484000 0x1000
                       0x48485200 0x2E00>;
                #address-cells = <1>;
                #size-cells = <1>;
    
                /*
                 * Do not allow gating of cpsw clock as workaround
                 * for errata i877. Keeping internal clock disabled
                 * causes the device switching characteristics
                 * to degrade over time and eventually fail to meet
                 * the data manual delay time/skew specs.
                 */
                ti,no-idle;
                /*
                 * rx_thresh_pend
                 * rx_pend
                 * tx_pend
                 * misc_pend
                 */
                interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;
                ranges;
                syscon = <&scm_conf>;
                status = "disabled";
    
                davinci_mdio: mdio@48485000 {
                    compatible = "ti,cpsw-mdio";
                    #address-cells = <1>;
                    #size-cells = <0>;
                    ti,hwmods = "davinci_mdio";
                    bus_freq = <1000000>;
                    reg = <0x48485000 0x100>;
                };
    
    	    cpsw_emac0: slave@48480200 {
                    /* Filled in by U-Boot */
                    mac-address = [ 00 00 00 00 00 00 ];
                };
    
                cpsw_emac1: slave@48480300 {
                    /* Filled in by U-Boot */
                    mac-address = [ 00 00 00 00 00 00 ];
                };
    
                phy_sel: cpsw-phy-sel@4a002554 {
                    compatible = "ti,dra7xx-cpsw-phy-sel";
                    reg= <0x4a002554 0x4>;
                    reg-names = "gmii-sel";
                };
            };
    
    &mac {
        status = "okay";
        dual_emac;
    };
    
    &cpsw_emac0 {
        phy_id = <&davinci_mdio>, <1>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <1>;
    };
    
    &cpsw_emac1 {
        phy_id = <&davinci_mdio>, <2>;
        phy-mode = "rgmii";
        dual_emac_res_vlan = <2>;
    };
    
    
    ##################################
    #### Error message
    ##################################
    root@am57xx-evm:~# [  820.007443] ------------[ cut here ]------------
    [  820.012103] WARNING: CPU: 0 PID: 4 at net/sched/sch_generic.c:306 dev_watchdog+0x26c/0x278()
    [  820.020587] NETDEV WATCHDOG: eth0 (cpsw): transmit queue 0 timed out
    [  820.026968] Modules linked in: bc_example(O) xhci_plat_hcd xhci_hcd usbcore rpmsg_pru rpmsg_proto rpmsg_rpc dwc3 udc_core cbc bluetooth drbg xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo pru_rproc pruss_intc ecb sha512_generic sha512_arm sha256_generic hmac snd_soc_simple_card md5 sha1_generic sha1_arm_neon sha1_arm snd_soc_omap_hdmi_audio pvrsrvkm(O) omap_aes_driver pruss omap_sham ahci_platform libahci_platform libahci omap_wdt libata virtio_rpmsg_bus scsi_mod ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap extcon_palmas rtc_palmas extcon palmas_pwrbutton rtc_omap snd_soc_tlv320aic3x omap_des omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) cryptodev(O) cmemk(O)
    [  820.094852] CPU: 0 PID: 4 Comm: ktimersoftd/0 Tainted: G           O    4.4.41-rt50-g968d071ce9 #1
    [  820.094854] Hardware name: Generic DRA74X (Flattened Device Tree)
    [  820.094858] Backtrace:
    [  820.094875] [<c00130f4>] (dump_backtrace) from [<c00132f0>] (show_stack+0x18/0x1c)
    [  820.094884]  r7:c0575a2c r6:20010013 r5:00000000 r4:c0946374
    [  820.094894] [<c00132d8>] (show_stack) from [<c02bb7c4>] (dump_stack+0x8c/0xa0)
    [  820.094904] [<c02bb738>] (dump_stack) from [<c00346e4>] (warn_slowpath_common+0x88/0xb8)
    [  820.094912]  r7:c0575a2c r6:00000132 r5:00000009 r4:ee4a1e00
    [  820.094920] [<c003465c>] (warn_slowpath_common) from [<c003474c>] (warn_slowpath_fmt+0x38/0x40)
    [  820.094928]  r8:edf49000 r7:00000001 r6:c0918580 r5:edcc1800 r4:c08780fc
    [  820.094937] [<c0034718>] (warn_slowpath_fmt) from [<c0575a2c>] (dev_watchdog+0x26c/0x278)
    [  820.094941]  r3:edcc1800 r2:c08780fc
    [  820.094944]  r4:00000000
    [  820.094952] [<c05757c0>] (dev_watchdog) from [<c0093320>] (call_timer_fn+0x30/0xa0)
    [  820.094961]  r10:c05757c0 r9:edcc1800 r8:00000200 r7:c05757c0 r6:00000000 r5:eed255c0
    [  820.094964]  r4:ffffe000
    [  820.094970] [<c00932f0>] (call_timer_fn) from [<c0093540>] (run_timer_softirq+0x1b0/0x23c)
    [  820.094977]  r7:00000000 r6:00000000 r5:eed255c0 r4:edcc1a78
    [  820.094984] [<c0093390>] (run_timer_softirq) from [<c00383ec>] (do_current_softirqs+0x1b8/0x254)
    [  820.094992]  r10:00000001 r9:ee4a1ed0 r8:00000000 r7:04208140 r6:ee4a0000 r5:00000004
    [  820.094995]  r4:c09112fc
    [  820.095001] [<c0038234>] (do_current_softirqs) from [<c0038904>] (run_ksoftirqd+0x34/0x64)
    [  820.095009]  r10:00000000 r9:00000000 r8:ffffe000 r7:c092ae2c r6:00000001 r5:ee443c80
    [  820.095011]  r4:ffffe000
    [  820.095020] [<c00388d0>] (run_ksoftirqd) from [<c005395c>] (smpboot_thread_fn+0x164/0x2b8)
    [  820.095024]  r5:ee443c80 r4:ee4a0000
    [  820.095032] [<c00537f8>] (smpboot_thread_fn) from [<c0050574>] (kthread+0xe4/0xfc)
    [  820.095040]  r10:00000000 r9:00000000 r8:00000000 r7:c00537f8 r6:ee443c80 r5:ee443d00
    [  820.095044]  r4:00000000 r3:ee4915c0
    [  820.095051] [<c0050490>] (kthread) from [<c000fad0>] (ret_from_fork+0x14/0x24)
    [  820.095057]  r7:00000000 r6:00000000 r5:c0050490 r4:ee443d00
    [  820.095060] ---[ end trace 0000000000000002 ]---
    
    
    
    ##################################
    #### After Kernel trace (watchdog timeout)
    ##################################
    
    ##################################
    #### ping ��Re-plug��
    ##################################
    root@am57xx-evm:~# ping 192.168.1.201
    PING 192.168.1.201 (192.168.1.201): 56 data bytes
    ^C
    --- 192.168.1.201 ping statistics ---
    11 packets transmitted, 0 packets received, 100% packet loss
    root@am57xx-evm:~# [ 1400.665053] cpsw 48484000.ethernet eth0: Link is Down
    [ 1403.676790] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    
    root@am57xx-evm:~# ping 192.168.1.201
    PING 192.168.1.201 (192.168.1.201): 56 data bytes
    64 bytes from 192.168.1.201: seq=0 ttl=64 time=0.603 ms
    64 bytes from 192.168.1.201: seq=1 ttl=64 time=0.415 ms
    64 bytes from 192.168.1.201: seq=2 ttl=64 time=0.433 ms
    ^C
    --- 192.168.1.201 ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 0.415/0.483/0.603 ms
    root@am57xx-evm:~#
    
    
    ##################################
    #### ethtool
    ##################################
    ~# ethtool eth0
    
    Settings for eth0:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Supported pause frame use: Symmetric
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Advertised pause frame use: Symmetric
            Advertised auto-negotiation: Yes
            Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                                 100baseT/Half 100baseT/Full
                                                 1000baseT/Full
            Link partner advertised pause frame use: No
            Link partner advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: MII
            PHYAD: 1
            Transceiver: external
            Auto-negotiation: on
            Supports Wake-on: d
            Wake-on: d
            Current message level: 0x00000000 (0)
    
            Link detected: yes
    
    
    ##################################
    #### ethtool -S 
    ##################################
    ~# ethtool -S eth0
    
    NIC statistics:
         Good Rx Frames: 7177889
         Broadcast Rx Frames: 521
         Multicast Rx Frames: 76
         Pause Rx Frames: 0
         Rx CRC Errors: 0
         Rx Align/Code Errors: 0
         Oversize Rx Frames: 0
         Rx Jabbers: 0
         Undersize (Short) Rx Frames: 0
         Rx Fragments: 0
         Rx Octets: 1065301161
         Good Tx Frames: 16715815
         Broadcast Tx Frames: 19
         Multicast Tx Frames: 55
         Pause Tx Frames: 0
         Deferred Tx Frames: 0
         Collisions: 0
         Single Collision Tx Frames: 0
         Multiple Collision Tx Frames: 0
         Excessive Collisions: 0
         Late Collisions: 0
         Tx Underrun: 0
         Carrier Sense Errors: 0
         Tx Octets: 3696377664
         Rx + Tx 64 Octet Frames: 6743094
         Rx + Tx 65-127 Octet Frames: 18467
         Rx + Tx 128-255 Octet Frames: 19153
         Rx + Tx 256-511 Octet Frames: 44456
         Rx + Tx 512-1023 Octet Frames: 110568
         Rx + Tx 1024-Up Octet Frames: 16957966
         Net Octets: 466711529
         Rx Start of Frame Overruns: 196
         Rx Middle of Frame Overruns: 0
         Rx DMA Overruns: 196
         Rx DMA chan: head_enqueue: 1
         Rx DMA chan: tail_enqueue: 7177766
         Rx DMA chan: pad_enqueue: 0
         Rx DMA chan: misqueued: 56
         Rx DMA chan: desc_alloc_fail: 0
         Rx DMA chan: pad_alloc_fail: 0
         Rx DMA chan: runt_receive_buf: 0
         Rx DMA chan: runt_transmit_buf: 0
         Rx DMA chan: empty_dequeue: 0
         Rx DMA chan: busy_dequeue: 339660
         Rx DMA chan: good_dequeue: 7177639
         Rx DMA chan: requeue: 0
         Rx DMA chan: teardown_dequeue: 0
         Tx DMA chan: head_enqueue: 102634
         Tx DMA chan: tail_enqueue: 16613181
         Tx DMA chan: pad_enqueue: 0
         Tx DMA chan: misqueued: 361974
         Tx DMA chan: desc_alloc_fail: 3
         Tx DMA chan: pad_alloc_fail: 0
         Tx DMA chan: runt_receive_buf: 0
         Tx DMA chan: runt_transmit_buf: 815
         Tx DMA chan: empty_dequeue: 97176
         Tx DMA chan: busy_dequeue: 783242
         Tx DMA chan: good_dequeue: 16715815
         Tx DMA chan: requeue: 122281
         Tx DMA chan: teardown_dequeue: 0
    
    

    Thanks.

  • Hi,

    Thank you for posting the triage results. The data in the results looks good for the moment so I have some additional questions.

    The Net watchdog timeout is from the transmit queue getting starved due to incoming packets. The watchdog message will only print once, further timeouts are possible. On each timeout the driver is reset, each reset will cause a momentary loss of network traffic.

    Could you please provide a diagram of the network you are testing with?

    What is the network throughput you require? Below are the released results for the latest RT kernel. These results are lower than the non PREEMPT RT kernel.

    processors.wiki.ti.com/.../Processor_SDK_Linux_RT_Kernel_Performance_Guide

    Am I correct that you are using iperf to measure the network throughput? If so could you please post the command line that you are using?

    Are you running the TI kernel configuration?

    Have you adjusted any thread priorities and is there any other applications running on the processor?

    Best Regards,
    Schuyler
  • Hi Schuyler,

    Thank you for reply.

    The result as you said: each reset will cause a momentary loss of network traffic.

    We need the network throughput around 350Mb/s.

    Kernel configuration I refer to "tisdk_am57xx-evm-rt_defconfig", no change on the network.

    Our program has not modified the thread priority,also run the java program, they form a complete program.

    Below is my test command and network diagram, as well as the kernel configuration file used.

    test-result.docx

    3362.config.txt

    Thanks,

    Better

  • Hi Better,
    Thank you for posting the additional test results.

    From the test result file posted:
    _____________________________________________________________
    root@am57xx-evm:~# iperf -c 192.168.1.22 -t 60 -w 8 <----- this is an 8 byte window size, did you mean a 8KB window size?
    WARNING: TCP window size set to 8 bytes. A small window size
    will give poor performance. See the Iperf documentation.
    _____________________________________________________________


    If you wanted an 8KB window size Could you please re-run the test with this change?

    iperf -c 192.168.1.22 -t 60 -w 8KB

    Best Regards,
    Schuyler
  • Hi Schuyler,

    Here is the result of my retesting.

    root@am57xx-evm:~# iperf -c 192.168.1.22 -t 60 -w 8KB
    ------------------------------------------------------------
    Client connecting to 192.168.1.22, TCP port 5001
    TCP window size: 16.0 KByte (WARNING: requested 8.00 KByte)
    ------------------------------------------------------------
    [  3] local 192.168.1.29 port 40316 connected with 192.168.1.22 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-60.0 sec  1.31 GBytes   187 Mbits/sec
    
    
    root@am57xx-evm:~# iperf -c 192.168.1.22 -t 60 -w 64KB
    ------------------------------------------------------------
    Client connecting to 192.168.1.22, TCP port 5001
    TCP window size:  128 KByte (WARNING: requested 64.0 KByte)
    ------------------------------------------------------------
    [  3] local 192.168.1.29 port 40318 connected with 192.168.1.22 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-60.0 sec  3.29 GBytes   471 Mbits/sec
    
    
    root@am57xx-evm:~# iperf -c 192.168.1.22 -t 60 -w 128KB
    ------------------------------------------------------------
    Client connecting to 192.168.1.22, TCP port 5001
    TCP window size:  256 KByte (WARNING: requested  128 KByte)
    ------------------------------------------------------------
    [  3] local 192.168.1.29 port 40320 connected with 192.168.1.22 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-60.0 sec  3.45 GBytes   494 Mbits/sec
    
    
    root@am57xx-evm:~# iperf -c 192.168.1.22 -t 60 -w 256KB
    ------------------------------------------------------------
    Client connecting to 192.168.1.22, TCP port 5001
    TCP window size:  320 KByte (WARNING: requested  256 KByte)
    ------------------------------------------------------------
    [  3] local 192.168.1.29 port 40322 connected with 192.168.1.22 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-60.0 sec  3.89 GBytes   556 Mbits/sec
    

    I think this should have no effect, because the bandwidth I test using the "iperf -c 192.168.1.22 -d -t 60" command should be sufficient.

    I think this issue should be driver BUG? Have you analyzed this driver?

    I found several similar posts in the forum, describe the problems are similar.

    Thanks,

    Better

  • Hi Better,

    I agree that the command you listed is sufficient, the default is supposed to be 64KB. A 64KB window will have an improved performance. This is confirmed by the re-test that you performed with the different window sizes.

    The driver is tested with each release and the cpsw throughput is measured on each release.

    Was the re-test done with your application running simultaneously?

    Could you test the iperf performance on your board without running the application? What is the performance and does the net watchdog timeout occur in this configuration?

    For the data rate you are trying to acheive will it be UDP or TCP traffic? You mentioned throughput, is the board to only receive data at 370Mbps? Is there a send bit rate requirement?

    In the earlier test-result doc, it looks like several kernel versions have been tried, would you be able to try the 4.2 SDK?

    Could you please post the links to the other forums posts that you are saying are similar to the issue you are seeing?

    Best Regards,
    Schuyler
  • Hi Schuyler,

    I tried the 4.2 SDK (non-RT version).

    The problem has disappeared.

    I tried again in the previous version (SDK3.0) test, the effect is also very good.

    So I suspect it's probably because the use of interrupts in the application affects the real-time kernel.

    What do you think?

    Thanks,

    Better

  • Hi Better,

    I am happy to hear the problem is resolved.

    I can only speak in general terms of the effect of the application on the kernel. One major difference between the RT and Non-RT kernels is the scheduling policy. In the non-RT the completely fair scheduler that is used will make sure that all threads get to run. In the RT kernel it is possible to starve threads depending on the scheduling policy used by the application (RR,FIFO). Your observation may be correct since it could be that the application was not yielding enough times to the kernel enough times to keep the network stack and driver from experiencing the timeout that you experienced.

    One concern I have though is the one of the issues you reported was the ability to ping the AM5728 after a period of time. Please report back if you experience that again. In the meantime we will consider the thread resolved.

    Best Regards,
    Schuyler