Kernel bypass for UDP and TCP on Linux- what does it involve?

前端 未结 3 1438
我寻月下人不归
我寻月下人不归 2021-02-03 15:13

Per http://www.solacesystems.com/blog/kernel-bypass-revving-up-linux-networking:

[...]a network driver called OpenOnload that use “kernel bypass” tec

3条回答
  •  余生分开走
    2021-02-03 15:45

    Okay, so the question is not straight forward to answer without knowing how the kernel handles the network stack.

    In generel the network stack is made up of a lot of layers, with the lowest one being the actual hardware, typically this hardware is supported by means of drivers (one for each network interface), the nic's typically provide very simple interfaces, think recieve and send raw data.

    On top of this physical connection, with the ability to recieve and send data is a lot of protocols, which are layered as well, near the bottem is the ip protocol, which basically allows you to specify the reciever of your information, while at the top you'll find TCP which supports stable connections.

    So in order to answer your question, you most first figure out which part of the network stack you'll need to replace, and what you'll need to do. From my understanding of your question it seems like you'll want to keep the original network stack, and then just sometimes use your own, and in that case you should really just implement the strategy pattern, and make it possible to state which packets should be handled by which toplevel of the network stack.

    Depending on how the network stack is implemented in linux, you may or may not be able to achieve this, without kernel changes. In a microkernel architecture, where each part of the network stack is implemented in its own service, this would be trivial, as you would simply pipe your lower parts of the network stack to your strategy pattern, and have this pipe the input to the required network toplevel layers.

提交回复
热议问题