<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in getsockopt.2</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>93ff7dba - socket: Implement SO_SPLICE</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#93ff7dba</link>
        <description>socket: Implement SO_SPLICEThis is a feature which allows one to splice two TCP sockets togethersuch that data which arrives on one socket is automatically pushed intothe send buffer of the spliced socket.  This can be used to make TCPproxying more efficient as it eliminates the need to copy data into andout of userspace.The interface is copied from OpenBSD, and this implementation aims to becompatible.  Splicing is enabled by setting the SO_SPLICE socket option.When spliced, data that arrives on the receive buffer is automaticallyforwarded to the other socket.  In particular, splicing is aunidirectional operation; to splice a socket pair in both directions,SO_SPLICE needs to be applied to both sockets.  More concretely, whensetting the option one passes the following struct:    struct splice {	    int fd;	    off_t max;	    struct timveval idle;    };where &quot;fd&quot; refers to the socket to which the first socket is to bespliced, and two setsockopt(SO_SPLICE) calls are required to set up abi-directional splice.select(), poll() and kevent() do not return when data arrives in thereceive buffer of a spliced socket, as such data is expected to beremoved automatically once space is available in the corresponding sendbuffer.  Userspace can perform I/O on spliced sockets, but it will beunpredictably interleaved with splice I/O.A splice can be configured to unsplice once a certain number of byteshave been transmitted, or after a given time period.  Once unspliced,the socket behaves normally from userspace&apos;s perspective.  The number ofbytes transmitted via the splice can be retrieved usinggetsockopt(SO_SPLICE); this works after unsplicing as well, up until thesocket is closed or spliced again.  Userspace can also manually triggerunsplicing by splicing to -1.Splicing work is handled by dedicated threads, similar to KTLS.  Aworker thread is assigned at splice creation time.  At some point itwould be nice to have a direct dispatch mode, wherein the thread whichplaces data into a receive buffer is also responsible for pushing itinto the sink, but this requires tighter integration with the protocolstack in order to avoid reentrancy problems.Currently, sowakeup() and related functions will signal the workerthread assigned to a spliced socket.  so_splice_xfer() does the hardwork of moving data between socket buffers.Co-authored by:	gallatinReviewed by:	brooks (interface bits)MFC after:	3 monthsSponsored by:	Klara, Inc.Sponsored by:	StormshieldSponsored by:	NetflixDifferential Revision:	https://reviews.freebsd.org/D46411(cherry picked from commit a1da7dc1cdad8c000622a7b23ff5994ccfe9cac6)

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Tue, 10 Sep 2024 16:50:30 +0000</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>b2c76c41 - Remove $FreeBSD$: one-line nroff pattern</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#b2c76c41</link>
        <description>Remove $FreeBSD$: one-line nroff patternRemove /^\.\\&quot;\s*\$FreeBSD\$$\n/

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 16 Aug 2023 17:55:15 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d0f8e317 - getsockopt.2: Clarify the SO_REUSEPORT_LB text a bit</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#d0f8e317</link>
        <description>getsockopt.2: Clarify the SO_REUSEPORT_LB text a bitRefer to sockets rather than processes, since one can have multiplesockets in a load-balancing group within the same process.MFC after:	1 weekSponsored by:	Modirum MDPaySponsored by:	Klara, Inc.

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 02 Nov 2022 17:01:59 +0000</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7045b160 - socket: Implement SO_RERROR</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#7045b160</link>
        <description>socket: Implement SO_RERRORSO_RERROR indicates that receive buffer overflows should be handled aserrors. Historically receive buffer overflows have been ignored andprograms could not tell if they missed messages or messages had beentruncated because of overflows. Since programs historically do notexpect to get receive overflow errors, this behavior is not thedefault.This is really really important for programs that use route(4) to keepin sync with the system. If we loose a message then we need to reloadthe full system state, otherwise the behaviour from that point isundefined and can lead to chasing bogus bug reports.Reviewed by:	philip (network), kbowling (transport), gbe (manpages)MFC after:	2 weeksDifferential Revision:	https://reviews.freebsd.org/D26652

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 28 Jul 2021 15:46:59 +0000</pubDate>
        <dc:creator>Roy Marples &lt;roy@marples.name&gt;</dc:creator>
    </item>
<item>
        <title>924d1c9a - Revert &quot;SO_RERROR indicates that receive buffer overflows should be handled as errors.&quot;</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#924d1c9a</link>
        <description>Revert &quot;SO_RERROR indicates that receive buffer overflows should be handled as errors.&quot;Wrong version of the change was pushed inadvertenly.This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Mon, 08 Feb 2021 22:30:39 +0000</pubDate>
        <dc:creator>Alexander V. Chernikov &lt;melifaro@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>4a01b854 - SO_RERROR indicates that receive buffer overflows should be handled as errors.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#4a01b854</link>
        <description>SO_RERROR indicates that receive buffer overflows should be handled as errors.Historically receive buffer overflows have been ignored and programscould not tell if they missed messages or messages had been truncatedbecause of overflows. Since programs historically do not expect to getreceive overflow errors, this behavior is not the default.This is really really important for programs that use route(4) to keep in syncwith the system. If we loose a message then we need to reload the full systemstate, otherwise the behaviour from that point is undefined and can leadto chasing bogus bug reports.

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Sun, 07 Feb 2021 17:21:18 +0000</pubDate>
        <dc:creator>Alexander V. Chernikov &lt;melifaro@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>3d265fce - Fix a few mandoc issues</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#3d265fce</link>
        <description>Fix a few mandoc issues- skipping paragraph macro: Pp after Sh- sections out of conventional order: Sh EXAMPLES- whitespace at end of input line- normalizing date format

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Fri, 09 Oct 2020 19:12:44 +0000</pubDate>
        <dc:creator>Gordon Bergling &lt;gbe@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>ae84ff9c - Document SO_NO_OFFLOADS and SO_NO_DDP.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#ae84ff9c</link>
        <description>Document SO_NO_OFFLOADS and SO_NO_DDP.Reviewed by:	bcr, npMFC after:	1 weekSponsored by:	Chelsio CommunicationsDifferential Revision:	https://reviews.freebsd.org/D25043

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 03 Jun 2020 18:59:31 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>8d910a42 - getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliable</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#8d910a42</link>
        <description>getsockopt.2: clarify that SO_TIMESTAMP is not 100% reliableWhen SO_TIMESTAMP is set, the kernel will attempt to attach a timestamp asancillary data to each IP datagram that is received on the socket. However,it may fail, for example due to insufficient memory. In that case thepacket will still be received but not timestamp will be attached.Reviewed by:	kibMFC after:	3 daysDifferential Revision:	https://reviews.freebsd.org/D21607

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 11 Sep 2019 19:48:32 +0000</pubDate>
        <dc:creator>Alan Somers &lt;asomers@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>78c8b947 - Document the ENOBUFS errno in setsockopt(2).</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#78c8b947</link>
        <description>Document the ENOBUFS errno in setsockopt(2).In particular, it is the case if SO_SNDBUF/SO_RCVBUF would exceed sb_max_adj.PR:		200649MFC after:	1 week

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Sat, 09 Feb 2019 21:33:32 +0000</pubDate>
        <dc:creator>Sergey Kandaurov &lt;pluknet@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>6b01d4d4 - Add SOL_SOCKET level socket option with name SO_DOMAIN to get</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#6b01d4d4</link>
        <description>Add SOL_SOCKET level socket option with name SO_DOMAIN to getthe domain of a socket.This is helpful when testing and Solaris and Linux have the samesocket option using the same name.Reviewed by:		bcr@, rrs@Sponsored by:		Netflix, Inc.Differential Revision:	https://reviews.freebsd.org/D16791

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Tue, 21 Aug 2018 14:04:30 +0000</pubDate>
        <dc:creator>Michael Tuexen &lt;tuexen@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>1a43cff9 - Load balance sockets with new SO_REUSEPORT_LB option.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#1a43cff9</link>
        <description>Load balance sockets with new SO_REUSEPORT_LB option.This patch adds a new socket option, SO_REUSEPORT_LB, which allow multipleprograms or threads to bind to the same port and incoming connections will beload balanced using a hash function.Most of the code was copied from a similar patch for DragonflyBSD.However, in DragonflyBSD, load balancing is a global on/off setting and can notbe set per socket. This patch allows for simultaneous use of both the currentSO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system.Required changes to structures:Globally change so_options from 16 to 32 bit value to allow for more options.Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets.Limitations:As DragonflyBSD, a load balance group is limited to 256 pcbs (256 programs orthreads sharing the same socket).This is a substantially different contribution as compared to its originalincarnation at svn r332894 and reverted at svn r332967.  Thanks to rwatson@for the substantive feedback that is included in this commit.Submitted by:	Johannes Lundberg &lt;johalun0@gmail.com&gt;Obtained from:	DragonflyBSDRelnotes:	YesSponsored by:	Limelight NetworksDifferential Revision:	https://reviews.freebsd.org/D11003

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 06 Jun 2018 15:45:57 +0000</pubDate>
        <dc:creator>Sean Bruno &lt;sbruno@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>9891578a - Plug a memory leak and potential NULL-pointer dereference introduced in r331214.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#9891578a</link>
        <description>Plug a memory leak and potential NULL-pointer dereference introduced in r331214.Each TCP connection that uses the system default cc_newreno(4) congestioncontrol algorithm module leaks a &quot;struct newreno&quot; (8 bytes of memory) atconnection initialisation time. The NULL-pointer dereference is only germanewhen using the ABE feature, which is disabled by default.While at it:- Defer the allocation of memory until it is actually needed given that ABE is  optional and disabled by default.- Document the ENOMEM errno in getsockopt(2)/setsockopt(2).- Document ENOMEM and ENOBUFS in tcp(4) as being synonymous given that they are  used interchangeably throughout the code.- Fix a few other nits also accidentally omitted from the original patch.Reported by:	Harsh Jain on freebsd-net@Tested by:	tjh@Differential Revision:	https://reviews.freebsd.org/D15358

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Thu, 17 May 2018 02:46:27 +0000</pubDate>
        <dc:creator>Lawrence Stewart &lt;lstewart@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>703e1e3d - Fix minor formatting issue.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#703e1e3d</link>
        <description>Fix minor formatting issue.

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Sun, 13 Aug 2017 15:15:40 +0000</pubDate>
        <dc:creator>Michael Tuexen &lt;tuexen@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>fbbd9655 - Renumber copyright clause 4</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#fbbd9655</link>
        <description>Renumber copyright clause 4Renumber cluase 4 to 3, per what everybody else did when BSD grantedthem permission to remove clause 3. My insistance on keeping the samenumbering for legal reasons is too pedantic, so give up on that point.Submitted by:	Jan Schaumann &lt;jschauma@stevens.edu&gt;Pull Request:	https://github.com/freebsd/freebsd/pull/96

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Tue, 28 Feb 2017 23:42:47 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>dd1badb4 - Improve wording around SO_TS_CLOCK documentation.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#dd1badb4</link>
        <description>Improve wording around SO_TS_CLOCK documentation.Submitted by:	wblockDifferential Revision:	https://reviews.freebsd.org/D9171

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Fri, 20 Jan 2017 18:37:14 +0000</pubDate>
        <dc:creator>Maxim Sobolev &lt;sobomax@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>f3e7afe2 - Implement kernel support for hardware rate limited sockets.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#f3e7afe2</link>
        <description>Implement kernel support for hardware rate limited sockets.- Add RATELIMIT kernel configuration keyword which must be set toenable the new functionality.- Add support for hardware driven, Receive Side Scaling, RSS aware, ratelimited sendqueues and expose the functionality through the alreadyestablished SO_MAX_PACING_RATE setsockopt(). The API support rates inthe range from 1 to 4Gbytes/s which are suitable for regular TCP andUDP streams. The setsockopt(2) manual page has been updated.- Add rate limit function callback API to &quot;struct ifnet&quot; which supportsthe following operations: if_snd_tag_alloc(), if_snd_tag_modify(),if_snd_tag_query() and if_snd_tag_free().- Add support to ifconfig to view, set and clear the IFCAP_TXRTLMTflag, which tells if a network driver supports rate limiting or not.- This patch also adds support for rate limiting through VLAN and LAGGintermediate network devices.- How rate limiting works:1) The userspace application calls setsockopt() after accepting ormaking a new connection to set the rate which is then stored in thesocket structure in the kernel. Later on when packets are transmitteda check is made in the transmit path for rate changes. A rate changeimplies a non-blocking ifp-&gt;if_snd_tag_alloc() call will be made to thedestination network interface, which then sets up a custom sendqueuewith the given rate limitation parameter. A &quot;struct m_snd_tag&quot; pointer isreturned which serves as a &quot;snd_tag&quot; hint in the m_pkthdr for thesubsequently transmitted mbufs.2) When the network driver sees the &quot;m-&gt;m_pkthdr.snd_tag&quot; differentfrom NULL, it will move the packets into a designated rate limited sendqueuegiven by the snd_tag pointer. It is up to the individual drivers how the ratelimited traffic will be rate limited.3) Route changes are detected by the NIC drivers in the ifp-&gt;if_transmit()routine when the ifnet pointer in the incoming snd_tag mismatches theone of the network interface. The network adapter frees the mbuf andreturns EAGAIN which causes the ip_output() to release and clear the sendtag. Upon next ip_output() a new &quot;snd_tag&quot; will be tried allocated.4) When the PCB is detached the custom sendqueue will be released by anon-blocking ifp-&gt;if_snd_tag_free() call to the currently bound networkinterface.Reviewed by:		wblock (manpages), adrian, gallatin, scottl (network)Differential Revision:	https://reviews.freebsd.org/D3687Sponsored by:		Mellanox TechnologiesMFC after:		3 months

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Wed, 18 Jan 2017 13:31:17 +0000</pubDate>
        <dc:creator>Hans Petter Selasky &lt;hselasky@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>339efd75 - Add a new socket option SO_TS_CLOCK to pick from several different clock</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#339efd75</link>
        <description>Add a new socket option SO_TS_CLOCK to pick from several different clocksources to return timestamps when SO_TIMESTAMP is enabled. Two additionalclock sources are:o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME);o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC).In addition to this, this option provides unified interface to get bintime(equivalent of using SO_BINTIME), except it also supported with IPv6 whereSO_BINTIME has never been supported. The long term plan is to depreciateSO_BINTIME and move everything to using SO_TS_CLOCK.Idea for this enhancement has been briefly discussed on the Net sessionduring dev summit in Ottawa last June and the general input was positive.This change is believed to benefit network benchmarks/profiling as wellas other scenarios where precise time of arrival measurement is necessary.There are two regression test cases as part of this commit: one extends unixdomain test code (unix_cmsg) to test new SCM_XXX types and another oneimplementis totally new test case which exchanges UDP packets between twoprocesses using both conventional methods (i.e. calling clock_gettime(2)before recv(2) and after send(2)), as well as using setsockopt()+recv() inreceive path. The resulting delays are checked for sanity for all supportedclock types.Reviewed by:    adrian, gnnDifferential Revision:  https://reviews.freebsd.org/D9171

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Mon, 16 Jan 2017 17:46:38 +0000</pubDate>
        <dc:creator>Maxim Sobolev &lt;sobomax@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>599c4124 - Correct the returned message lengths for timeval and bintime control</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#599c4124</link>
        <description>Correct the returned message lengths for timeval and bintime controlmessages (SO_BINTIME, SO_TIMEVAL).Obtained from:	phk

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Fri, 05 Apr 2013 18:09:43 +0000</pubDate>
        <dc:creator>George V. Neville-Neil &lt;gnn@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>1d2ea431 - Document SO_PROTOCOL socket option.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/lib/libc/sys/getsockopt.2#1d2ea431</link>
        <description>Document SO_PROTOCOL socket option.Discussed with:	bzReviewed by:	glebiusMFC after:	2 weeks

            List of files:
            /freebsd-14.2/lib/libc/sys/getsockopt.2</description>
        <pubDate>Sun, 26 Feb 2012 13:57:24 +0000</pubDate>
        <dc:creator>Konstantin Belousov &lt;kib@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
