Skip to content

Review KCM (Kernel Connection Multiplexor) support #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tailhook opened this issue May 16, 2016 · 0 comments
Open

Review KCM (Kernel Connection Multiplexor) support #3

tailhook opened this issue May 16, 2016 · 0 comments

Comments

@tailhook
Copy link
Owner

tailhook commented May 16, 2016

KCM is a kernel facility that provides a message based interface over TCP. Links:

With this in mind, it looks like we need to change how we're doing protocol parsing. For newer kernel (>4.6) we need to upload a BPF filter to do most of the work for us. If you're on older kernel we need to provide a fallback.

This may be done in two ways:

  1. Make (use) a BPF interpreter in the userspace
  2. Create a higher level abstraction/DSL, which either compiles to BPF and sent to kernel or interpreted directly

Either way, it looks like we want to take advantage of the KCM by default, instead of having two implementations for each protocol. We are already abstracting simple things here, like "wait for delimiter" and "wait for N bytes". The kernel facility is much more rich, and we should get advantage of the feature.

I'm not sure how well does it play with TLS. Presumably, we will be able to dissect TCP protocol packets by KCM and everything else only in userspace.

Update: It's likely a future of what rotor-stream should be, but probably we need to start another crate for this. Because it looks like semantics will be very different from what we have now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant