diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-01-22 01:49:34 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-01-25 02:18:35 +0100 |
commit | b30d32159dc3c7052f4bfdf36357996c905af739 (patch) | |
tree | 25d0f90b2823952c57e6d72f4dad0c4aec5d6592 /packet.h | |
parent | upstream: Use sshbuf_read() to read directly into the channel input (diff) | |
download | openssh-b30d32159dc3c7052f4bfdf36357996c905af739.tar.xz openssh-b30d32159dc3c7052f4bfdf36357996c905af739.zip |
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 'packet.h')
-rw-r--r-- | packet.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: packet.h,v 1.93 2021/07/16 09:00:23 djm Exp $ */ +/* $OpenBSD: packet.h,v 1.94 2022/01/22 00:49:34 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -128,6 +128,7 @@ int ssh_packet_read_expect(struct ssh *, u_int type); int ssh_packet_read_poll(struct ssh *); int ssh_packet_read_poll2(struct ssh *, u_char *, u_int32_t *seqnr_p); int ssh_packet_process_incoming(struct ssh *, const char *buf, u_int len); +int ssh_packet_process_read(struct ssh *, int); int ssh_packet_read_seqnr(struct ssh *, u_char *, u_int32_t *seqnr_p); int ssh_packet_read_poll_seqnr(struct ssh *, u_char *, u_int32_t *seqnr_p); |