-
Notifications
You must be signed in to change notification settings - Fork 9
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
UDP socket control #10
Comments
I found out that In general, server can be used to respond promptly to requests from different clients and it would be unreasonable to establish pseudo-connection for every client. What do you think about this case? |
Do you mean
If a request is received by a server, wouldn't it be possible to just call |
They use
Yes, it can be rewritten using pre-connected mechanism, but i don't know how this will affect performance. In some cases, server could send only 1-2 ACK packets to the client, so it may be unreasonable to call
Server can use single socket both for receiving and responding to messages. So, it must specify the destination address for each client via |
Btw we may have some issues with UDP multicast sockets. From man connect(2):
This means that restricted sandbox can only use |
Yes, we'll need to support |
Hi Mickaël, I've read the linked discussion threads, and I can try working on a first shot at the problem if that's still ok with your roadmap, e.g. considering #16 ?
About performance: I haven't had time to look at AFS, but more generally if anyone has potential applications (clients or servers) that could have issues with such a patch, I'd be interested to benchmark it. I'll read up on general kernel dev in parallel, worst that can happen is I realize how much complexity is hidden within a few weeks and come back empty handed. Cheers :) |
We can now control TCP actions (
bind(2)
andconnect(2)
), and it would be useful to have a similar semantic for UDP. It's a bit tricky because of the datagram nature of UDP though.However, it should not be an issue to check
sendto(2)
andrecvfrom(2)
for UDP because performant-sensitive applications should useconnect/bind
andsend/recv
instead, and we can checkconnect/bind
without checkingsend/recv
. Indeed,bind
andconnect
can be used to configure an UDP socket, even if it is not a connected protocol. This approach enables to limit the number of kernel checks and copies.We first need to check real use cases to validate these assumptions...
See https://lore.kernel.org/all/[email protected]/
Cc @BoardzMaster
The text was updated successfully, but these errors were encountered: