Skip to content
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

SO_ATTACH_REUSEPORT_CBPF option for socket #97

Closed
sl1200mk2 opened this issue Apr 21, 2020 · 3 comments
Closed

SO_ATTACH_REUSEPORT_CBPF option for socket #97

sl1200mk2 opened this issue Apr 21, 2020 · 3 comments

Comments

@sl1200mk2
Copy link
Contributor

Hi,
In this document: https://www.slideshare.net/lfevents/boost-udp-transaction-performance
author is considering the use of SO_ATTACH_REUSEPORT_CBPF for sockets in order to speed UDP transaction.
Is it something we can benefit?

++

@radarsat1
Copy link
Owner

Interesting, looks like it couldn't hurt.. http://man7.org/linux/man-pages/man7/socket.7.html

If the BPF program
returns an invalid index, socket selection will fall back to
the plain SO_REUSEPORT mechanism.

I don't fully understand if OSC would stand to gain much, from the slides it appears that it's for very heavy UDP traffic. I guess it could, depending on the user. But as long as it doesn't hurt anything and could make things better, I see little reason not to try it.

I suppose I might want to test with several liblo-using applications to make sure there aren't any adverse effects.

@sl1200mk2
Copy link
Contributor Author

SO_REUSEPORT doesn't play nice on windows, so maybe it could be just for macos/linux.
I really don't know if we could gain something...
reading some docs I found this one which explains BPF (search for BPF Programs):
http://newosxbook.com/bonus/vol1ch16.html

++

@sl1200mk2
Copy link
Contributor Author

well it seems complicated... one should open BPF device for read-write access, put the filtering and attach it to an interface ('en0', 'lo0', etc...).
so it may not fit our needs...

++

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

2 participants