[OpenAFS-devel] RX_MAX_FRAGS (yet again)

chas williams chas@cmf.nrl.navy.mil
Thu, 11 Oct 2001 13:41:02 -0400


ok, so the mtu problems now seems fixed on solaris and linux.  
after taking a little look at irix, it seems to have the same
broken behavior.  the problem seems to be with rxi_MatchIfnet()
which always returns 0 (i.e. not a match).  so rxi_FindIfnet()
will always return 0 and the ADAPT_MTU code can never determine
the interface (and its mtu).  just looking at the code, it looks
like the original author might have been trying to locate a 'best
match' by scoring the various interfaces.  my fix for the time
being is to return 1 if match_value != 0:


--- src/rx/IRIX/rx_knet.c.000	Thu Oct 11 11:02:45 2001
+++ src/rx/IRIX/rx_knet.c	Thu Oct 11 13:15:58 2001
@@ -314,7 +314,7 @@
 	}
     }
     *(int*)arg1 = match_value;
-    return 0;
+    return (match_value ? 1 : 0);
 }
 

now my sgi seems to pick up the right mtu for the various servers:

% rxdebug kahless -peers -port 7001
Trying 134.207.10.111 (port 7001):
Free packets: 129, packet reclaims: 0, calls: 16, used FDs: 64
not waiting for packets.
0 calls waiting for a thread
1 threads are idle
Done.
Peer at host 18.7.15.72, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 0	packet resends 0
	bytes sent high 0 low 0
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Peer at host 134.207.10.69, port 7000
	ifMTU 8524	natMTU 8524	maxMTU 8524
	packets sent 76	packet resends 2
	bytes sent high 0 low 9399
	bytes received high 0 low 0
	rtt 2 msec, rtt_dev 1 msec
	timeout 0.356 sec
Peer at host 134.207.10.70, port 7000
	ifMTU 8524	natMTU 1444	maxMTU 1444
	packets sent 0	packet resends 0
	bytes sent high 0 low 0
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 2.000 sec
Peer at host 134.207.10.69, port 7003
	ifMTU 8524	natMTU 1444	maxMTU 1444
	packets sent 38	packet resends 0
	bytes sent high 0 low 672
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 2.000 sec
Peer at host 18.72.0.26, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 0	packet resends 0
	bytes sent high 0 low 0
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Peer at host 18.179.0.27, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 0	packet resends 0
	bytes sent high 0 low 0
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Peer at host 18.179.0.30, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 8	packet resends 0
	bytes sent high 0 low 501
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Peer at host 134.207.10.14, port 7000
	ifMTU 8524	natMTU 8524	maxMTU 8524
	packets sent 76	packet resends 0
	bytes sent high 0 low 5186
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 2.000 sec
Peer at host 18.145.0.15, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 0	packet resends 0
	bytes sent high 0 low 4
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Peer at host 18.72.1.38, port 7000
	ifMTU 1444	natMTU 1444	maxMTU 1444
	packets sent 6	packet resends 0
	bytes sent high 0 low 69
	bytes received high 0 low 0
	rtt 0 msec, rtt_dev 0 msec
	timeout 3.000 sec
Done.