Skip to content

Commit 0c2f2b0

Browse files
committed
ext/sockets: raw sockets, adding options of how to scale them.
- PACKET_FANOUT_HASH (default) distributes incoming raw packets to a group of processes (per-flow group). - PACKET_FANOUT_LB uses a round-robin algorithm. - PACKET_FANOUT_CPU decision based on a given cpu instead. - PACKET_FANOUT_RND uses a pseudo random generator. - PACKET_FANOUT_QM uses the queue mapping high performance (hardware based).
1 parent e844e68 commit 0c2f2b0

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

ext/sockets/sockets.stub.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,62 @@
17831783
const SOL_LOCAL = UNKNOWN;
17841784
#endif
17851785

1786+
#ifdef SOL_PACKET
1787+
/**
1788+
* @var int
1789+
* @cvalue SOL_PACKET
1790+
*/
1791+
const SOL_PACKET = UNKNOWN;
1792+
#endif
1793+
1794+
#ifdef PACKET_FANOUT
1795+
/**
1796+
* @var int
1797+
* @cvalue PACKET_FANOUT
1798+
*/
1799+
const PACKET_FANOUT = UNKNOWN;
1800+
#endif
1801+
1802+
#ifdef PACKET_FANOUT_HASH
1803+
/**
1804+
* @var int
1805+
* @cvalue PACKET_FANOUT_HASH
1806+
*/
1807+
const PACKET_FANOUT_HASH = UNKNOWN;
1808+
#endif
1809+
1810+
#ifdef PACKET_FANOUT_CPU
1811+
/**
1812+
* @var int
1813+
* @cvalue PACKET_FANOUT_CPU
1814+
*/
1815+
const PACKET_FANOUT_CPU = UNKNOWN;
1816+
#endif
1817+
1818+
#ifdef PACKET_FANOUT_ROLLOVER
1819+
/**
1820+
* @var int
1821+
* @cvalue PACKET_FANOUT_ROLLOVER
1822+
*/
1823+
const PACKET_FANOUT_ROLLOVER = UNKNOWN;
1824+
#endif
1825+
1826+
#ifdef PACKET_FANOUT_RND
1827+
/**
1828+
* @var int
1829+
* @cvalue PACKET_FANOUT_RND
1830+
*/
1831+
const PACKET_FANOUT_RND = UNKNOWN;
1832+
#endif
1833+
1834+
#ifdef PACKET_FANOUT_QM
1835+
/**
1836+
* @var int
1837+
* @cvalue PACKET_FANOUT_QM
1838+
*/
1839+
const PACKET_FANOUT_QM = UNKNOWN;
1840+
#endif
1841+
17861842
#if (defined(IPV6_RECVPKTINFO) && defined(HAVE_IPV6))
17871843
/**
17881844
* IPv6 ancillary data

ext/sockets/sockets_arginfo.h

Lines changed: 22 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)