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

Avoid ENOBUFS OSErrors by shrinking the size of SNDBUF when appropriate. #234

Merged
merged 6 commits into from
Jul 7, 2022

Conversation

wiboticalex
Copy link
Contributor

This is a followup to issue #233.

Avoid ENOBUFS OSErrors by shrinking the size of SNDBUF when appropriate.

Similar behavior could have probably been achieved by simply setting the socket's SNDBUF to 0 to get whatever Linux sets as the minimum, but it seems like this may cause potential queue under-utilization when there are large queues specified, so this pull request tries to calculate (with a very rough approximation for sk_buffer struct size) what the minimum SNDBUF should be to get blocking behavior.

Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also bump the version number in pycyphal/VERSION to 1.9.0.beta2 and (optionally) add a line to CHANGELOG.rst about this.

@pavel-kirienko pavel-kirienko enabled auto-merge (squash) July 7, 2022 17:07
@pavel-kirienko
Copy link
Member

@wiboticalex can you please run Black to fix the formatting? This should get merged automatically afterward.

auto-merge was automatically disabled July 7, 2022 17:30

Head branch was pushed to by a user without write access

@wiboticalex
Copy link
Contributor Author

Done. Thought I could get away with moving code around and not reformatting, but apparently not 🙂 .

Thanks @pavel-kirienko

@pavel-kirienko pavel-kirienko enabled auto-merge (squash) July 7, 2022 17:38
@pavel-kirienko pavel-kirienko merged commit 62690b3 into OpenCyphal:master Jul 7, 2022
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

Successfully merging this pull request may close these issues.

2 participants