rx: For AFS_RXERRQ_ENV, retry sendmsg on error
[openafs.git] / src / rx / rx_internal.h
index 83761d3..b420a23 100644 (file)
@@ -7,7 +7,6 @@
 
 #ifdef AFS_RXERRQ_ENV
 # if defined(AFS_LINUX26_ENV) || defined(AFS_USR_LINUX26_ENV)
-#  include <linux/module.h>
 #  include <linux/types.h>
 #  include <linux/errqueue.h>
 #  include <linux/icmp.h>
 extern rx_atomic_t rx_nWaiting;
 extern rx_atomic_t rx_nWaited;
 
+/* How many times to retry sendmsg()-equivalent calls for AFS_RXERRQ_ENV. */
+#define RXI_SENDMSG_RETRY 8
+
 /* Prototypes for internal functions */
 
 /* rx.c */
+extern int rxi_IsRunning(void);
+extern void rxi_CancelDelayedAckEvent(struct rx_call *);
 extern void rxi_PacketsUnWait(void);
 extern void rxi_SetPeerMtu(struct rx_peer *peer, afs_uint32 host,
                           afs_uint32 port, int mtu);
 #ifdef AFS_RXERRQ_ENV
 extern void rxi_ProcessNetError(struct sock_extended_err *err,
                                 afs_uint32 addr, afs_uint16 port);
+extern int osi_HandleSocketError(osi_socket sock, void *cmsgbuf,
+                                size_t cmsgbuf_len);
+extern void rxi_HandleSocketErrors(osi_socket sock);
+#else
+# define rxi_HandleSocketErrors(sock) do { } while (0)
 #endif
 extern struct rx_peer *rxi_FindPeer(afs_uint32 host, u_short port,
-                                   struct rx_peer *origPeer, int create);
+                                   int create);
 extern struct rx_packet *rxi_ReceivePacket(struct rx_packet *np,
                                           osi_socket socket, afs_uint32 host,
                                           u_short port, int *tnop,
@@ -54,6 +63,11 @@ extern void rxi_IncrementTimeAndCount(struct rx_peer *peer,
                                      afs_uint64 bytesSent,
                                      afs_uint64 bytesRcvd,
                                      int isServer);
+#ifdef RX_ENABLE_LOCKS
+extern void rxi_WaitforTQBusy(struct rx_call *call);
+#else
+# define rxi_WaitforTQBusy(call)
+#endif
 
 /* rx_packet.h */