]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-rx_mtu-20050404
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 5 Apr 2005 03:17:15 +0000 (03:17 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 5 Apr 2005 03:17:15 +0000 (03:17 +0000)
cmdebug -addr should report the rx_mtu size if it is set and less than
the actual mtu size

(cherry picked from commit d0879e78e6a8824eb745359a00b1d3170b977eaa)

src/WINNT/afsd/afsd.h
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm_callback.c

index 749aac5a26f0ddd499877c033d3c30d909d9151d..5c7c8ff97382f0885045b359f20a418b217091e3 100644 (file)
@@ -121,6 +121,8 @@ extern int cm_fakeDirVersion;                               // the version number of the root.afs directory
 extern int cm_dnsEnabled;
 extern int cm_freelanceEnabled;
 
+extern long rx_mtu;
+
 #define CAPABILITY_ERRORTRANS (1<<0)
 #define CAPABILITY_BITS 1
 
index 38e5241bdaf741192afbdce82628e84b855ea328..94d68e85f974d412cd133612eb7f592e829dae4a 100644 (file)
@@ -59,7 +59,7 @@ int LANadapter;
 
 int numBkgD;
 int numSvThreads;
-
+long rx_mtu = -1;
 int traceOnPanic = 0;
 
 int logReady = 0;
@@ -538,7 +538,7 @@ int afsd_InitCM(char **reasonP)
     long traceBufSize;
     long maxcpus;
     long ltt, ltto;
-    long rx_mtu, rx_nojumbo;
+    long rx_nojumbo;
     long virtualCache = 0;
     char rootCellName[256];
     struct rx_service *serverp;
index 19606a058127192a83dfbc2efa16429db6423a21..37771db8587cc62fd37d15ebe23af01f919bfe8e 100644 (file)
@@ -964,11 +964,11 @@ SRXAFSCB_WhoAreYou(struct rx_call *callp, struct interfaceAddr* addr)
     for ( i=0; i < cm_noIPAddr; i++ ) {
         addr->addr_in[i] = cm_IPAddr[i];
         addr->subnetmask[i] = cm_SubnetMask[i];
-        addr->mtu[i] = cm_NetMtu[i];
+        addr->mtu[i] = (rx_mtu == -1 || (rx_mtu != -1 && cm_NetMtu[i] < rx_mtu)) ? 
+            cm_NetMtu[i] : rx_mtu;
     }
-    
-    MUTEX_EXIT(&callp->lock);
 
+    MUTEX_EXIT(&callp->lock);
     return 0;
 }
 
@@ -1123,7 +1123,8 @@ SRXAFSCB_TellMeAboutYourself( struct rx_call *callp,
     for ( i=0; i < cm_noIPAddr; i++ ) {
         addr->addr_in[i] = cm_IPAddr[i];
         addr->subnetmask[i] = cm_SubnetMask[i];
-        addr->mtu[i] = cm_NetMtu[i];
+        addr->mtu[i] = (rx_mtu == -1 || (rx_mtu != -1 && cm_NetMtu[i] < rx_mtu)) ? 
+            cm_NetMtu[i] : rx_mtu;
     }
 
     dataBytes = 1 * sizeof(afs_int32);
@@ -1133,7 +1134,6 @@ SRXAFSCB_TellMeAboutYourself( struct rx_call *callp,
     capabilities->Capabilities_val = dataBuffP;
 
     MUTEX_EXIT(&callp->lock);
-
     return 0;
 }