Re: [Qemu-devel] [PATCH] RFC: qio: Improve corking of TLS sessions

2019-06-10 Thread Eric Blake
On 6/10/19 9:02 AM, Eric Blake wrote: > > send(MSG_MORE) > send() > > is ideal; under the hood, we can translate it to: > > send(MSG_MORE) > gnutls_record_cork() > gnutls_record_send() > send() > if (size > threshold) { > gnutls_record_uncork() > gnutls_record_send() > } else {

Re: [Qemu-devel] [PATCH] RFC: qio: Improve corking of TLS sessions

2019-06-10 Thread Eric Blake
On 6/10/19 4:08 AM, Daniel P. Berrangé wrote: > On Fri, Jun 07, 2019 at 05:14:14PM -0500, Eric Blake wrote: >> Our current implementation of qio_channel_set_cork() is pointless for >> TLS sessions: we block the underlying channel, but still hand things >> piecemeal to gnutls which then produces mul

Re: [Qemu-devel] [PATCH] RFC: qio: Improve corking of TLS sessions

2019-06-10 Thread Daniel P . Berrangé
On Fri, Jun 07, 2019 at 05:14:14PM -0500, Eric Blake wrote: > Our current implementation of qio_channel_set_cork() is pointless for > TLS sessions: we block the underlying channel, but still hand things > piecemeal to gnutls which then produces multiple encryption packets. > Better is to directly u

Re: [Qemu-devel] [PATCH] RFC: qio: Improve corking of TLS sessions

2019-06-07 Thread Eric Blake
On 6/7/19 5:14 PM, Eric Blake wrote: > Our current implementation of qio_channel_set_cork() is pointless for > TLS sessions: we block the underlying channel, but still hand things > piecemeal to gnutls which then produces multiple encryption packets. > Better is to directly use gnutls corking, whic

[Qemu-devel] [PATCH] RFC: qio: Improve corking of TLS sessions

2019-06-07 Thread Eric Blake
Our current implementation of qio_channel_set_cork() is pointless for TLS sessions: we block the underlying channel, but still hand things piecemeal to gnutls which then produces multiple encryption packets. Better is to directly use gnutls corking, which collects multiple inputs into a single encr