diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-01-22 00:49:34 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-01-25 12:18:35 +1100 |
commit | b30d32159dc3c7052f4bfdf36357996c905af739 (patch) | |
tree | 25d0f90b2823952c57e6d72f4dad0c4aec5d6592 /channels.h | |
parent | a1a8efeaaa9cccb15cdc0a2bd7c347a149a3a7e3 (diff) | |
download | openssh-git-b30d32159dc3c7052f4bfdf36357996c905af739.tar.gz |
upstream: add a ssh_packet_process_read() function that reads from
a fd directly into the transport input buffer.
Use this in the client and server mainloops to avoid unnecessary
copying. It also lets us use a more greedy read size without penalty.
Yields a 2-3% performance gain on cipher-speed.sh (in a fairly
unscientific test tbf)
feedback dtucker@ ok markus@
OpenBSD-Commit-ID: df4112125bf79d8e38e79a77113e1b373078e632
Diffstat (limited to 'channels.h')
-rw-r--r-- | channels.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.140 2022/01/06 21:48:38 djm Exp $ */ +/* $OpenBSD: channels.h,v 1.141 2022/01/22 00:49:34 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -247,6 +247,9 @@ struct Channel { /* Read buffer size */ #define CHAN_RBUF (16*1024) +/* Maximum size for direct reads to buffers */ +#define CHANNEL_MAX_READ CHAN_SES_PACKET_DEFAULT + /* Maximum channel input buffer size */ #define CHAN_INPUT_MAX (16*1024*1024) |