-
Notifications
You must be signed in to change notification settings - Fork 903
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
Multithreading support on F-Stack #834
Comments
I have a same requirement for multithreading support |
I think the limitation may come from the way of porting FreeBSD network stack. Many FreeBSD "syscalls" are called with the same |
IMO, there are 2 (or 3 depending on the use case) main advantages of F-stack versus standard Linux:
So, if you want to use the F-stack from multiple threads this will remove the second advantage from the above list. I'm writing this because we use the FreeBSD stack from multiple threads but not in this way. We use separate instance of the stack for each thread i.e. each thread uses it's own network stack and shares (almost) nothing with the other threads (There are some lock-free queues for communication between the threads). However, in our version the DPDK layer is decoupled as a separate module and not glued to the FreeBSD stack, this allows the application to have the DPDK layer with N worker threads and each worker thread having each own instance of the FreeBSD stack. |
Thanks for the answer @freak82. Do you use F-Stack in your project? If so, did you make the change you mentioned to have a FreeBSD Stack per each thread? |
Yes, we use the modified F-stack version in production currently but not for a server. We use it for transparent caching proxy. |
@freak82, do you think you can post the patch that you applied to the F-Stack to have one FreeBSD stack per each thread, please? I think it would be a great contribution to the community |
I need to ask my employer first.
|
Hey @freak82 . Do you have any updates regarding posting the patches for the F-Stack / FreeBSD stack? |
I got green light about this from my employer. Few notes:
|
Hey @freak82, Firstly, many thanks for publishing the patch about multithreading on F-Stack. I really appreciate this! I took some time to go through it to understand the changes. Secondly, I tried applying the first patch (git apply x-stack.patch), but I got the following error (I've tried on the dev branch, v.1.21 and v1.23 release versions):
I also tried running
It seems that the Do you think it would be possible to add it, please? Furthermore, if I understood correctly, the DPDK is initialized as a separated entity, not in the ff_init_netstack function. Could you add some small example which shows how is binding between F-Stack and DPDK done, please? Many thanks again! 🙏 |
Will not have time for the DPDK exmples these days. Too much work, sorry. You may ping me again at the end of this week - like Friday for the example code. |
Hey @freak82, Do you think you can add the example code to show how the binding between F-Stack and DPDK can be done, please? |
At the end of the week probably and I'm not sure I'll have time even then but I'll try. |
source-code.tar.gz
|
@freak82 @RaduNichita |
Hey,
I recently came across the F-Stack project and I am interested in finding out more about the multithreading support for it.
Is this something that you are considering to support in the future if somebody comes with a PR for it or is there any limitation in the current codebase that prevents F-Stack API from running on multiple threads?
The text was updated successfully, but these errors were encountered: