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

[LibOS] Handle IP_RECVERR socket option as a no-op #678

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

boryspoplawski
Copy link
Contributor

@boryspoplawski boryspoplawski commented Jun 22, 2022

Description of the changes

This socket option allows for later retrieval of detailed error descriptions that happened on the socket. We do not support such retrieval, so allowing to set this option basically defers the moment the app notices that it's not supported from the call to setsockopt, to the moment the error condition actually happens (which might be never).

Fixes #673

How to test this PR?

Try running repro code from #673


This change is Reviewable

dimakuv
dimakuv previously approved these changes Jun 23, 2022
Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required) (waiting on @boryspoplawski)


libos/src/net/ip.c line 285 at r1 (raw file):

        /* See the comment in `set_ipv4_option` for why we handle it this way. */
        return 0;
    }

Actually, you could just move this under the switch (optname) -- this will basically be just 2 lines of code.

I guess you don't want to call DkStreamAttributesQueryByHandle() unnecessarily, but on the other hand -- this setsockopt() is a rare operation, so we don't lose any performance on this. Not blocking though.

mkow
mkow previously approved these changes Jun 23, 2022
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @boryspoplawski)

This socket option allows for later retrieval of detailed error
descriptions that happened on the socket. We do not support such
retrieval, so allowing to set this option basically defers the moment
the app notices that it's not supported from the call to `setsockopt`,
to the moment the error condition actually happens (which might be
never).

Signed-off-by: Borys Popławski <[email protected]>
Copy link
Contributor Author

@boryspoplawski boryspoplawski left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, all discussions resolved, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: ITL) (waiting on @dimakuv and @mkow)


libos/src/net/ip.c line 285 at r1 (raw file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

Actually, you could just move this under the switch (optname) -- this will basically be just 2 lines of code.

I guess you don't want to call DkStreamAttributesQueryByHandle() unnecessarily, but on the other hand -- this setsockopt() is a rare operation, so we don't lose any performance on this. Not blocking though.

Done.

Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@boryspoplawski boryspoplawski merged commit 8b112b4 into master Jun 23, 2022
@boryspoplawski boryspoplawski deleted the borys/ip_recverr branch June 23, 2022 15:02
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.

Domain name resolution stopped working
3 participants