Code Monkey home page Code Monkey logo

Comments (6)

fridex avatar fridex commented on August 15, 2024

The original idea was to decrypt asynchronously to user space and provide data with cost of a data copy (not to wait for Crypto API decryption).

from af_ktls.

ilyalesokhin avatar ilyalesokhin commented on August 15, 2024

I guess the optimal solution depends on the use case.
But I think we should consider removing the rx work on the following ground:

  1. The CPU usage of the decryption is not attributed to the correct process.
  2. If the user application is waiting in tls_recv message this is clearly a loss as it adds more data shuffling and context switches. In normal TCP proccessing, the kernel doesn't linearize incoming SKB asynchronously to speed up later tcp_recvmsg calls.

from af_ktls.

fridex avatar fridex commented on August 15, 2024

I guess the optimal solution depends on the use case.

Yes, exactly. In the worst case, if user space hits worker, there will be additional copy involved.

But I think we should consider removing the rx work on the following ground:

  1. The CPU usage of the decryption is not attributed to the correct process.
  2. If the user application is waiting in tls_recv message this is clearly a loss as it adds more data shuffling and context switches. In normal TCP proccessing, the kernel doesn't linearize incoming SKB asynchronously to speed up later tcp_recvmsg calls.

Sounds reasonable, I'm not a kernel dev though. The implementation would be simplified as well.

from af_ktls.

lancerchao avatar lancerchao commented on August 15, 2024

I think OP makes a great point. If we really only cared about throughput then the async worker is a good way to make use of idle cores, but this won't scale to large number of connections.

from af_ktls.

lancerchao avatar lancerchao commented on August 15, 2024

Patch for this #73. Dave will discuss this issue at netdev

from af_ktls.

djwatson avatar djwatson commented on August 15, 2024

Let's pull this in for now

from af_ktls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.