Skip to content

gh-98030: socket: add missing TCP socket options #98031

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 2 commits into from
Dec 8, 2022

Conversation

matttbe
Copy link
Contributor

@matttbe matttbe commented Oct 7, 2022

A few TCP socket options have been added to the Linux kernel these last few years.

This commit adds all the ones available in Linux 6.0:

https://elixir.bootlin.com/linux/v6.0/source/include/uapi/linux/tcp.h#L91

While at it, the TCP_FASTOPEN option has been moved lower in the list just to keep the same order as in tcp.h to ease future synchronisations.

Please note that I initially wanted to get socket.TCP_FASTOPEN_CONNECT. I was going to add only this one but while at it, here are all the missing ones.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@matttbe matttbe force-pushed the fix-issue-98030 branch 2 times, most recently from 19f8cc6 to 90f954b Compare October 10, 2022 09:38
@gpshead gpshead self-assigned this Oct 23, 2022
@gpshead gpshead self-requested a review October 23, 2022 19:29
A few TCP socket options have been added to the Linux kernel these last
few years.

This commit adds all the ones available in Linux 6.0:

  https://elixir.bootlin.com/linux/v6.0/source/include/uapi/linux/tcp.h#L91

While at it, the TCP_FASTOPEN option has been moved lower in the list
just to keep the same order as in tcp.h to ease future synchronisations.

Please note that I initially wanted to get socket.TCP_FASTOPEN_CONNECT.
I was going to add only this one but while at it, here are all the
missing ones.

Signed-off-by: Matthieu Baerts <[email protected]>
@netlify
Copy link

netlify bot commented Dec 7, 2022

Deploy Preview for python-cpython-preview canceled.

Name Link
🔨 Latest commit e88ecc3
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6390bacb860fca000840639c

Signed-off-by: Matthieu Baerts <[email protected]>
@matttbe
Copy link
Contributor Author

matttbe commented Dec 7, 2022

Hi @gpshead,

Thank you for the review! I'm sorry for the delay, I missed the notification when I was on holiday.

I just listed all new constants in the doc as requested. Feel free to tell me if it is not what you had in mind!

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM Raspbian 3.x has failed when building commit cce8362.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/424/builds/3098) and take a look at the build logs.
  4. Check if the failure is related to this commit (cce8362) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/424/builds/3098

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

411 tests OK.

10 slowest tests:

  • test_venv: 10 min 30 sec
  • test_largefile: 6 min 5 sec
  • test_asyncio: 3 min 50 sec
  • test_multiprocessing_spawn: 3 min 47 sec
  • test_concurrent_futures: 2 min 58 sec
  • test_cppext: 2 min 54 sec
  • test_tools: 2 min 29 sec
  • test_tokenize: 2 min 17 sec
  • test_multiprocessing_forkserver: 2 min 1 sec
  • test_gdb: 1 min 46 sec

1 test altered the execution environment:
test_asyncio

21 tests skipped:
test_check_c_globals test_devpoll test_idle test_ioctl test_kqueue
test_launcher test_msilib test_peg_generator test_perf_profiler
test_startfile test_tcl test_tix test_tkinter test_ttk
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_wmi test_zipfile64

Total duration: 28 min 25 sec

Click to see traceback logs
remote: Enumerating objects: 12, done.        
remote: Counting objects:   9% (1/11)        
remote: Counting objects:  18% (2/11)        
remote: Counting objects:  27% (3/11)        
remote: Counting objects:  36% (4/11)        
remote: Counting objects:  45% (5/11)        
remote: Counting objects:  54% (6/11)        
remote: Counting objects:  63% (7/11)        
remote: Counting objects:  72% (8/11)        
remote: Counting objects:  81% (9/11)        
remote: Counting objects:  90% (10/11)        
remote: Counting objects: 100% (11/11)        
remote: Counting objects: 100% (11/11), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 12 (delta 4), reused 4 (delta 4), pack-reused 1        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to 'cce836296016463032495c6ca739ab469ed13d3c'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cce8362960 gh-98030: socket: add missing TCP socket options (#98031)
Switched to and reset branch 'main'

Objects/obmalloc.c:776:1: warning: ‘always_inline’ function might not be inlinable [-Wattributes]
  776 | arena_map_get(pymem_block *p, int create)
      | ^~~~~~~~~~~~~

make: *** [Makefile:1889: buildbottest] Error 3

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