[ovs-dev] [PATCH] stream-ssl: Avoid unnecessary memory copies on send.
i.maximets at ovn.org
Tue Nov 30 15:09:57 UTC 2021
On 11/29/21 13:12, Dumitru Ceara wrote:
> On 11/22/21 00:46, Ilya Maximets wrote:
>> ssl_send() clones the data before sending, but if SSL_write() succeeds
>> at the first attempt, this is only a waste of CPU cycles.
>> Trying to send the original buffer instead and only copying remaining
>> data if it's not possible to send it all right away.
>> This should save a few cycles on every send.
>> It's probably possible to avoid the copy even if we can't send
>> everything at once, but will, likely, require some major change
>> of the stream-sll module in order to take into account all the
>> corner cases related to SSL connection. So, not trying to do that
>> for now.
>> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> Looks good to me; this passes OVS and OVN unit tests (when
> is also applied).
> Acked-by: Dumitru Ceara <dceara at redhat.com>
Best regards, Ilya Maximets.
More information about the dev