mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
This commit is contained in:
2
NEWS
2
NEWS
@@ -78,6 +78,8 @@ PHP NEWS
|
||||
(David Carlier)
|
||||
. socket_set_option() catches possible overflow with SO_RCVTIMEO/SO_SNDTIMEO
|
||||
with timeout setting on windows. (David Carlier)
|
||||
. Added TCP_FUNCTION_ALIAS, TCP_REUSPORT_LB_NUMA, TCP_REUSPORT_LB_NUMA_NODOM,
|
||||
TCP_REUSPORT_LB_CURDOM, TCP_BBR_ALGORITHM constants.
|
||||
|
||||
- Standard:
|
||||
. Fixed crypt() tests on musl when using --with-external-libcrypt
|
||||
|
||||
@@ -181,6 +181,11 @@ PHP 8.5 UPGRADE NOTES
|
||||
- Sockets:
|
||||
. IPPROTO_ICMP/IPPROTO_ICMPV6.
|
||||
. TCP_FUNCTION_BLK (FreeBSD only).
|
||||
. TCP_FUNCTION_ALIAS (FreeBSD only).
|
||||
. TCP_REUSPORT_LB_NUMA (FreeBSD only).
|
||||
. TCP_REUSPORT_LB_NUMA_NODOM (FreeBSD only).
|
||||
. TCP_REUSPORT_LB_NUMA_CURDOM (FreeBSD only).
|
||||
. TCP_BBR_ALGORITHM (FreeBSD only).
|
||||
|
||||
========================================
|
||||
11. Changes to INI File Handling
|
||||
|
||||
@@ -1711,7 +1711,11 @@ PHP_FUNCTION(socket_get_option)
|
||||
#endif
|
||||
|
||||
#ifdef TCP_FUNCTION_BLK
|
||||
case TCP_FUNCTION_BLK: {
|
||||
case TCP_FUNCTION_BLK:
|
||||
#ifdef TCP_FUNCTION_ALIAS
|
||||
case TCP_FUNCTION_ALIAS:
|
||||
#endif
|
||||
{
|
||||
|
||||
struct tcp_function_set tsf = {0};
|
||||
optlen = sizeof(tsf);
|
||||
|
||||
@@ -647,6 +647,37 @@ const TCP_KEEPCNT = UNKNOWN;
|
||||
*/
|
||||
const TCP_FUNCTION_BLK = UNKNOWN;
|
||||
#endif
|
||||
#ifdef TCP_FUNCTION_ALIAS
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_FUNCTION_ALIAS
|
||||
*/
|
||||
const TCP_FUNCTION_ALIAS = UNKNOWN;
|
||||
#endif
|
||||
#ifdef TCP_REUSPORT_LB_NUMA
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_REUSPORT_LB_NUMA
|
||||
*/
|
||||
const TCP_REUSPORT_LB_NUMA = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_REUSPORT_LB_NUMA_NODOM
|
||||
*/
|
||||
const TCP_REUSPORT_LB_NUMA_NODOM = UNKNOWN;
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_REUSPORT_LB_NUMA_CURDOM
|
||||
*/
|
||||
const TCP_REUSPORT_LB_NUMA_CURDOM = UNKNOWN;
|
||||
#endif
|
||||
#ifdef TCP_BBR_ALGORITHM
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_BBR_ALGORITHM
|
||||
*/
|
||||
const TCP_BBR_ALGORITHM = UNKNOWN;
|
||||
#endif
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue PHP_NORMAL_READ
|
||||
|
||||
17
ext/sockets/sockets_arginfo.h
generated
17
ext/sockets/sockets_arginfo.h
generated
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 341bf3dfc486ca410cf1e15e1e22b0c60734277b */
|
||||
* Stub hash: 2c5f4685d5dab42426d4fe0553dd17cb9935a572 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
|
||||
@@ -559,6 +559,21 @@ static void register_sockets_symbols(int module_number)
|
||||
#endif
|
||||
#if defined(TCP_FUNCTION_BLK)
|
||||
REGISTER_LONG_CONSTANT("TCP_FUNCTION_BLK", TCP_FUNCTION_BLK, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_FUNCTION_ALIAS)
|
||||
REGISTER_LONG_CONSTANT("TCP_FUNCTION_ALIAS", TCP_FUNCTION_ALIAS, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_REUSPORT_LB_NUMA)
|
||||
REGISTER_LONG_CONSTANT("TCP_REUSPORT_LB_NUMA", TCP_REUSPORT_LB_NUMA, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_REUSPORT_LB_NUMA)
|
||||
REGISTER_LONG_CONSTANT("TCP_REUSPORT_LB_NUMA_NODOM", TCP_REUSPORT_LB_NUMA_NODOM, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_REUSPORT_LB_NUMA)
|
||||
REGISTER_LONG_CONSTANT("TCP_REUSPORT_LB_NUMA_CURDOM", TCP_REUSPORT_LB_NUMA_CURDOM, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_BBR_ALGORITHM)
|
||||
REGISTER_LONG_CONSTANT("TCP_BBR_ALGORITHM", TCP_BBR_ALGORITHM, CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("PHP_NORMAL_READ", PHP_NORMAL_READ, CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("PHP_BINARY_READ", PHP_BINARY_READ, CONST_PERSISTENT);
|
||||
|
||||
Reference in New Issue
Block a user