-
Notifications
You must be signed in to change notification settings - Fork 31
Major rewrite of 'pkg/hvsock' and some other changes #53
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows builds newer than 10586 should support shutdown() (ie CloseRead()/CloseWrite()) and should also handle larger Read()/Write() data. Remove all the clutches we implemented to support older Windows versions, including the "protocol" we placed on top of the raw Hyper-V sockets to emulated then unsupported functionality. Note, we also removed the workaround in hvsock to use vsock on Linux if the kernel supports it. Signed-off-by: Rolf Neugebauer <[email protected]>
The Hyper-V socket implementation in 4.9.x kernels seems to only be able to handle smaller messages while the newer 4.14.x implementation seems to be doing fine with larger messages. This temporary workaround liites how much we write with one call to Write() to 8k which we found through experimentation to work. Signed-off-by: Rolf Neugebauer <[email protected]>
Make the struct implementing the hvsock internals internal. It doesn't need to be exported as we export the interface. Also move some constants to zsyscall_windows.go which should be skipped by linters anyway (not sure they do, but they should). Signed-off-by: Rolf Neugebauer <[email protected]>
Make the struct implementing the vsock internals internal. It doesn't need to be exported as we export the interface. Signed-off-by: Rolf Neugebauer <[email protected]>
It is no longer supported Signed-off-by: Rolf Neugebauer <[email protected]>
It's already namespaced by the package anyway. Note this is a API breaking change Signed-off-by: Rolf Neugebauer <[email protected]>
It's already namespaced by the package anyway. Note this is a API breaking change Signed-off-by: Rolf Neugebauer <[email protected]>
Signed-off-by: Rolf Neugebauer <[email protected]>
Signed-off-by: Rolf Neugebauer <[email protected]>
Defaults to true on Windows. On Linux, it tried to open a hvsock and if it fails returns false. This function can be used by Linux clients to determine if they should use vsock or hvsock when using Hyper-V sockets. Signed-off-by: Rolf Neugebauer <[email protected]>
Signed-off-by: Rolf Neugebauer <[email protected]>
Previously, 'pkg/hvosck' used to select either vsock or hvsock based on the Linux kernel. This auto-select was removed from 'pkg/hvsock'. Move the logic into the main sock_stress code instead. Signed-off-by: Rolf Neugebauer <[email protected]>
Signed-off-by: Rolf Neugebauer <[email protected]>
Note, this commit contains a minor unrelated change in Dial() which can't easily be rebased to the correct commit as the code has changed in between. Signed-off-by: Rolf Neugebauer <[email protected]>
- Add notes on how to run on Windows - Clarify limitations Signed-off-by: Rolf Neugebauer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains several breaking changes and removes support for Windows build before 10586. There is a new tag
end_10586_support
which should be used to access the latest older version.shutdown()
(CloseRead()
/CloseWrite()
in go speak). This should be supported in windows build 14393 an newer as well as the 4.9.x and 4.14.x implementation.shutdown()
does not seem to work properly. It works fine when the server is in the VM...hvsock
code to have the windows and linux implementation mostly separate.accept()
/Listen()
for windows #52).go lint
changes both inpkg/vsock
andpkg/hvsock
. Note this changed the API and adjustments were made tovsudd
andsock_stress
.vsudd
to also work on newer kernelsAll changes have been tested with both the 4.9.x and the 4.14.x kernel implementations (which are different).