summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2009-01-22 18:14:22 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2009-01-22 18:14:22 +0000
commitc4d4977b737b888428e268839d61a44331509067 (patch)
tree547a1734893d170a6645bf1cbffb9ff8597446be
parent164d8fd6c869aefbaa95a41b3c00356b035747f7 (diff)
After the NFS server had sent a reply of size readsize or readdirsize,
the udp receive space got completely filled up. Even if the next packet from the server was a small reply, it got dropped by udp_input(). After a second the client resent the NFS request. Doubling rcvreserve reduces the chance of retransmits by having enough recv space for multiple NFS replies even if there comes a big one. found with pedro@, ok blambert@, thib@, pedro@
-rw-r--r--sys/nfs/nfs_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 016b8a27a8b..1901285d079 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.74 2009/01/22 13:51:37 bluhm Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.75 2009/01/22 18:14:21 bluhm Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -248,8 +248,8 @@ nfs_connect(nmp, rep)
so->so_snd.sb_timeo = 0;
if (nmp->nm_sotype == SOCK_DGRAM) {
sndreserve = nmp->nm_wsize + NFS_MAXPKTHDR;
- rcvreserve = max(nmp->nm_rsize, nmp->nm_readdirsize) +
- NFS_MAXPKTHDR;
+ rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
+ NFS_MAXPKTHDR) * 2;
} else if (nmp->nm_sotype == SOCK_SEQPACKET) {
sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * 2;
rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +