On Sun, Aug 24, 2008 at 02:03:02AM +0200, Denys Vlasenko wrote: > On Sunday 24 August 2008 01:46, Denys Vlasenko wrote: > Actually, "standard" ping seems to do it in order to be able to buffer > more than one ping response. I bumbed up buffer size to ~8k > for normal (short) pings in this updated patch. > > Please try it with variously-sized packets.
Seems to work fine for various sizes (but see below). In fact, for large pings it strangely seems to be consistently faster than the inetutils 1.5 ping that I built earlier while trying to figure out where the problem was: % uname -r 2.6.16.26-Cavium-Octeon % ./busybox ping -s 65000 -c 5 192.168.0.2 PING 192.168.0.2 (192.168.0.2): 65000 data bytes 65008 bytes from 192.168.0.2: seq=0 ttl=64 time=3.784 ms 65008 bytes from 192.168.0.2: seq=1 ttl=64 time=3.670 ms 65008 bytes from 192.168.0.2: seq=2 ttl=64 time=4.028 ms 65008 bytes from 192.168.0.2: seq=3 ttl=64 time=3.666 ms 65008 bytes from 192.168.0.2: seq=4 ttl=64 time=3.650 ms % inetutils_ping -s 65000 -c 5 192.168.0.2 PING 192.168.0.2 (192.168.0.2): 65000 data bytes 65008 bytes from 192.168.0.2: icmp_seq=0 ttl=64 time=4.951 ms 65008 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=4.797 ms 65008 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=4.729 ms 65008 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=4.745 ms 65008 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=4.731 ms However, in my tests between these two processors, there's a datasize range from 65494 through 65507 where the ping fails quietly (gets no response) without issuing any error message. I was going to suggest a further patch to limit the maxium packet size to MAXPACKET (already defined in ping.c but never used for anything), but then I realized that this symptom probably really does demonstrate a quirk somewhere in the networking stack on the destination machine. Limiting the maximum ping packet size (the way inetutils ping does) would only hide this quirk. I think it's better left the way it is, which means that when the packet size gets too large, sendto() will fail with an error message. Thanks, Doug. _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
