新做了END驱动,放在相同的两块板子上相互ping对方,当ping包为64字节时,发现返回时间很长,且间隔960ms,ping包回应序列也不对,如下:
->ping "200.254.0.100",6
PING 200.254.0.100: 56 data bytes
64 bytes from 200.254.0.100: icmp_seq=0. time=0. ms
64 bytes from 200.254.0.100: icmp_seq=0. time=960. ms
64 bytes from 200.254.0.100: icmp_seq=0. time=1920. ms
64 bytes from 200.254.0.100: icmp_seq=0. time=2880. ms
64 bytes from 200.254.0.100: icmp_seq=1. time=2880. ms
64 bytes from 200.254.0.100: icmp_seq=1. time=3840. ms
----200.254.0.100 PING Statistics----
6 packets transmitted, 6 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/2080/3840
value = 0 = 0x0
查看了数据包的收发,200.254.0.100收到1个包后却回了2个包。驱动本身没有问题,是协议栈触发了驱动的两次发送中断。
于是我把ping包长度改大到2048(mtu 1500)却很正常如下:
->ping "200.254.0.100",5
PING 200.254.0.100: 2040 data bytes
2048 bytes from 200.254.0.100: icmp_seq=0. time=32. ms
2048 bytes from 200.254.0.100: icmp_seq=1. time=32. ms
2048 bytes from 200.254.0.100: icmp_seq=2. time=32. ms
2048 bytes from 200.254.0.100: icmp_seq=3. time=32. ms
2048 bytes from 200.254.0.100: icmp_seq=4. time=32. ms
----200.254.0.100 PING Statistics----
5 packets transmitted, 5 packets received, 0% packet loss
round-trip (ms) min/avg/max = 32/32/32
value = 0 = 0x0
是不是工程哪里没配置对?还是哪些其他问题?请高手题点