Skip to content

Commit 63e4e08

Browse files
committed
ext/sockets: following-up on GH-16842, update FreeBSD TCP stack setting.
- `TCP_FUNCTION_ALIAS`: fetches the function pointer name alias (>= 14.0 only tough). - `TCP_BBR_ALGORITHM`: set/get the underlying algorithm (0: netflix, 1: google) when the BBR's TCP stack is used. - `TCP_REUSPORT_LB_NUMA`: set/get a NUMA domain filter on the socket. close GH-16923
1 parent b09ed9a commit 63e4e08

File tree

5 files changed

+59
-2
lines changed

5 files changed

+59
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ PHP NEWS
7878
(David Carlier)
7979
. socket_set_option() catches possible overflow with SO_RCVTIMEO/SO_SNDTIMEO
8080
with timeout setting on windows. (David Carlier)
81+
. Added TCP_FUNCTION_ALIAS, TCP_REUSPORT_LB_NUMA, TCP_REUSPORT_LB_NUMA_NODOM,
82+
TCP_REUSPORT_LB_CURDOM, TCP_BBR_ALGORITHM constants.
8183

8284
- Standard:
8385
. Fixed crypt() tests on musl when using --with-external-libcrypt

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ PHP 8.5 UPGRADE NOTES
181181
- Sockets:
182182
. IPPROTO_ICMP/IPPROTO_ICMPV6.
183183
. TCP_FUNCTION_BLK (FreeBSD only).
184+
. TCP_FUNCTION_ALIAS (FreeBSD only).
185+
. TCP_REUSPORT_LB_NUMA (FreeBSD only).
186+
. TCP_REUSPORT_LB_NUMA_NODOM (FreeBSD only).
187+
. TCP_REUSPORT_LB_NUMA_CURDOM (FreeBSD only).
188+
. TCP_BBR_ALGORITHM (FreeBSD only).
184189

185190
========================================
186191
11. Changes to INI File Handling

ext/sockets/sockets.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,11 @@ PHP_FUNCTION(socket_get_option)
17111711
#endif
17121712

17131713
#ifdef TCP_FUNCTION_BLK
1714-
case TCP_FUNCTION_BLK: {
1714+
case TCP_FUNCTION_BLK:
1715+
#ifdef TCP_FUNCTION_ALIAS
1716+
case TCP_FUNCTION_ALIAS:
1717+
#endif
1718+
{
17151719

17161720
struct tcp_function_set tsf = {0};
17171721
optlen = sizeof(tsf);

ext/sockets/sockets.stub.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,37 @@
647647
*/
648648
const TCP_FUNCTION_BLK = UNKNOWN;
649649
#endif
650+
#ifdef TCP_FUNCTION_ALIAS
651+
/**
652+
* @var int
653+
* @cvalue TCP_FUNCTION_ALIAS
654+
*/
655+
const TCP_FUNCTION_ALIAS = UNKNOWN;
656+
#endif
657+
#ifdef TCP_REUSPORT_LB_NUMA
658+
/**
659+
* @var int
660+
* @cvalue TCP_REUSPORT_LB_NUMA
661+
*/
662+
const TCP_REUSPORT_LB_NUMA = UNKNOWN;
663+
/**
664+
* @var int
665+
* @cvalue TCP_REUSPORT_LB_NUMA_NODOM
666+
*/
667+
const TCP_REUSPORT_LB_NUMA_NODOM = UNKNOWN;
668+
/**
669+
* @var int
670+
* @cvalue TCP_REUSPORT_LB_NUMA_CURDOM
671+
*/
672+
const TCP_REUSPORT_LB_NUMA_CURDOM = UNKNOWN;
673+
#endif
674+
#ifdef TCP_BBR_ALGORITHM
675+
/**
676+
* @var int
677+
* @cvalue TCP_BBR_ALGORITHM
678+
*/
679+
const TCP_BBR_ALGORITHM = UNKNOWN;
680+
#endif
650681
/**
651682
* @var int
652683
* @cvalue PHP_NORMAL_READ

ext/sockets/sockets_arginfo.h

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)