Re: writev over OpenSSL

2020-03-05 Thread John Baldwin
On 2/3/20 7:00 AM, Michael Wojcik wrote: >> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf Of >> Viktor Dukhovni >> Sent: Sunday, February 02, 2020 11:10 >> >> On Sun, Feb 02, 2020 at 05:28:19PM +, Salz, Rich via openssl-users wrote: >> >>> TLS/TLS will take your data

RE: writev over OpenSSL

2020-02-03 Thread Michael Wojcik
> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf Of > Viktor Dukhovni > Sent: Sunday, February 02, 2020 11:10 > > On Sun, Feb 02, 2020 at 05:28:19PM +, Salz, Rich via openssl-users wrote: > > > TLS/TLS will take your data and wrap it inside it’s own record > >

Re: writev over OpenSSL

2020-02-02 Thread Eran Borovik
I truly appreciate all the answers. Makes sense!! Most of my background is from systems where reducing (or even eliminating) memory copy by the CPU was the holy grail (using RDMA and other such techniques). I do realize that compared to all the other overheads in the network and OpenSSL path, we

Re: writev over OpenSSL

2020-02-02 Thread Viktor Dukhovni
On Sun, Feb 02, 2020 at 05:28:19PM +, Salz, Rich via openssl-users wrote: > TLS/TLS will take your data and wrap it inside it’s own record > structure. It has to, that’s the nature of the protocol. Thinking > that a single writev() is “encrypt buffers and then do analogous > syscall” is

Re: writev over OpenSSL

2020-02-02 Thread Salz, Rich via openssl-users
TLS/TLS will take your data and wrap it inside it’s own record structure. It has to, that’s the nature of the protocol. Thinking that a single writev() is “encrypt buffers and then do analogous syscall” is wrong.

Re: writev over OpenSSL

2020-02-02 Thread Richard Levitte
So if I understand correctly, the desirable advantages with writev(2) are atomicity across the set of buffers passed as well as minimum system call overhead. I can't see that we have support for this kind of construct. We *could* simulate something like that with smartly written BIOs, but it

RE: writev over OpenSSL

2020-02-02 Thread Michael Wojcik
This has of course come up before - there was an energetic discussion on this list back in May 2001, and then again in August of that year. Eric Rescorla was one of the participants (as was I). And the answer has always been that given the miniscule performance gain,[1] and portability issues

Re: writev over OpenSSL

2020-02-02 Thread Eran Borovik
Hi Marian, Thank you for the prompt response. I do understand that the overhead of encryption actually shadows the memory overhead involved, but still lost cycles are lost cycles. And these cycles might have been used by other logic (in the end of the day, the application does much more than send

Re: writev over OpenSSL

2020-02-02 Thread Marian Beermann
> Creating a temporary buffer and then consolidating the > vector is a problem because of the performance cost associated with > memory copy. Did you actually benchmark this or do you just think this is the case? Consider that SSL_write/read will normally do something like AES or Chapoly on your

writev over OpenSSL

2020-02-02 Thread Eran Borovik
Hi all, I am in the process of integrating OpenSSL with my application. My application uses scatter-gather unencrypted buffers. Without OpenSSL, I would use writev with no issues. Is there a way to do the equivalent over OpenSSL? I understand that I can split the vector into multiple