That’s great. I will implement it and submit patch for this optimization.

Ping

From: Florin Coras (fcoras) [mailto:[email protected]]
Sent: Thursday, July 26, 2018 1:01 AM
To: Yu, Ping <[email protected]>; [email protected]
Subject: Re: tls init server is too heavy

Hi Ping,

The plan you proposed sounds great, so definitely go for it! You’ll have to 
find a place to store a pointer to the shared engine-generated context (i.e., 
ssl_ctx) in the generic listener context. If no obvious field is available, 
maybe you can abuse the ctx_id since we still have space there (note that it’s 
limited to 42B).

Let me know how it goes!

Cheers,
Florin

From: "Yu, Ping" <[email protected]<mailto:[email protected]>>
Date: Wednesday, July 25, 2018 at 9:13 AM
To: "Florin Coras (fcoras)" <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Cc: "Yu, Ping" <[email protected]<mailto:[email protected]>>
Subject: tls init server is too heavy

Hello, Florin

In current TLS openssl implementation, in each accepted TLS session, 
openssl_ctx_init_server needs to re-init ssl_ctx, and set key and certificate, 
which actually is not necessary, and normally one-time initialization is good 
enough. After I change this initialization to run only once, I can get around 
20~30% performance improvement for CPS.
I am now considering to re-architect this initialization, and one possible 
point is to move this to tls_start_listen. A generic tls_ssl_ctx_init can be 
the interface, then it will call engine specific, such as openssl ssl_ctx 
initialization afterward. How do you think?

Thanks
Ping




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9935): https://lists.fd.io/g/vpp-dev/message/9935
Mute This Topic: https://lists.fd.io/mt/23814247/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to