Author Topic: 20% chance of Ping Timeout on 100M Ethernet  (Read 1405 times)

0 Members and 1 Guest are viewing this topic.

Offline tilblackoutTopic starter

  • Contributor
  • Posts: 31
  • Country: cn
20% chance of Ping Timeout on 100M Ethernet
« on: December 01, 2023, 10:36:34 am »
Hello everyone,

On my development board, I'm using the KSZ8051 as the Ethernet chip, and the official manual can be found at: https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/KSZ8051MNL-RNL-10BASE-T-100BASE-TX-Automotive-Physical-Layer-Transceiver-DS00002310B.pdf

The CPU I used is I.MX RT1170 from NXP, which provides SDK routines for the KSZ8081. After comparing the registers of the two chips, I found that no modifications are needed in the initialization code.

In the schematic, I forgot to add pull-up resistors for MDC and MDIO during hardware design. As a temporary solution before making the next board revision, I used software pull-ups on the MCU's internal GPIO, and successfully initialized the chip.

The computer can recognize the 100M Ethernet, but when pinging my board, there is a 20% chance of timeout.


Below is the schematic


What could be the reason for this?

I would greatly appreciate any assistance.
« Last Edit: December 05, 2023, 02:05:05 am by tilblackout »
 

Offline eleguy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: fi
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #1 on: December 06, 2023, 01:04:01 pm »
1) Where do you terminate ethernet differential pair(s) with 100 ohms? Or did I miss it when quickly checking the schematics.
2) Did you do impedance controlled board?
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #2 on: December 06, 2023, 05:00:40 pm »
Quote
when pinging my board, there is a 20% chance of timeout.
So "something" sends 100 ping packets, and gets 80 replies?
Does your board see 100 packets (+ a couple for ARP/etc), or 80 packets?  (ie, is it a reception problem, or a response problem?)
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #3 on: December 06, 2023, 06:36:43 pm »
It usually isn’t the problem, but do be aware that ICMP PING isn’t exactly a priority for any network stack so it may be that packets are just ignored.

If you want to be 110% sure you have a problem, measure TCP retransmission rates or something along those lines.
 

Offline tilblackoutTopic starter

  • Contributor
  • Posts: 31
  • Country: cn
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #4 on: December 08, 2023, 03:16:09 am »
Quote
when pinging my board, there is a 20% chance of timeout.
So "something" sends 100 ping packets, and gets 80 replies?
Does your board see 100 packets (+ a couple for ARP/etc), or 80 packets?  (ie, is it a reception problem, or a response problem?)
As shown in the Wireshark packet capture below, my WIN10 computer sent four ping packets, but for the third packet, there was no response from the KSZ8051 on the board.
 

Offline tilblackoutTopic starter

  • Contributor
  • Posts: 31
  • Country: cn
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #5 on: December 08, 2023, 03:21:04 am »
It usually isn’t the problem, but do be aware that ICMP PING isn’t exactly a priority for any network stack so it may be that packets are just ignored.

If you want to be 110% sure you have a problem, measure TCP retransmission rates or something along those lines.

When I ping the KSZ8051 from WIN10, there is no packet retransmission on the WIN10 side. It's just that the KSZ8051 is not responding, and I feel like the KSZ8051 did not receive the ping packets.
 

Offline tilblackoutTopic starter

  • Contributor
  • Posts: 31
  • Country: cn
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #6 on: December 08, 2023, 04:32:56 am »

Thank you, I have resolved the issue. It was a clock-related problem. The clock for KSZ8051 and the ENET clock in the CPU should be synchronized; otherwise, there is a chance of ping failure due to clock discrepancies.
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: 20% chance of Ping Timeout on 100M Ethernet
« Reply #7 on: December 08, 2023, 05:53:23 am »
It usually isn’t the problem, but do be aware that ICMP PING isn’t exactly a priority for any network stack so it may be that packets are just ignored.

If you want to be 110% sure you have a problem, measure TCP retransmission rates or something along those lines.

When I ping the KSZ8051 from WIN10, there is no packet retransmission on the WIN10 side. It's just that the KSZ8051 is not responding, and I feel like the KSZ8051 did not receive the ping packets.

I know you’ve solved this, but for future reference, there are should not be any retransmissions in ICMP PING. Retransmission is something that is typically handled by higher layers in the networking stack, if applicable.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf