search for: crypto_recv

Displaying 8 results from an estimated 8 matches for "crypto_recv".

2019 Jun 10
2
[nbdkit PATCH] crypto: Tweak handling of SEND_MORE
...picked for now. Signed-off-by: Eric Blake <eblake@redhat.com> --- server/crypto.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/crypto.c b/server/crypto.c index 3f3d96b..356f04f 100644 --- a/server/crypto.c +++ b/server/crypto.c @@ -345,6 +345,12 @@ crypto_recv (struct connection *conn, void *vbuf, size_t len) return 1; } +/* If this send()'s length is so large that it is going to require + * multiple TCP segments anyway, there's no need to try and merge it + * with any corked data from a previous send that used SEND_MORE. + */ +#define MAX_S...
2019 Jun 06
0
[nbdkit PATCH 1/2] server: Add support for corking
...-1; + + return 0; +} + /* There's no place in the NBD protocol to send back errors from * close, so this function ignores errors. */ @@ -504,6 +522,7 @@ crypto_negotiate_tls (struct connection *conn, int sockin, int sockout) */ conn->crypto_session = session; conn->recv = crypto_recv; + conn->cork = crypto_cork; conn->send = crypto_send; conn->close = crypto_close; return 0; -- 2.20.1
2019 Mar 18
3
[PATCH nbdkit 0/2] server: Split out NBD protocol code from connections code.
These are a couple of patches in preparation for the Block Status implementation. While the patches (especially the second one) are very large they are really just elementary code motion. Rich.
2019 Jun 06
4
[nbdkit PATCH 0/2] Reduce network overhead with corking
Slightly RFC, as I need more time to investigate why Unix sockets appeared to degrade with this patch. But as TCP sockets (over loopback to localhost) and TLS sessions (regardless of underlying Unix or TCP) both showed improvements, this looks like a worthwhile series. Eric Blake (2): server: Add support for corking server: Cork around grouped transmission send()s server/internal.h | 3
2019 Jun 07
4
[nbdkit PATCH v2 0/2] Reduce network overhead with MSG_MORE/corking
This time around, the numbers are indeed looking better than in v1; and I like the interface better. Eric Blake (2): server: Prefer send() over write() server: Group related transmission send()s server/internal.h | 7 +++- server/connections.c | 51 +++++++++++++++++++++++++--- server/crypto.c | 11 ++++--
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...0 && conn->sockin != conn->sockout) diff --git a/server/crypto.c b/server/crypto.c index 9cd1bb08..5ba3930e 100644 --- a/server/crypto.c +++ b/server/crypto.c @@ -312,8 +312,9 @@ crypto_free (void) * (returns > 0), read an EOF (returns 0), or fail (returns -1). */ static int -crypto_recv (struct connection *conn, void *vbuf, size_t len) +crypto_recv (void *vbuf, size_t len) { + struct connection *conn = GET_CONN; gnutls_session_t session = conn->crypto_session; char *buf = vbuf; ssize_t r; @@ -355,8 +356,9 @@ crypto_recv (struct connection *conn, void *vbuf, size_t le...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html v2 replaces struct connection *conn = GET_CONN; with GET_CONN; which sets conn implicitly and asserts that it is non-NULL. If we actually want to test if conn is non-NULL or behave differently, then you must use threadlocal_get_conn() instead, and some existing uses do that. Rich.
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of passing around struct connection * entirely within the server, preferring instead to reference the connection through thread-local storage. I hope this is a gateway to simplifying other parts of the code. Rich.