h2o / quicly

A modular QUIC stack designed primarily for H2O
MIT License
613 stars 116 forks source link

Add API for packet vectorized / async processing #193

Open RaoulDotSh opened 5 years ago

RaoulDotSh commented 5 years ago

Our goal is to use alternative ciphers for performance improvements, and the next step will be to support Async jobs with openssl 3.0.0.

We are making progress on the quicly integration in VPP (https://github.com/FDio/vpp/tree/master/src/plugins/quic), it works as it but we began to modify the code in order to optimize performances by batching cipher operations

For now we are able to use our own cipher engine by modifying quicly and picotls code (replacing ptls_aead_encrypt() / decrypt() and ptls_cipher_encrypt() / decrypt() functions ptr).

Currently we are trying to modify quicly to push a cipher operation for each packet and then process all operations just before sending/receiving data. This behaviour needs many modifications in quicly and we want to discuss about that. We plan to invest time on this evolution and make a PR, but if you have some ideas or suggestions about that we’re open.

kazuho commented 5 years ago

Thank you for using quicly in VPP.

I have always had adding support for crypto offload as one of the possibilities. Let's make that happen. FWIW, what I have had in my mind is something like this:

The bullet points marked [q] are the changes that would happen in quicly. Those marked [a] are the things that would happen on the application (e.g., VPP) side.

All that said, I am open to discussing any other approaches. Please let me know what you think.

RaoulDotSh commented 5 years ago

Thanks a lot for your response.

The first point is ok for us (create our own ptls_cipher_suite_t and register it in ptls_context_t/quicly_context_t), this was already done in vpp quic plugin and works well with our internal crypto engines.

For the other things we need to try this and see if your design can works with our needs. We will come back to you soon to discuss about that.