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.

AM625: U-Boot: eth0: tftp timeouts

Part Number: AM625

I am observing slow TFTP downloads with occasional timeouts out in U-Boot.

In the log below, each T indicates a long timeout, and there are other delays that do not result in a timeout.

TFTP works without timeouts or delays on other A53 SOCs.

=> dhcp $tftp_server_address:test_10m                                                                                          
ethernet@8000000port@1 Waiting for PHY auto negotiation to complete..... done                                           
link up on port 1, speed 1000, full duplex                                                                              
BOOTP broadcast 1                                                                                                       
BOOTP broadcast 2                                                                                                       
BOOTP broadcast 3                                                                                                       
BOOTP broadcast 4                                                                                                       
DHCP client bound to address <redacted> (3514 ms)                                                                    
Using ethernet@8000000port@1 device                                                                                     
TFTP from server <redacted>; our IP address is <redacted>                                                         
Filename 'test_10m'.                                                                                                    
Load address: 0x82000000                                                                                                
Loading: #T ################################################################                                            
         #################################################################                                              
         #################################################################T                                             
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################                                              
         #################################################################
         909.2 KiB/s

Steps to reproduce:

  1. Create a tftp server, and add a 10MB file test_10m
  2. Boot https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/08.06.00.42/tisdk-default-image-am62xx-evm.wic.xz
  3. DHCP and download a 10MB file using tftp:
    1. dhcp $tftp_Server_address:test_10m
  • Hi,

    Could you please describe the network setup you have such as if the tftp server and the boot device on the same subnet? Does the transfer ever completely fail?

    Referencing a previous e2e thread there was some evidence these timeouts could be related to network topology. The summary of the referenced link is the tftp server and the device being on different subnets seem to be a possible contributor to tftp timeouts. 

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Could you please describe the network setup you have such as if the tftp server and the boot device on the same subnet

    The network looks like this:

             +---------------+
             | DHCP Server   |
             +---------------+
                      |
                      |
            +------------------+
            | Ethernet Switch  |
            +------------------+
             |                |
             |                |
    +---------------+  +---------------+
    | AM62 EVK      |  | Ubuntu 20.04  |
    +---------------+  | TFTP Server   |
                       +---------------+
    

    Does the transfer ever completely fail?

    I have not observed any complete failures, only regular delays and occasional extended timeouts.

    Referencing a previous e2e thread there was some evidence these timeouts could be related to network topology. The summary of the referenced link is the tftp server and the device being on different subnets seem to be a possible contributor to tftp timeouts. 

    The AM62 and TFTP server are on the same subnet with a short ethernet cable connected directly to the switch. This same network is used to test other A53 SoCs and boards, which all perform consistent with each other and have no timeouts. I have observed what you're referring to if they are not on the same subnet, but it is not the problem here.

    For example, other boards, using the same setup, will not have any timeouts and will average over 8MiB/s:

    u-boot=> dhcp $tftp_server_ip:test_10m
    BOOTP broadcast 1
    DHCP client bound to address redacted (13 ms)
    Using ethernet@30bf0000 device
    TFTP from server redacted; our IP address is redacted
    Filename 'test_10m'.
    Load address: 0x40480000
    Loading: #################################################################
             #################################################################
             removed extra lines...
             ##################################
             8.7 MiB/s

    Thanks,

    Nate

  • I had similar issues and this change actually fixed it:

    diff --git a/u-boot/drivers/dma/ti/k3-udma.c b/u-boot/drivers/dma/ti/k3-udma.c
    index d92b96443694..cceec38ba010 100644
    --- a/u-boot/drivers/dma/ti/k3-udma.c
    +++ b/u-boot/drivers/dma/ti/k3-udma.c
    @@ -2672,6 +2672,10 @@ int udma_prepare_rcv_buf(struct dma *dma, void *dst, size_t size)
                               ALIGN((unsigned long)desc_rx + uc->config.hdesc_size,
                                     ARCH_DMA_MINALIGN));
     
    +       invalidate_dcache_range((unsigned long)dst,
    +                               ALIGN((unsigned long)dst + size,
    +                                     ARCH_DMA_MINALIGN));
    +
            udma_push_to_ring(uc->rflow->fd_ring, desc_rx);
     
            uc->num_rx_bufs++;