DWC4 ethernet in U-Boot receiving it's own traffic

Marek Vasut marex at denx.de
Tue Jan 28 22:32:51 CET 2020


Hi,

are you aware of any issues with the DWC4 ethernet in U-Boot? I recently
ran into oddity where the MAC receives it's own packets upon replying to
ARP request.

Test case is as follows:
- Assume host PC with IP 192.168.1.1/24 ,
  STM32MP1 board with IP 192.168.1.2/24
- Assume TFTP server has 64MiB file called 64m full of zeroes
  ($ dd if=/dev/zero of=/tftpboot/64m bs=64M count=1)
- Run the following in U-Boot:
$ setenv ipaddr 192.168.1.2
$ setenv netmask 255.255.255.0
$ setenv serverip 192.168.1.1
$ tftp 192.168.1.1:64m
- In parallel, during the TFTP transfer, run the following on PC:
$ arping -c 1 192.168.1.2

Observe 5-second delay while the MAC is trying to recover or complete
failure of the transfer.

What happens is that the U-Boot is in netloop, receives the ARP request
and sends ARP reply. So far so good. However, the DWC4 receives that ARP
reply too for reason that is not clear yet (the packet which arrives in
eqos_recv() has source MAC equal to the board MAC address).

Note that this is modeling a real world scenario where the host PC sends
ARP request to the board during a TFTP transfer. The same problem does
happen then.

Can you try replicating this and see whether this is happening for you too?

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list