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

underlay: support SockOptInt on all platforms incl Windows #4610

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

martenwallewein
Copy link
Contributor

Hey all,

I tried to build all the major SCION binaries for windows to see if it's possible to run an AS also on this platform. However, there is an issue that syscall.GetsockoptInt and syscall.SetsockoptInt have different signatures on windows than on all other platforms. One fix is to have extra windows code to support this, but I'm not sure what you prefer, so let me know if this fits or if I can do some other changes. In the end it would be great to have Windows support for all SCION services, too.

PS: The issue popped up when building the router, not sure if it affects other services.

Cheers,
Marten

@jiceatscion
Copy link
Contributor

This change is Reviewable

Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

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

Sounds good. No objection to a couple of os-specific files for such low-level issues. If that causes build issues, the CI will tell us.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @martenwallewein)


private/underlay/sockctrl/sockctrl.go line 17 at r1 (raw file):

// In Windows, SetSockOptInt and GetSockOptInt require syscall.Handle instead of int.
//go:build !windows
// +build !windows

+build is obsolete enough that we no don't use it any more. go:build is sufficient.


private/underlay/sockctrl/sockctrl_windows.go line 17 at r1 (raw file):

// In Windows, SetSockOptInt and GetSockOptInt require syscall.Handle instead of int.
//go:build windows
// +build windows

ditto


private/underlay/sockctrl/sockopt.go line 17 at r1 (raw file):

// In Windows, SetSockOptInt and GetSockOptInt require syscall.Handle instead of int.
//go:build !windows
// +build !windows

ditto


private/underlay/sockctrl/sockopt_windows.go line 17 at r1 (raw file):

// In Windows, SetSockOptInt and GetSockOptInt require syscall.Handle instead of int.
//go:build windows
// +build windows

ditto

Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

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

Could you run "make gazelle" to update the deps/src in the build file? That will make the CI checks happy.

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @martenwallewein)

Copy link
Contributor

@jiceatscion jiceatscion 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @martenwallewein)

Copy link
Contributor

@marcfrei marcfrei left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @martenwallewein)


private/underlay/sockctrl/sockctrl_windows.go line 1 at r2 (raw file):

// Copyright 2017 ETH Zurich

2024


private/underlay/sockctrl/sockopt_windows.go line 1 at r2 (raw file):

// Copyright 2017 ETH Zurich

2024

@martenwallewein
Copy link
Contributor Author

Hey guys, thanks a lot for the quick feedback! I updated the copyright and ran "make gazelle" as suggested.

@martenwallewein
Copy link
Contributor Author

Hey guys, I resolved all the comments but the CI still fails. It says end-to-end test failed. I ran this locally, there it worked. Could this be related to this: #4606?

I'm not sure how to proceed to fix the CI issue, so open for any suggestion.

Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

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

Yes, it looks that way. I hot the retry button on that one test. Sometimes it takes 2 o 3 attempts. I have a PR in the pipeline that includes a temporary patch for it. It should makes things acceptable until we find the root cause.

Reviewable status: 2 of 5 files reviewed, all discussions resolved (waiting on @marcfrei)

Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @martenwallewein)

@jiceatscion jiceatscion changed the title Support SockOptInt on all platforms incl Windows underlay: support SockOptInt on all platforms incl Windows Sep 9, 2024
@jiceatscion jiceatscion merged commit 79e7080 into scionproto:master Sep 9, 2024
5 checks passed
@martenwallewein
Copy link
Contributor Author

Thanks @jiceatscion and @marcfrei for taking care of this! 😊

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.

3 participants