Subject: NetBSD 1.6.2 ping times
To: None <port-macppc@NetBSD.org>
From: Donald Lee <MacPPC@caution.icompute.com>
List: port-macppc
Date: 07/07/2004 09:04:55
I'm seeing an anomaly on NetBSD 1.6.2 on a G4/AGP with a Sonnet 1 Ghz
upgrade CPU in it.

When I ping another box on our network (100 BaseT) I get ping times that
are almost *exactly* 10 ms - except for the _first_ one.  To wit:

	grace$ ping mercy
	PING mercy.icompute.com (209.46.8.67): 56 data bytes
	64 bytes from 209.46.8.67: icmp_seq=0 ttl=255 time=0.250 ms
	64 bytes from 209.46.8.67: icmp_seq=1 ttl=255 time=10.001 ms
	64 bytes from 209.46.8.67: icmp_seq=2 ttl=255 time=10.008 ms
	64 bytes from 209.46.8.67: icmp_seq=3 ttl=255 time=10.009 ms
	64 bytes from 209.46.8.67: icmp_seq=4 ttl=255 time=10.010 ms
	64 bytes from 209.46.8.67: icmp_seq=5 ttl=255 time=10.010 ms
	^C
	----mercy.icompute.com PING Statistics----
	6 packets transmitted, 6 packets received, 0.0% packet loss
	round-trip min/avg/max/stddev = 0.250/8.381/10.010/3.984 ms

If I do a flood ping, I am limited to 100 pings a second.

	grace# ping -f joy
	PING joy.icompute.com (209.46.8.69): 56 data bytes
	.^C
	
	----joy.icompute.com PING Statistics----
	1040 packets transmitted, 1040 packets received, 0.0% packet loss
	round-trip min/avg/max/stddev = 0.139/9.680/12.417/1.704 ms
	  103.3 packets/sec sent,  103.3 packets/sec received
	grace# ping -f localhost
	PING localhost (127.0.0.1): 56 data bytes
	.^C
	
	----localhost PING Statistics----
	483325 packets transmitted, 483325 packets received, 0.0% packet loss
	round-trip min/avg/max/stddev = 0.021/0.022/2.380/0.007 ms
	  43221.3 packets/sec sent,  43221.8 packets/sec received


This behavior looks to me like some event is being delayed to the next
"tick" (100 HZ system clock, right?).  I saw this in the interrupt
handling in 1.5.2 where the interrupt code was "losing" soft interrupts
in macppc/extintr.c.

Anyone know of any bugs in this area?  This is the only symptom I see, but
I can't believe that this only affects ping.  This can't be a good thing
for general network performance.....

Thanks for any help,

-dgl-