summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-08-28 11:21:06 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-08-28 11:21:06 +1000
commit86e30a0166f9c9e65983d2c4066873c4181d08c8 (patch)
tree3b2be01d381e61c1c7f544a560f7dbb8b430a5d7
parent3980b636312516ee823e84e884dadbc86e6795d3 (diff)
- (dtucker) [clientloop.c configure.ac defines.h] Make the client's IO buffer
size a compile-time option and set it to 64k on Cygwin, since Corinna reports that it makes a significant difference to performance. ok djm@
-rw-r--r--ChangeLog3
-rw-r--r--clientloop.c4
-rw-r--r--configure.ac5
-rw-r--r--defines.h6
4 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e24f73274..89bfa66a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
12 the pty master on Solaris, since it never succeeds and can hang if large 12 the pty master on Solaris, since it never succeeds and can hang if large
13 amounts of data is sent to the slave (eg a copy-paste). Based on a patch 13 amounts of data is sent to the slave (eg a copy-paste). Based on a patch
14 originally from Doke Scott, ok djm@ 14 originally from Doke Scott, ok djm@
15 - (dtucker) [clientloop.c configure.ac defines.h] Make the client's IO buffer
16 size a compile-time option and set it to 64k on Cygwin, since Corinna
17 reports that it makes a significant difference to performance. ok djm@
15 18
1620090820 1920090820
17 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not 20 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not
diff --git a/clientloop.c b/clientloop.c
index b8352f6bf..9a7dc0ab0 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -636,7 +636,7 @@ static void
636client_process_net_input(fd_set *readset) 636client_process_net_input(fd_set *readset)
637{ 637{
638 int len, cont = 0; 638 int len, cont = 0;
639 char buf[8192]; 639 char buf[SSH_IOBUFSZ];
640 640
641 /* 641 /*
642 * Read input from the server, and add any such data to the buffer of 642 * Read input from the server, and add any such data to the buffer of
@@ -1129,7 +1129,7 @@ static void
1129client_process_input(fd_set *readset) 1129client_process_input(fd_set *readset)
1130{ 1130{
1131 int len; 1131 int len;
1132 char buf[8192]; 1132 char buf[SSH_IOBUFSZ];
1133 1133
1134 /* Read input from stdin. */ 1134 /* Read input from stdin. */
1135 if (FD_ISSET(fileno(stdin), readset)) { 1135 if (FD_ISSET(fileno(stdin), readset)) {
diff --git a/configure.ac b/configure.ac
index 5f5a08a0a..ef0b0fc97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.423 2009/08/28 01:02:37 dtucker Exp $ 1# $Id: configure.ac,v 1.424 2009/08/28 01:21:07 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.423 $) 18AC_REVISION($Revision: 1.424 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -446,6 +446,7 @@ int main(void) { exit(0); }
446 AC_DEFINE(DISABLE_FD_PASSING, 1, 446 AC_DEFINE(DISABLE_FD_PASSING, 1,
447 [Define if your platform needs to skip post auth 447 [Define if your platform needs to skip post auth
448 file descriptor passing]) 448 file descriptor passing])
449 AC_DEFINE(SSH_IOBUFSZ, 65536, [Windows is sensitive to read buffer size])
449 ;; 450 ;;
450*-*-dgux*) 451*-*-dgux*)
451 AC_DEFINE(IP_TOS_IS_BROKEN, 1, 452 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
diff --git a/defines.h b/defines.h
index 2ccded266..2ddfd96d0 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.155 2009/06/16 06:11:02 dtucker Exp $ */ 28/* $Id: defines.h,v 1.156 2009/08/28 01:21:07 dtucker Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
@@ -749,4 +749,8 @@ struct winsize {
749#define INET6_ADDRSTRLEN 46 749#define INET6_ADDRSTRLEN 46
750#endif 750#endif
751 751
752#ifndef SSH_IOBUFSZ
753# define SSH_IOBUFSZ 8192
754#endif
755
752#endif /* _DEFINES_H */ 756#endif /* _DEFINES_H */