add a ssh_packet_process_read() function that reads from a fd
authordjm <djm@openbsd.org>
Sat, 22 Jan 2022 00:49:34 +0000 (00:49 +0000)
committerdjm <djm@openbsd.org>
Sat, 22 Jan 2022 00:49:34 +0000 (00:49 +0000)
commitc3c0dfb380fbca4b9553ede646b6714abe172a92
tree6bb87b7acb12b3183773eaa348d82f11402ab1f3
parentce08ede1e6a72f2fd3f54385b4cba8cc58e91b44
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@
usr.bin/ssh/channels.h
usr.bin/ssh/clientloop.c
usr.bin/ssh/packet.c
usr.bin/ssh/packet.h
usr.bin/ssh/serverloop.c