* Normally we wait and send a hard ack when the receiver consumes the packet */
EXT struct clock rx_softAckDelay;
-/* Variable to allow introduction of network unreliability */
-#ifdef RXDEBUG
+#if defined(RXDEBUG) || defined(AFS_NT40_ENV)
+/* Variable to allow introduction of network unreliability; exported from libafsrpc */
EXT int rx_intentionallyDroppedPacketsPer100 GLOBALSINIT(0); /* Dropped on Send */
EXT int rx_intentionallyDroppedOnReadPer100 GLOBALSINIT(0); /* Dropped on Read */
#endif
#define RX_FAST_ACK_RATE 1 /* as of 3.4, ask for an ack every
* other packet. */
-EXT int rx_minPeerTimeout GLOBALSINIT(350); /* in milliseconds */
+EXT int rx_minPeerTimeout GLOBALSINIT(20); /* in milliseconds */
EXT int rx_minWindow GLOBALSINIT(1);
-EXT int rx_maxWindow GLOBALSINIT(65535); /* twind is u_short */
+EXT int rx_maxWindow GLOBALSINIT(RX_MAXACKS); /* must ack what we receive */
EXT int rx_initReceiveWindow GLOBALSINIT(16); /* how much to accept */
-EXT int rx_maxReceiveWindow GLOBALSINIT(128); /* how much to accept */
+EXT int rx_maxReceiveWindow GLOBALSINIT(32); /* how much to accept */
EXT int rx_initSendWindow GLOBALSINIT(16);
-EXT int rx_maxSendWindow GLOBALSINIT(128);
+EXT int rx_maxSendWindow GLOBALSINIT(32);
EXT int rx_nackThreshold GLOBALSINIT(3); /* Number NACKS to trigger congestion recovery */
EXT int rx_nDgramThreshold GLOBALSINIT(4); /* Number of packets before increasing
* packets per datagram */
/* Number of free packets */
EXT int rx_nFreePackets GLOBALSINIT(0);
EXT int rxi_NeedMorePackets GLOBALSINIT(0);
-EXT int rx_nWaiting GLOBALSINIT(0);
-EXT int rx_nWaited GLOBALSINIT(0);
EXT int rx_packetReclaims GLOBALSINIT(0);
/* largest packet which we can safely receive, initialized to AFS 3.2 value
#endif
EXT char rx_waitingForPackets; /* Processes set and wait on this variable when waiting for packet buffers */
-EXT struct rx_statistics rx_stats;
-
EXT struct rx_peer **rx_peerHashTable;
EXT struct rx_connection **rx_connHashTable;
EXT struct rx_connection *rx_connCleanup_list GLOBALSINIT(0);
#endif
#ifdef RXDEBUG
-#define rx_Log rx_debugFile
-#ifdef AFS_NT40_ENV
+# define rx_Log rx_debugFile
+# ifdef AFS_NT40_ENV
EXT int rxdebug_active;
-#define dpf(args) do { if (rxdebug_active) rxi_DebugPrint args; } while (0)
+# define dpf(args) do { if (rxdebug_active) rxi_DebugPrint args; } while (0)
+# else
+# ifdef DPF_FSLOG
+# include <afs/afsutil.h>
+# define dpf(args) FSLog args
+# else
+# define dpf(args) do { if (rx_debugFile) rxi_DebugPrint args; } while (0)
+# endif
+# endif
+# define rx_Log_event rxevent_debugFile
#else
-#ifdef DPF_FSLOG
-#include <afs/afsutil.h>
-#define dpf(args) FSLog args
-#else
-#define dpf(args) do { if (rx_debugFile) rxi_DebugPrint args; } while (0)
-#endif
-#endif
-#define rx_Log_event rxevent_debugFile
+# define dpf(args)
+#endif /* RXDEBUG */
EXT char *rx_packetTypes[RX_N_PACKET_TYPES] GLOBALSINIT(RX_PACKET_TYPES); /* Strings defined in rx.h */
-#else
-#define dpf(args)
-#endif /* RXDEBUG */
#ifndef KERNEL
/*
#if defined(AFS_PTHREAD_ENV)
EXT int rxi_fcfs_thread_num GLOBALSINIT(0);
EXT pthread_key_t rx_thread_id_key;
-/* keep track of pthread numbers - protected by rx_stats_mutex,
- * except in rx_Init() before mutex exists! */
-EXT int rxi_pthread_hinum GLOBALSINIT(0);
#else
#define rxi_fcfs_thread_num (0)
#endif
#if defined(RX_ENABLE_LOCKS)
-EXT afs_kmutex_t rx_stats_mutex; /* used to protect stats gathering */
EXT afs_kmutex_t rx_waiting_mutex; /* used to protect waiting counters */
EXT afs_kmutex_t rx_quota_mutex; /* used to protect quota counters */
EXT afs_kmutex_t rx_pthread_mutex; /* used to protect pthread counters */
EXT afs_kmutex_t rx_packets_mutex; /* used to protect packet counters */
+EXT afs_kmutex_t rx_refcnt_mutex; /* used to protect conn/call ref counts */
#endif
EXT int rx_enable_stats GLOBALSINIT(0);