[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/7] io: get rid of bounce buffering in webso
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/7] io: get rid of bounce buffering in websock write path |
Date: |
Wed, 11 Oct 2017 07:58:55 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/11/2017 05:09 AM, Daniel P. Berrange wrote:
> Currently most outbound I/O on the websock channel gets copied into the
> rawoutput buffer, and then immediately copied again into the encoutput
> buffer, with a header prepended. Now that qio_channel_websock_encode
> accepts a struct iovec, we can trivially remove this bounce buffering
> and write directly to encoutput.
>
> In doing so, we also now correctly validate the encoutput size against
> the QIO_CHANNEL_WEBSOCK_MAX_BUFFER limit.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> include/io/channel-websock.h | 1 -
> io/channel-websock.c | 64
> +++++++++++++++++++-------------------------
> 2 files changed, 28 insertions(+), 37 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/7] Limit websockets memory usage & other bug fixes, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 2/7] io: simplify websocket ping reply handling, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 1/7] io: monitor encoutput buffer size from websocket GSource, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 5/7] io: get rid of bounce buffering in websock write path, Daniel P. Berrange, 2017/10/11
- Re: [Qemu-devel] [PATCH v2 5/7] io: get rid of bounce buffering in websock write path,
Eric Blake <=
- [Qemu-devel] [PATCH v2 7/7] io: add trace points for websocket HTTP protocol headers, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 6/7] io: cope with websock 'Connection' header having multiple values, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 4/7] io: pass a struct iovec into qio_channel_websock_encode, Daniel P. Berrange, 2017/10/11
- [Qemu-devel] [PATCH v2 3/7] io: get rid of qio_channel_websock_encode helper method, Daniel P. Berrange, 2017/10/11