-
Notifications
You must be signed in to change notification settings - Fork 1.5k
WSLA: Implement virtioproxy networking mode #13764
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
WSLA: Implement virtioproxy networking mode #13764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements VirtioProxy networking mode for WSLA (Windows Subsystem for Linux Anywhere), enabling a more efficient networking approach compared to the existing NAT mode. The implementation involved refactoring VirtioNetworking and GnsPortTrackerChannel classes from the service executable into the common library to enable code sharing between WSL and WSLA.
Key Changes:
- Added
WSLANetworkingModeVirtioProxyenum value to the IDL interface - Moved
VirtioNetworkingandGnsPortTrackerChannelfrom service/exe to common library for code reuse - Refactored
VirtioNetworkingconstructor to use callback injection instead of builder pattern - Changed default networking mode for
wsl.exe --wslafrom NAT to VirtioProxy
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/windows/wslaservice/inc/wslaservice.idl | Added VirtioProxy enum value to networking mode definition |
| src/windows/wslaservice/exe/WSLAVirtualMachine.h | Added handler function declarations and DeviceHostProxy member for VirtioProxy support |
| src/windows/wslaservice/exe/WSLAVirtualMachine.cpp | Implemented VirtioProxy networking configuration, device management, and port handling |
| src/windows/service/exe/WslCoreVm.h | Added handler function declarations for VirtioProxy callbacks |
| src/windows/service/exe/WslCoreVm.cpp | Refactored VirtioNetworking initialization to use callback injection pattern and extracted handlers |
| src/windows/service/exe/CMakeLists.txt | Removed VirtioNetworking and GnsPortTrackerChannel from service build (moved to common) |
| src/windows/common/WslClient.cpp | Changed default WSLA networking mode from NAT to VirtioProxy |
| src/windows/common/VirtioNetworking.h | Refactored constructor to accept callbacks directly; removed builder pattern methods |
| src/windows/common/VirtioNetworking.cpp | Updated constructor implementation and callback usage to match new pattern |
| src/windows/common/GnsPortTrackerChannel.h | Added header file to common library (moved from service/exe) |
| src/windows/common/GnsPortTrackerChannel.cpp | Added implementation file to common library (moved from service/exe) |
| src/windows/common/CMakeLists.txt | Added VirtioNetworking and GnsPortTrackerChannel to common library build |
| test/windows/WSLATests.cpp | Added test case to verify VirtioProxy networking functionality |
6549d46 to
003a4bb
Compare
9c4061b to
c7082e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 13 changed files in this pull request and generated 3 comments.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
This change implements the VirtioProxy networking mode for WSLA. This required moving the VirtioProxy and GnsChannel classes into the common library (with NatNetworking). DNS tunneling is currently not supported with this networking mode, so an error is returned. With this change I have updated the default networking move of 'wsl.exe --wsla' to also use VirtioProxy networking mode.
c7082e7 to
60a91b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
This change implements the VirtioProxy networking mode for WSLA. This required moving the VirtioProxy and GnsChannel classes into the common library (with NatNetworking). I also included the cleanup change to VirtioNetworking that was just merged to main in this PR.
DNS tunneling is currently not supported with this networking mode, so an error is returned. With this change I have updated the default networking move of
wsl.exe --wslato also use VirtioProxy networking mode.