-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-123476: Add support for existing TCP_QUICKACK socket setting to Windows #123478
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
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
c030ee4
Add support for existing TCP_QUICKACK socket setting to Windows
nkinnan 8d510a2
📜🤖 Added by blurb_it.
blurb-it[bot] 635e385
bugfix in previous commit
nkinnan ac49caf
Merge branch 'main' of https://github.com/nkinnan/cpython into main
nkinnan 183a18e
bugfix in previous commit
nkinnan e96d9db
remove test case since it works on windows but fails in the server en…
nkinnan 8147664
Update Lib/test/test_socket.py
nkinnan 02ffa52
modify news
nkinnan 4f92750
Merge branch 'main' of https://github.com/nkinnan/cpython into main
nkinnan 1ca08b7
remove last bit of unit test straggler code
nkinnan a0889a5
cleanup
nkinnan f2e8cca
whitespace
nkinnan a607fec
Update Modules/socketmodule.c
nkinnan 016a2c6
Update Misc/NEWS.d/next/Windows/2024-08-29-16-13-45.gh-issue-123476.m…
nkinnan d06cbe7
Merge branch 'main' into main
nkinnan ce8c1ab
additional documentation in socket.rst -- needs python release versio…
nkinnan 5c887b6
Merge branch 'main' of https://github.com/nkinnan/cpython into main
nkinnan 8185776
unit test that should work even if TCP_QUICKACK is already turned on …
nkinnan 7616b21
lint
nkinnan 4b49a2e
Update socket.rst
nkinnan 94f9087
Update Modules/socketmodule.h
nkinnan ebd8a9d
code review comments addressed
nkinnan a478e5e
lint
nkinnan 776d231
revert CR change due to CR comment updated
nkinnan 23c5522
Merge branch 'main' into main
nkinnan d0527e3
Update Modules/socketmodule.c
nkinnan 9ad2430
Merge branch 'python:main' into main
nkinnan fe453bc
move test case, remove test support code from asyncio
nkinnan ec053ad
typo
nkinnan 8c06855
revert change to different test case
nkinnan d7cb426
whitespace
nkinnan 1bc9b7a
whitespace
nkinnan 9cadf5b
Merge branch 'main' into main
nkinnan e9a39b6
test blocking path only for now
nkinnan 4b0f5db
Merge branch 'main' of https://github.com/nkinnan/cpython into main
nkinnan 559bbcb
whitespace
nkinnan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Windows/2024-08-29-16-13-45.gh-issue-123476.m2DFS4.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for ``socket.TCP_QUICKACK`` on Windows platforms. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Should I understand that this constant cannot be used by
setsockopt
and that you need this special path?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.
Yes, on windows platform, QUICKACK can only be set through WSAIoctl() and is not supported through setsockopt()
Uh oh!
There was an error while loading. Please reload this page.
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.
Another quick note to help with review:
On Windows, the only values accepted for SIO_TCP_SET_ACK_FREQUENCY is 0 and 1, with 1 meaning "ack every 1 packets" aka TCP_QUICKACK is on, and 0 meaning "use default value" aka TCP_QUICKACK is off. So there's no need to translate the value set by the user. 1 is on, 0 is off, just like TCP_NODELAY and other socket flags. A convenient coincidence.
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.
I see. I un-resolved this conversation so that future reviewers can see it (otherwise GH hides it).
Uh oh!
There was an error while loading. Please reload this page.
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.
I'll throw another note in here for future reviewers then: there is no equivalent SIO_TCP_GET_ACK_FREQUENCY, so the value must be saved in the socket object. On Windows SIO_TCP_SET_ACK_FREQUENCY is always 0 for a new socket, and the socket->quickack variable is always initialized to 0, so the response value from socket.getsockopt for TCP_QUICKACK will always be correct on Windows even if not previously set.
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.
another explanation of behavior for future reviewers, please see this comment: #123478 (comment)