From b4d9a57e3d466c370ac7a5063b2188bcd8b13c9d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 4 Oct 2024 09:55:21 +0100 Subject: [PATCH 1/6] gh-124761: add socket.SO_REUSEPORT_LB --- Modules/socketmodule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index ded6f255aaddea..ecf6beb5396a1f 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7926,6 +7926,9 @@ socket_exec(PyObject *m) ADD_INT_MACRO(m, SO_REUSEPORT); #endif #endif +#ifdef SO_REUSEPORT_LB + ADD_INT_MACRO(m, SO_REUSEPORT_LB); +#endif #ifdef SO_SNDBUF ADD_INT_MACRO(m, SO_SNDBUF); #endif From 1c2c6bfb1e454e732e94d37aac1018f54b3cdf92 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 4 Oct 2024 09:59:34 +0100 Subject: [PATCH 2/6] add docs --- Doc/library/socket.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 935d4a85342876..199fb1f4f4bd49 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -674,6 +674,14 @@ Constants .. availability:: Linux >= 3.9 +.. data:: SO_REUSEPORT_LB + + Constant to enable duplicate address and port bindings with load balancing. + + .. versionadded:: 3.14 + + .. availability:: FreeBSD. + .. data:: AF_HYPERV HV_PROTOCOL_RAW HVSOCKET_CONNECT_TIMEOUT From ccd9690468d422c40e6196e6f54355cfa4f1c1cf Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:56:49 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst diff --git a/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst b/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst new file mode 100644 index 00000000000000..01fc3351d135a2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst @@ -0,0 +1 @@ +Add ``SO_REUSEPORT_LB`` constant to :mod:`socket` for FreeBSD. From 4b231c75f80b8a5159c52db188d21667d058ab61 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 15 Oct 2024 08:36:14 +0100 Subject: [PATCH 4/6] Update Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- .../next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst b/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst index 01fc3351d135a2..797dd31b368548 100644 --- a/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst +++ b/Misc/NEWS.d/next/Library/2024-10-04-09-56-45.gh-issue-124761.N4pSD6.rst @@ -1 +1 @@ -Add ``SO_REUSEPORT_LB`` constant to :mod:`socket` for FreeBSD. +Add :data:`~socket.SO_REUSEPORT_LB` constant to :mod:`socket` for FreeBSD. From 1671dce01f62dd5b066bc70f9cf43ded2b2aa27a Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 15 Oct 2024 08:45:45 +0100 Subject: [PATCH 5/6] Update Doc/library/socket.rst --- Doc/library/socket.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 199fb1f4f4bd49..3bfbba48368a0a 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -680,7 +680,7 @@ Constants .. versionadded:: 3.14 - .. availability:: FreeBSD. + .. availability:: FreeBSD >= 12.0 .. data:: AF_HYPERV HV_PROTOCOL_RAW From 0c164f1980d8f0fe371d2634d10f49ac4932f3ef Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 5 Dec 2024 18:08:55 +0000 Subject: [PATCH 6/6] Update Doc/library/socket.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Doc/library/socket.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index b36acad29ecb00..8ba2bd1dcce8cc 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -678,7 +678,7 @@ Constants Constant to enable duplicate address and port bindings with load balancing. - .. versionadded:: 3.14 + .. versionadded:: next .. availability:: FreeBSD >= 12.0