-
-
Notifications
You must be signed in to change notification settings - Fork 435
Do not add IP_TOS cmsg on Android #1512
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
Conversation
Clippy failure is fixed in #1506, ignore it. IPv6 is out of scope, we currently only use IPv4. It probably also returns EINVAL, but I did not test it and plan to fix it only if we actually encounter this issue. |
LGTM, thanks for following up! |
Just tested that it still works after rebasing. |
Maybe EINVAL should be not ignored to avoid swallowing potential issues ? |
Lines 224 to 230 in 02037e7
Another option is to set some flag in our socket state and switch to "fallback mode" where no potentially unsupported features are used, but this adds its own complexity, a need to retry a call and so on. I do not see an immediate need for this on Androids, until we find an Android application for which ECN measurably improves the performance I would rather just always use this fallback mode. |
Android usually comes with old Linux kernels, and Linux <3.13 does not support IP_TOS cmsg type, returning EINVAL error from sendmmsg without sending anything. To avoid this problem we do not try to set TOS on Android at all.
I rebased the PR to include clippy fixes from #1506. |
@djc Could this be merged? We can then at least update to the main branch, although a 0.10 release would be nice too. Or maybe push it to 0.9 branch as 0.9.4. |
I'm honestly not very satisified with the approach of disabling ECN for all Android users when mostly very old devices are actually impacted, so I would like to at least discuss alternative strategies of dealing with this. I'd also like review from Ralith on this stuff before merging. Given that we're both volunteers, pinging within 24h after submitting a PR seems a little pushy IMO. (In general, I'd be fine with creating a 0.9.4 release. 0.10 will have to wait until after rustls 0.21 has been released.) |
Ok, I just saw that you approved and also left a reaction on the rebase comment, so if you decide not to merge then something is probably missing that I should fix with the PR. Regarding alternative approaches, we can try to set ECN by default but switch it off as soon as we get a single |
Fair enough, missed that context -- too much GitHub stuff to keep all the context around. Sorry for changing my mind, I'd rather optimize for newer/future devices while still trying to support the old stuff.
Yeah, that might be nicer. I guess we won't know for sure if the (Also relating to releases, note that this is actually part of quinn-udp, for which we can just push out further 0.3.x releases from the main branch.) |
Yes, we can only guess and disable everything that can cause problems, but for now it is only |
Closing in favor of #1516. |
Android usually comes with old Linux kernels,
and Linux <3.13 does not support IP_TOS cmsg type, returning EINVAL error from sendmmsg without sending anything.
To avoid this problem we do not try to set TOS on Android at all.
Fixes #1511