From nobody Wed Jun 17 15:05:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ggRxB4pFbz6hVB2 for ; Wed, 17 Jun 2026 15:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ggRxB40kqz43t2 for ; Wed, 17 Jun 2026 15:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781708718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMkPmOVrcHW/5/ejoP/CySmcaO+6KvO50orgQwVNve4=; b=Mrh+K6QbDkV22memreH+R23zWmY0OHGSDI/mA4UWtDBf93Buw5oykL66EI3HtC6cE4NAsh MdT7CsL/YBMM5HKRk2J03be1hHNHYsK8DpalhK+97EHlWsTjYIhA4hxCQhlOZUV/X5r24d 3pxHFs+4U0JR/Ei3ONKrMU4l3vsTNzIRr21RVEwGIdqxqxpefQd4fafHWj/egZBgfDhye6 Mao9we/0nB99naakD0QXuW6dsIWoQ6vJnbKexQBF2TqsNLj4V8aaZt3pGb8C7XM65wPLjD kPSyzNFAQfIF0a9fSdmqmjdjhDLqmnMhUpNZVchPJIMH7VLERHA3cFo7coLKWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781708718; a=rsa-sha256; cv=none; b=WaqR3b4VitbuEq75i9b3Kn2ugwMmooKymtmNn1QN9wj2JKgDFqpg7Pg40MafFenlPEX8ha qiQvgP5EczKZYonylqBUo2xkqWgftXrJFavg0VUPl3A0mPaKHlkU5wsxtDEy9f2aDI8LV9 AHkXxB5gsFkAVIRgCTov5kEFtDkWEKTXqKZcvkBNXtMd3sLFzLyZ6fS2xrKO9/Hsmuj1O4 pFNJvPxCxrrBP+vnjuEw/6E19+Nbj8xUL9HHvXZuOM5J0fTUrQuASqkW+6/Kr4QUoLtO8C 3oOtZLx7r7npH8+r+0rQU3irzRXnDm4N24y+ePfFY1/a+0m2o+gKq9Ou9QJ45w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781708718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMkPmOVrcHW/5/ejoP/CySmcaO+6KvO50orgQwVNve4=; b=CpWNewcOElzHEfoR+RgQO5ZzY59tP59KEVVp6qBApip8KjWb6CH0qpzm0FE2JUFgaiF1x6 aN8d+ASslQIyMGNXL7Y++wZurvSUci/CeTLHUZjyaKc23p9FWUW3J8/TBIiG5obu1R83wc W/FeF6dBchMbLJk90VfjikwEPUCmfiVojJ23lDEmOjAIfxQcmmYArK3Se/BDRTSp6TIooA iROWU4vPCmri+5PZmNE7CPaBrsddC6q3tYfqEe8IPRPnTVDjvUWWjQbo7Y0F4kV0h1McWQ YIg5HUJYjpUd/5IKX6Uqi1oFc9e72GYyn75vbj7TjK5NbvXDWY3i1p9m/20ZIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ggRxB3LcYz1qq for ; Wed, 17 Jun 2026 15:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f164 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Jun 2026 15:05:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 52c0d52b91e3 - main - socket: Tag all socket option comments consistently List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52c0d52b91e34f9190c9ba8fab7b6bc463bc4cbb Auto-Submitted: auto-generated Date: Wed, 17 Jun 2026 15:05:18 +0000 Message-Id: <6a32b7ae.3f164.49572fd9@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=52c0d52b91e34f9190c9ba8fab7b6bc463bc4cbb commit 52c0d52b91e34f9190c9ba8fab7b6bc463bc4cbb Author: Warner Losh AuthorDate: 2026-06-17 13:39:05 +0000 Commit: Warner Losh CommitDate: 2026-06-17 15:03:21 +0000 socket: Tag all socket option comments consistently For all the socket options that have a fixed type, add the type of the socket option arg to the comment. Most of them already had this, but a few did not. The ones that don't have a tag use a variable length data structure of some kind, and are beyond the scope of this commit. Slightly expand the syntax to allow a comma separated list for those sockopts that have multiple fixed-length versions. Sponsored by: Netflix Reviewed by: pouria, peter.lei_ieee.org, tuexen Differential Revision: https://reviews.freebsd.org/D57545 --- sys/netinet/in.h | 40 ++++----- sys/netinet/tcp.h | 240 ++++++++++++++++++++++++++--------------------------- sys/netinet/udp.h | 2 +- sys/netinet6/in6.h | 8 +- sys/sys/socket.h | 72 ++++++++-------- sys/sys/un.h | 4 +- 6 files changed, 183 insertions(+), 183 deletions(-) diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 0cd55bd1e409..fc30228422f3 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -444,25 +444,25 @@ VNET_DECLARE(uint32_t, in_loopback_mask); #define IP_RETOPTS 8 /* ip_opts; set/get IP options */ #define IP_MULTICAST_IF 9 /* struct in_addr *or* struct ip_mreqn; * set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */ +#define IP_MULTICAST_TTL 10 /* u_char,u_int; set/get IP multicast ttl */ +#define IP_MULTICAST_LOOP 11 /* u_char,u_int; set/get IP multicast loopback */ #define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ #define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ -#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */ -#define IP_RSVP_ON 15 /* enable RSVP in kernel */ -#define IP_RSVP_OFF 16 /* disable RSVP in kernel */ -#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */ -#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */ +#define IP_MULTICAST_VIF 14 /* int; set/get IP mcast virt. iface */ +#define IP_RSVP_ON 15 /* int; enable RSVP in kernel */ +#define IP_RSVP_OFF 16 /* int; disable RSVP in kernel */ +#define IP_RSVP_VIF_ON 17 /* int; set RSVP per-vif socket */ +#define IP_RSVP_VIF_OFF 18 /* int; unset RSVP per-vif socket */ #define IP_PORTRANGE 19 /* int; range to choose for unspec port */ #define IP_RECVIF 20 /* bool; receive reception if w/dgram */ /* for IPSEC */ #define IP_IPSEC_POLICY 21 /* int; set/get security policy */ /* unused; was IP_FAITH */ -#define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ -#define IP_BINDANY 24 /* bool: allow bind to any address */ +#define IP_ONESBCAST 23 /* bool; send all-ones broadcast */ +#define IP_BINDANY 24 /* bool; allow bind to any address */ /* unused; was IP_BIND_MULTI */ /* unused; was IP_RSS_LISTEN_BUCKET */ -#define IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram */ +#define IP_ORIGDSTADDR 27 /* bool; receive IP dst addr/port w/dgram */ #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR /* @@ -497,18 +497,18 @@ VNET_DECLARE(uint32_t, in_loopback_mask); #define IP_DUMMYNET_GET 64 /* get entire dummynet pipes */ #define IP_RECVTTL 65 /* bool; receive IP TTL w/dgram */ -#define IP_MINTTL 66 /* minimum TTL for packet or drop */ -#define IP_DONTFRAG 67 /* don't fragment packet */ +#define IP_MINTTL 66 /* int; minimum TTL for packet or drop */ +#define IP_DONTFRAG 67 /* int; don't fragment packet */ #define IP_RECVTOS 68 /* bool; receive IP TOS w/dgram */ /* IPv4 Source Filter Multicast API [RFC3678] */ -#define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ -#define IP_DROP_SOURCE_MEMBERSHIP 71 /* drop a single source */ -#define IP_BLOCK_SOURCE 72 /* block a source */ -#define IP_UNBLOCK_SOURCE 73 /* unblock a source */ +#define IP_ADD_SOURCE_MEMBERSHIP 70 /* ip_mreq_source; join a source-specific group */ +#define IP_DROP_SOURCE_MEMBERSHIP 71 /* ip_mreq_source; drop a single source */ +#define IP_BLOCK_SOURCE 72 /* ip_mreq_source; block a source */ +#define IP_UNBLOCK_SOURCE 73 /* ip_mreq_source; unblock a source */ /* The following option is private; do not use it from user applications. */ -#define IP_MSFILTER 74 /* set/get filter list */ +#define IP_MSFILTER 74 /* __msfilterreq; set/get filter list */ /* The following option deals with the 802.1Q Ethernet Priority Code Point */ #define IP_VLAN_PCP 75 /* int; set/get PCP used for packet, */ @@ -523,9 +523,9 @@ VNET_DECLARE(uint32_t, in_loopback_mask); #define MCAST_UNBLOCK_SOURCE 85 /* unblock a source */ /* Flow and RSS definitions */ -#define IP_FLOWID 90 /* get flow id for the given socket/inp */ -#define IP_FLOWTYPE 91 /* get flow type (M_HASHTYPE) */ -#define IP_RSSBUCKETID 92 /* get RSS flowid -> bucket mapping */ +#define IP_FLOWID 90 /* int; get flow id for the given socket/inp */ +#define IP_FLOWTYPE 91 /* int; get flow type (M_HASHTYPE) */ +#define IP_RSSBUCKETID 92 /* int; get RSS flowid -> bucket mapping */ #define IP_RECVFLOWID 93 /* bool; receive IP flowid/flowtype w/ datagram */ #define IP_RECVRSSBUCKETID 94 /* bool; receive IP RSS bucket id w/ datagram */ diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index cab7d1c5e726..14dc971010d8 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -180,169 +180,169 @@ __tcp_set_flags(struct tcphdr *th, uint16_t flags) * values and are not masked together. Some values appear to be * bitmasks for historical reasons. */ -#define TCP_NODELAY 1 /* don't delay send to coalesce packets */ +#define TCP_NODELAY 1 /* int; don't delay send to coalesce packets */ #if __BSD_VISIBLE -#define TCP_MAXSEG 2 /* set maximum segment size */ -#define TCP_NOPUSH 4 /* don't push last block of write */ -#define TCP_NOOPT 8 /* don't use TCP options */ -#define TCP_MD5SIG 16 /* use MD5 digests (RFC2385) */ -#define TCP_INFO 32 /* retrieve tcp_info structure */ +#define TCP_MAXSEG 2 /* int; set maximum segment size */ +#define TCP_NOPUSH 4 /* int; don't push last block of write */ +#define TCP_NOOPT 8 /* int; don't use TCP options */ +#define TCP_MD5SIG 16 /* int; use MD5 digests (RFC2385) */ +#define TCP_INFO 32 /* struct tcp_info; retrieve tcp_info structure */ #define TCP_STATS 33 /* retrieve stats blob structure */ -#define TCP_LOG 34 /* configure event logging for connection */ +#define TCP_LOG 34 /* int; configure event logging for connection */ #define TCP_LOGBUF 35 /* retrieve event log for connection */ #define TCP_LOGID 36 /* configure log ID to correlate connections */ #define TCP_LOGDUMP 37 /* dump connection log events to device */ #define TCP_LOGDUMPID 38 /* dump events from connections with same ID to device */ #define TCP_TXTLS_ENABLE 39 /* TLS framing and encryption for transmit */ -#define TCP_TXTLS_MODE 40 /* Transmit TLS mode */ +#define TCP_TXTLS_MODE 40 /* u_int; Transmit TLS mode */ #define TCP_RXTLS_ENABLE 41 /* TLS framing and encryption for receive */ -#define TCP_RXTLS_MODE 42 /* Receive TLS mode */ -#define TCP_IWND_NB 43 /* Override initial window (units: bytes) */ -#define TCP_IWND_NSEG 44 /* Override initial window (units: MSS segs) */ +#define TCP_RXTLS_MODE 42 /* int; Receive TLS mode */ +#define TCP_IWND_NB 43 /* int; Override initial window (units: bytes) */ +#define TCP_IWND_NSEG 44 /* int; Override initial window (units: MSS segs) */ #ifdef _KERNEL -#define TCP_USE_DDP 45 /* Use direct data placement for so_rcvbuf */ +#define TCP_USE_DDP 45 /* int; Use direct data placement for so_rcvbuf */ #endif -#define TCP_LOGID_CNT 46 /* get number of connections with the same ID */ +#define TCP_LOGID_CNT 46 /* int; get number of connections with the same ID */ #define TCP_LOG_TAG 47 /* configure tag for grouping logs */ -#define TCP_USER_LOG 48 /* userspace log event */ +#define TCP_USER_LOG 48 /* int; userspace log event */ #define TCP_CONGESTION 64 /* get/set congestion control algorithm */ #define TCP_CCALGOOPT 65 /* get/set cc algorithm specific options */ -#define TCP_MAXUNACKTIME 68 /* maximum time without making progress (sec) */ +#define TCP_MAXUNACKTIME 68 /* u_int; maximum time without making progress (sec) */ /* unused 69 */ -#define TCP_IDLE_REDUCE 70 /* Reduce cwnd on idle input */ -#define TCP_REMOTE_UDP_ENCAPS_PORT 71 /* Enable TCP over UDP tunneling via the specified port */ -#define TCP_DELACK 72 /* socket option for delayed ack */ -#define TCP_FIN_IS_RST 73 /* A fin from the peer is treated has a RST */ -#define TCP_LOG_LIMIT 74 /* Limit to number of records in tcp-log */ -#define TCP_SHARED_CWND_ALLOWED 75 /* Use of a shared cwnd is allowed */ -#define TCP_PROC_ACCOUNTING 76 /* Do accounting on tcp cpu usage and counts */ -#define TCP_USE_CMP_ACKS 77 /* The transport can handle the Compressed mbuf acks */ -#define TCP_PERF_INFO 78 /* retrieve accounting counters */ -#define TCP_KEEPINIT 128 /* N, time to establish connection */ -#define TCP_KEEPIDLE 256 /* L,N,X start keeplives after this period */ -#define TCP_KEEPINTVL 512 /* L,N interval between keepalives */ -#define TCP_KEEPCNT 1024 /* L,N number of keepalives before close */ -#define TCP_FASTOPEN 1025 /* enable TFO / was created via TFO */ +#define TCP_IDLE_REDUCE 70 /* int; Reduce cwnd on idle input */ +#define TCP_REMOTE_UDP_ENCAPS_PORT 71 /* int; Enable TCP over UDP tunneling via the specified port */ +#define TCP_DELACK 72 /* int; socket option for delayed ack */ +#define TCP_FIN_IS_RST 73 /* int; A fin from the peer is treated has a RST */ +#define TCP_LOG_LIMIT 74 /* int; Limit to number of records in tcp-log */ +#define TCP_SHARED_CWND_ALLOWED 75 /* int; Use of a shared cwnd is allowed */ +#define TCP_PROC_ACCOUNTING 76 /* int; Do accounting on tcp cpu usage and counts */ +#define TCP_USE_CMP_ACKS 77 /* int; The transport can handle the Compressed mbuf acks */ +#define TCP_PERF_INFO 78 /* struct tcp_perf_info; retrieve accounting counters */ +#define TCP_KEEPINIT 128 /* u_int; N, time to establish connection */ +#define TCP_KEEPIDLE 256 /* u_int; L,N,X start keeplives after this period */ +#define TCP_KEEPINTVL 512 /* u_int; L,N interval between keepalives */ +#define TCP_KEEPCNT 1024 /* u_int; L,N number of keepalives before close */ +#define TCP_FASTOPEN 1025 /* int,struct tcp_fastopen; enable TFO / was created via TFO */ /* unused 2048 was TCP_PCAP_OUT */ /* unused 4096 was TCP_PCAP_IN */ -#define TCP_FUNCTION_BLK 8192 /* Set the tcp function pointers to the specified stack */ -#define TCP_FUNCTION_ALIAS 8193 /* Get the current tcp function pointer name alias */ +#define TCP_FUNCTION_BLK 8192 /* struct tcp_function_set; Set the tcp function pointers to the specified stack */ +#define TCP_FUNCTION_ALIAS 8193 /* struct tcp_function_set; Get the current tcp function pointer name alias */ /* Options for Rack and BBR */ -#define TCP_REUSPORT_LB_NUMA 1026 /* set listen socket numa domain */ -#define TCP_RACK_MBUF_QUEUE 1050 /* Do we allow mbuf queuing if supported */ +#define TCP_REUSPORT_LB_NUMA 1026 /* int; set listen socket numa domain */ +#define TCP_RACK_MBUF_QUEUE 1050 /* int; Do we allow mbuf queuing if supported */ /* unused 1051 */ -#define TCP_RACK_TLP_REDUCE 1052 /* RACK TLP cwnd reduction (bool) */ +#define TCP_RACK_TLP_REDUCE 1052 /* int; RACK TLP cwnd reduction */ /* unused 1053 */ -#define TCP_RACK_PACE_MAX_SEG 1054 /* Max TSO size we will send */ -#define TCP_RACK_PACE_ALWAYS 1055 /* Use the always pace method */ +#define TCP_RACK_PACE_MAX_SEG 1054 /* int; Max TSO size we will send */ +#define TCP_RACK_PACE_ALWAYS 1055 /* int; Use the always pace method */ /* unused 1056 */ -#define TCP_RACK_PRR_SENDALOT 1057 /* Allow PRR to send more than one seg */ -#define TCP_RACK_MIN_TO 1058 /* Minimum time between rack t-o's in ms */ +#define TCP_RACK_PRR_SENDALOT 1057 /* int; Allow PRR to send more than one seg */ +#define TCP_RACK_MIN_TO 1058 /* int; Minimum time between rack t-o's in ms */ /* unused 1059 */ -#define TCP_RACK_EARLY_SEG 1060 /* If early recovery max segments */ -#define TCP_RACK_REORD_THRESH 1061 /* RACK reorder threshold (shift amount) */ -#define TCP_RACK_REORD_FADE 1062 /* Does reordering fade after ms time */ -#define TCP_RACK_TLP_THRESH 1063 /* RACK TLP theshold i.e. srtt+(srtt/N) */ -#define TCP_RACK_PKT_DELAY 1064 /* RACK added ms i.e. rack-rtt + reord + N */ +#define TCP_RACK_EARLY_SEG 1060 /* int; If early recovery max segments */ +#define TCP_RACK_REORD_THRESH 1061 /* int; RACK reorder threshold (shift amount) */ +#define TCP_RACK_REORD_FADE 1062 /* int; Does reordering fade after ms time */ +#define TCP_RACK_TLP_THRESH 1063 /* int; RACK TLP theshold i.e. srtt+(srtt/N) */ +#define TCP_RACK_PKT_DELAY 1064 /* int; RACK added ms i.e. rack-rtt + reord + N */ /* unused 1065 */ /* unused 1066 */ -#define TCP_BBR_IWINTSO 1067 /* Initial TSO window for BBRs first sends */ +#define TCP_BBR_IWINTSO 1067 /* int; Initial TSO window for BBRs first sends */ /* unused 1068 */ -#define TCP_BBR_STARTUP_PG 1069 /* Startup pacing gain */ -#define TCP_BBR_DRAIN_PG 1070 /* Drain pacing gain */ +#define TCP_BBR_STARTUP_PG 1069 /* int; Startup pacing gain */ +#define TCP_BBR_DRAIN_PG 1070 /* int; Drain pacing gain */ /* unused 1071 */ -#define TCP_BBR_PROBE_RTT_INT 1072 /* How long in useconds between probe-rtt */ +#define TCP_BBR_PROBE_RTT_INT 1072 /* int; How long in useconds between probe-rtt */ /* unused 1073 */ -#define TCP_BBR_STARTUP_LOSS_EXIT 1074 /* Do we exit a loss during startup if not 20% incr */ +#define TCP_BBR_STARTUP_LOSS_EXIT 1074 /* int; Do we exit a loss during startup if not 20% incr */ /* unused 1075 */ -#define TCP_BBR_TSLIMITS 1076 /* Do we use experimental Timestamp limiting for our algo */ -#define TCP_BBR_PACE_OH 1077 /* pacing overhead setting */ +#define TCP_BBR_TSLIMITS 1076 /* int; Do we use experimental Timestamp limiting for our algo */ +#define TCP_BBR_PACE_OH 1077 /* int; pacing overhead setting */ /* unused 1078 */ -#define TCP_BBR_USEDEL_RATE 1079 /* Enable use of delivery rate for loss recovery */ -#define TCP_BBR_MIN_RTO 1080 /* Min RTO in milliseconds */ -#define TCP_BBR_MAX_RTO 1081 /* Max RTO in milliseconds */ +#define TCP_BBR_USEDEL_RATE 1079 /* int; Enable use of delivery rate for loss recovery */ +#define TCP_BBR_MIN_RTO 1080 /* int; Min RTO in milliseconds */ +#define TCP_BBR_MAX_RTO 1081 /* int; Max RTO in milliseconds */ /* unused 1082 */ -#define TCP_BBR_ALGORITHM 1083 /* What measurement algo does BBR use netflix=0, google=1 */ +#define TCP_BBR_ALGORITHM 1083 /* int; What measurement algo does BBR use netflix=0, google=1 */ /* unused 1084 */ /* unused 1085 */ -#define TCP_BBR_PACE_PER_SEC 1086 -#define TCP_BBR_PACE_DEL_TAR 1087 -#define TCP_BBR_PACE_SEG_MAX 1088 -#define TCP_BBR_PACE_SEG_MIN 1089 -#define TCP_BBR_PACE_CROSS 1090 +#define TCP_BBR_PACE_PER_SEC 1086 /* int; */ +#define TCP_BBR_PACE_DEL_TAR 1087 /* int; */ +#define TCP_BBR_PACE_SEG_MAX 1088 /* int; */ +#define TCP_BBR_PACE_SEG_MIN 1089 /* int; */ +#define TCP_BBR_PACE_CROSS 1090 /* int; */ /* unused 1091 */ /* unused 1092 */ /* unused 1093 */ /* unused 1094 */ -#define TCP_RACK_TLP_USE 1095 -#define TCP_BBR_TMR_PACE_OH 1096 /* ??? */ -#define TCP_RACK_DO_DETECTION 1097 /* Recycle of extra gain for rack, attack detection */ -#define TCP_BBR_RACK_RTT_USE 1098 /* what RTT should we use 0, 1, or 2? */ -#define TCP_BBR_RETRAN_WTSO 1099 -#define TCP_DATA_AFTER_CLOSE 1100 -#define TCP_BBR_PROBE_RTT_GAIN 1101 -#define TCP_BBR_PROBE_RTT_LEN 1102 -#define TCP_BBR_SEND_IWND_IN_TSO 1103 /* Do we burst out whole iwin size chunks at start? */ -#define TCP_BBR_USE_RACK_RR 1104 /* Do we use the rack rapid recovery for pacing rxt's */ +#define TCP_RACK_TLP_USE 1095 /* int; */ +#define TCP_BBR_TMR_PACE_OH 1096 /* int; */ +#define TCP_RACK_DO_DETECTION 1097 /* int; Recycle of extra gain for rack, attack detection */ +#define TCP_BBR_RACK_RTT_USE 1098 /* int; what RTT should we use 0, 1, or 2? */ +#define TCP_BBR_RETRAN_WTSO 1099 /* int; */ +#define TCP_DATA_AFTER_CLOSE 1100 /* int; */ +#define TCP_BBR_PROBE_RTT_GAIN 1101 /* int; */ +#define TCP_BBR_PROBE_RTT_LEN 1102 /* int; */ +#define TCP_BBR_SEND_IWND_IN_TSO 1103 /* int; Do we burst out whole iwin size chunks at start? */ +#define TCP_BBR_USE_RACK_RR 1104 /* int; Do we use the rack rapid recovery for pacing rxt's */ #define TCP_BBR_USE_RACK_CHEAT TCP_BBR_USE_RACK_RR /* Compat. */ -#define TCP_BBR_HDWR_PACE 1105 /* Enable/disable hardware pacing */ -#define TCP_BBR_UTTER_MAX_TSO 1106 /* Do we enforce an utter max TSO size */ -#define TCP_BBR_EXTRA_STATE 1107 /* Special exit-persist catch up */ -#define TCP_BBR_FLOOR_MIN_TSO 1108 /* The min tso size */ -#define TCP_BBR_MIN_TOPACEOUT 1109 /* Do we suspend pacing until */ -#define TCP_BBR_TSTMP_RAISES 1110 /* Can a timestamp measurement raise the b/w */ -#define TCP_BBR_POLICER_DETECT 1111 /* Turn on/off google mode policer detection */ -#define TCP_BBR_RACK_INIT_RATE 1112 /* Set an initial pacing rate for when we have no b/w in kbits per sec */ -#define TCP_RACK_RR_CONF 1113 /* Rack rapid recovery configuration control*/ -#define TCP_RACK_GP_INCREASE_CA 1114 /* GP increase for Congestion Avoidance */ -#define TCP_RACK_GP_INCREASE_SS 1115 /* GP increase for Slow Start */ -#define TCP_RACK_GP_INCREASE_REC 1116 /* GP increase for Recovery */ -#define TCP_RACK_FORCE_MSEG 1117 /* Override to use the user set max-seg value */ -#define TCP_RACK_PACE_RATE_CA 1118 /* Pacing rate for Congestion Avoidance */ -#define TCP_RACK_PACE_RATE_SS 1119 /* Pacing rate for Slow Start */ -#define TCP_RACK_PACE_RATE_REC 1120 /* Pacing rate for Recovery */ -#define TCP_NO_PRR 1122 /* If pacing, don't use prr */ -#define TCP_RACK_NONRXT_CFG_RATE 1123 /* In recovery does a non-rxt use the cfg rate */ -#define TCP_SHARED_CWND_ENABLE 1124 /* Use a shared cwnd if allowed */ -#define TCP_TIMELY_DYN_ADJ 1125 /* Do we attempt dynamic multipler adjustment with timely. */ -#define TCP_RACK_NO_PUSH_AT_MAX 1126 /* For timely do not push if we are over max rtt */ -#define TCP_RACK_PACE_TO_FILL 1127 /* If we are not in recovery, always pace to fill the cwnd in 1 RTT */ -#define TCP_SHARED_CWND_TIME_LIMIT 1128 /* we should limit to low time values the scwnd life */ -#define TCP_RACK_PROFILE 1129 /* Select a profile that sets multiple options */ -#define TCP_HDWR_RATE_CAP 1130 /* Allow hardware rates to cap pacing rate */ -#define TCP_PACING_RATE_CAP 1131 /* Highest rate allowed in pacing in bytes per second (uint64_t) */ -#define TCP_HDWR_UP_ONLY 1132 /* Allow the pacing rate to climb but not descend (with the exception of fill-cw */ -#define TCP_RACK_ABC_VAL 1133 /* Set a local ABC value different then the system default */ -#define TCP_REC_ABC_VAL 1134 /* Do we use the ABC value for recovery or the override one from sysctl */ -#define TCP_RACK_MEASURE_CNT 1135 /* How many measurements are required in GP pacing */ -#define TCP_DEFER_OPTIONS 1136 /* Defer options until the proper number of measurements occur, does not defer TCP_RACK_MEASURE_CNT */ +#define TCP_BBR_HDWR_PACE 1105 /* int; Enable/disable hardware pacing */ +#define TCP_BBR_UTTER_MAX_TSO 1106 /* int; Do we enforce an utter max TSO size */ +#define TCP_BBR_EXTRA_STATE 1107 /* int; Special exit-persist catch up */ +#define TCP_BBR_FLOOR_MIN_TSO 1108 /* int; The min tso size */ +#define TCP_BBR_MIN_TOPACEOUT 1109 /* int; Do we suspend pacing until */ +#define TCP_BBR_TSTMP_RAISES 1110 /* int; Can a timestamp measurement raise the b/w */ +#define TCP_BBR_POLICER_DETECT 1111 /* int; Turn on/off google mode policer detection */ +#define TCP_BBR_RACK_INIT_RATE 1112 /* int; Set an initial pacing rate for when we have no b/w in kbits per sec */ +#define TCP_RACK_RR_CONF 1113 /* int; Rack rapid recovery configuration control*/ +#define TCP_RACK_GP_INCREASE_CA 1114 /* int; GP increase for Congestion Avoidance */ +#define TCP_RACK_GP_INCREASE_SS 1115 /* int; GP increase for Slow Start */ +#define TCP_RACK_GP_INCREASE_REC 1116 /* int; GP increase for Recovery */ +#define TCP_RACK_FORCE_MSEG 1117 /* int; Override to use the user set max-seg value */ +#define TCP_RACK_PACE_RATE_CA 1118 /* int; Pacing rate for Congestion Avoidance */ +#define TCP_RACK_PACE_RATE_SS 1119 /* int; Pacing rate for Slow Start */ +#define TCP_RACK_PACE_RATE_REC 1120 /* int; Pacing rate for Recovery */ +#define TCP_NO_PRR 1122 /* int; If pacing, don't use prr */ +#define TCP_RACK_NONRXT_CFG_RATE 1123 /* int; In recovery does a non-rxt use the cfg rate */ +#define TCP_SHARED_CWND_ENABLE 1124 /* int; Use a shared cwnd if allowed */ +#define TCP_TIMELY_DYN_ADJ 1125 /* int; Do we attempt dynamic multipler adjustment with timely. */ +#define TCP_RACK_NO_PUSH_AT_MAX 1126 /* int; For timely do not push if we are over max rtt */ +#define TCP_RACK_PACE_TO_FILL 1127 /* int; If we are not in recovery, always pace to fill the cwnd in 1 RTT */ +#define TCP_SHARED_CWND_TIME_LIMIT 1128 /* int; we should limit to low time values the scwnd life */ +#define TCP_RACK_PROFILE 1129 /* int; Select a profile that sets multiple options */ +#define TCP_HDWR_RATE_CAP 1130 /* int; Allow hardware rates to cap pacing rate */ +#define TCP_PACING_RATE_CAP 1131 /* uint64_t; Highest rate allowed in pacing in bytes per second */ +#define TCP_HDWR_UP_ONLY 1132 /* int; Allow the pacing rate to climb but not descend (with the exception of fill-cw */ +#define TCP_RACK_ABC_VAL 1133 /* int; Set a local ABC value different then the system default */ +#define TCP_REC_ABC_VAL 1134 /* int; Do we use the ABC value for recovery or the override one from sysctl */ +#define TCP_RACK_MEASURE_CNT 1135 /* int; How many measurements are required in GP pacing */ +#define TCP_DEFER_OPTIONS 1136 /* int; Defer options until the proper number of measurements occur, does not defer TCP_RACK_MEASURE_CNT */ /* unused 1137 */ -#define TCP_RACK_PACING_BETA 1138 /* Changing the beta for pacing */ -#define TCP_RACK_PACING_BETA_ECN 1139 /* Changing the beta for ecn with pacing */ -#define TCP_RACK_TIMER_SLOP 1140 /* Set or get the timer slop used */ -#define TCP_RACK_DSACK_OPT 1141 /* How do we setup rack timer DSACK options bit 1/2 */ -#define TCP_RACK_ENABLE_HYSTART 1142 /* Do we allow hystart in the CC modules */ -#define TCP_RACK_SET_RXT_OPTIONS 1143 /* Set the bits in the retransmit options */ -#define TCP_RACK_HI_BETA 1144 /* Turn on/off high beta */ -#define TCP_RACK_SPLIT_LIMIT 1145 /* Set a split limit for split allocations */ -#define TCP_RACK_PACING_DIVISOR 1146 /* Pacing divisor given to rate-limit code for burst sizing */ -#define TCP_RACK_PACE_MIN_SEG 1147 /* Pacing min seg size rack will use */ -#define TCP_RACK_DGP_IN_REC 1148 /* Do we use full DGP in recovery? */ +#define TCP_RACK_PACING_BETA 1138 /* int; Changing the beta for pacing */ +#define TCP_RACK_PACING_BETA_ECN 1139 /* int; Changing the beta for ecn with pacing */ +#define TCP_RACK_TIMER_SLOP 1140 /* int; Set or get the timer slop used */ +#define TCP_RACK_DSACK_OPT 1141 /* int; How do we setup rack timer DSACK options bit 1/2 */ +#define TCP_RACK_ENABLE_HYSTART 1142 /* int; Do we allow hystart in the CC modules */ +#define TCP_RACK_SET_RXT_OPTIONS 1143 /* int; Set the bits in the retransmit options */ +#define TCP_RACK_HI_BETA 1144 /* int; Turn on/off high beta */ +#define TCP_RACK_SPLIT_LIMIT 1145 /* int; Set a split limit for split allocations */ +#define TCP_RACK_PACING_DIVISOR 1146 /* int; Pacing divisor given to rate-limit code for burst sizing */ +#define TCP_RACK_PACE_MIN_SEG 1147 /* int; Pacing min seg size rack will use */ +#define TCP_RACK_DGP_IN_REC 1148 /* int; Do we use full DGP in recovery? */ /* unused 1149 */ #define TCP_HYBRID_PACING 1150 /* Hybrid pacing enablement */ -#define TCP_PACING_DND 1151 /* When pacing with rr_config=3 can sacks disturb us */ -#define TCP_SS_EEXIT 1152 /* Do we do early exit from slowtart if no b/w growth */ -#define TCP_DGP_UPPER_BOUNDS 1153 /* SS and CA upper bound in percentage */ -#define TCP_NO_TIMELY 1154 /* Disable/enable Timely */ -#define TCP_HONOR_HPTS_MIN 1155 /* Do we honor hpts min to */ -#define TCP_REC_IS_DYN 1156 /* Do we allow timely to change recovery multiplier? */ -#define TCP_SIDECHAN_DIS 1157 /* Disable/enable the side-channel */ -#define TCP_FILLCW_RATE_CAP 1158 /* Set a cap for DGP's fillcw */ +#define TCP_PACING_DND 1151 /* int; When pacing with rr_config=3 can sacks disturb us */ +#define TCP_SS_EEXIT 1152 /* int; Do we do early exit from slowtart if no b/w growth */ +#define TCP_DGP_UPPER_BOUNDS 1153 /* int; SS and CA upper bound in percentage */ +#define TCP_NO_TIMELY 1154 /* int; Disable/enable Timely */ +#define TCP_HONOR_HPTS_MIN 1155 /* int; Do we honor hpts min to */ +#define TCP_REC_IS_DYN 1156 /* int; Do we allow timely to change recovery multiplier? */ +#define TCP_SIDECHAN_DIS 1157 /* int; Disable/enable the side-channel */ +#define TCP_FILLCW_RATE_CAP 1158 /* int; Set a cap for DGP's fillcw */ /* unused 1159 */ #define TCP_STACK_SPEC_INFO 1160 /* Get stack specific information (if present) */ #define RACK_CSPR_IS_FCC 1161 -#define TCP_GP_USE_LTBW 1162 /* how we use lt_bw 0=not, 1=min, 2=max */ +#define TCP_GP_USE_LTBW 1162 /* int; how we use lt_bw 0=not, 1=min, 2=max */ /* Start of reserved space for third-party user-settable options. */ diff --git a/sys/netinet/udp.h b/sys/netinet/udp.h index 010f2210b516..448f7b68ae3f 100644 --- a/sys/netinet/udp.h +++ b/sys/netinet/udp.h @@ -49,7 +49,7 @@ struct udphdr { /* * User-settable options (used with setsockopt). */ -#define UDP_ENCAP 1 +#define UDP_ENCAP 1 /* int; UDP encapsulation type */ /* Start of reserved space for third-party user-settable options. */ #define UDP_VENDOR SO_VENDOR diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 1206960357da..168bb927fb57 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -407,7 +407,7 @@ struct route_in6 { #define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ #define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ -#define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ +#define IPV6_MULTICAST_HOPS 10 /* u_int; set/get IP6 multicast hops */ #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 multicast loopback */ #define IPV6_JOIN_GROUP 12 /* ipv6_mreq; join a group membership */ #define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ @@ -430,7 +430,7 @@ struct route_in6 { #define IPV6_BINDV6ONLY IPV6_V6ONLY #endif -#define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ +#define IPV6_IPSEC_POLICY 28 /* struct sadb_x_policy; get/set security policy */ /* 29; unused; was IPV6_FAITH */ #if 1 /* IPV6FIREWALL */ #define IPV6_FW_ADD 30 /* add a firewall rule to chain */ @@ -485,7 +485,7 @@ struct route_in6 { * the source address. */ -#define IPV6_BINDANY 64 /* bool: allow bind to any address */ +#define IPV6_BINDANY 64 /* bool; allow bind to any address */ /* unused; was IPV6_BIND_MULTI */ /* unused; was IPV6_RSS_LISTEN_BUCKET */ #define IPV6_FLOWID 67 /* int; flowid of given socket */ @@ -494,7 +494,7 @@ struct route_in6 { #define IPV6_RECVFLOWID 70 /* bool; receive IP6 flowid/flowtype w/ datagram */ #define IPV6_RECVRSSBUCKETID 71 /* bool; receive IP6 RSS bucket id w/ datagram */ -#define IPV6_ORIGDSTADDR 72 /* bool: allow getting dstaddr /port info */ +#define IPV6_ORIGDSTADDR 72 /* bool; allow getting dstaddr /port info */ #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR /* diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 25b6fce75b94..8477e122520a 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -125,55 +125,55 @@ typedef __uintptr_t uintptr_t; /* * Option flags per-socket. */ -#define SO_DEBUG 0x00000001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x00000002 /* socket has had listen() */ -#define SO_REUSEADDR 0x00000004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x00000008 /* keep connections alive */ -#define SO_DONTROUTE 0x00000010 /* just use interface addresses */ -#define SO_BROADCAST 0x00000020 /* permit sending of broadcast msgs */ +#define SO_DEBUG 0x00000001 /* int; turn on debugging info recording */ +#define SO_ACCEPTCONN 0x00000002 /* int; socket has had listen() */ +#define SO_REUSEADDR 0x00000004 /* int; allow local address reuse */ +#define SO_KEEPALIVE 0x00000008 /* int; keep connections alive */ +#define SO_DONTROUTE 0x00000010 /* int; just use interface addresses */ +#define SO_BROADCAST 0x00000020 /* int; permit sending of broadcast msgs */ #if __BSD_VISIBLE -#define SO_USELOOPBACK 0x00000040 /* bypass hardware when possible */ +#define SO_USELOOPBACK 0x00000040 /* int; bypass hardware when possible */ #endif -#define SO_LINGER 0x00000080 /* linger on close if data present */ -#define SO_OOBINLINE 0x00000100 /* leave received OOB data in line */ +#define SO_LINGER 0x00000080 /* struct linger; linger on close if data present */ +#define SO_OOBINLINE 0x00000100 /* int; leave received OOB data in line */ #if __BSD_VISIBLE -#define SO_REUSEPORT 0x00000200 /* allow local address & port reuse */ -#define SO_TIMESTAMP 0x00000400 /* timestamp received dgram traffic */ -#define SO_NOSIGPIPE 0x00000800 /* no SIGPIPE from EPIPE */ -#define SO_ACCEPTFILTER 0x00001000 /* there is an accept filter */ -#define SO_BINTIME 0x00002000 /* timestamp received dgram traffic */ +#define SO_REUSEPORT 0x00000200 /* int; allow local address & port reuse */ +#define SO_TIMESTAMP 0x00000400 /* int; timestamp received dgram traffic */ +#define SO_NOSIGPIPE 0x00000800 /* int; no SIGPIPE from EPIPE */ +#define SO_ACCEPTFILTER 0x00001000 /* struct accept_filter_arg; accept filter */ +#define SO_BINTIME 0x00002000 /* int; timestamp received dgram traffic */ #endif -#define SO_NO_OFFLOAD 0x00004000 /* socket cannot be offloaded */ -#define SO_NO_DDP 0x00008000 /* disable direct data placement */ -#define SO_REUSEPORT_LB 0x00010000 /* reuse with load balancing */ -#define SO_RERROR 0x00020000 /* keep track of receive errors */ +#define SO_NO_OFFLOAD 0x00004000 /* int; socket cannot be offloaded */ +#define SO_NO_DDP 0x00008000 /* int; disable direct data placement */ +#define SO_REUSEPORT_LB 0x00010000 /* int; reuse with load balancing */ +#define SO_RERROR 0x00020000 /* int; keep track of receive errors */ /* * Additional options, not kept in so_options. */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ +#define SO_SNDBUF 0x1001 /* int; send buffer size */ +#define SO_RCVBUF 0x1002 /* int; receive buffer size */ +#define SO_SNDLOWAT 0x1003 /* int; send low-water mark */ +#define SO_RCVLOWAT 0x1004 /* int; receive low-water mark */ +#define SO_SNDTIMEO 0x1005 /* struct timeval; send timeout */ +#define SO_RCVTIMEO 0x1006 /* struct timeval; receive timeout */ +#define SO_ERROR 0x1007 /* int; get error status and clear */ +#define SO_TYPE 0x1008 /* int; get socket type */ #if __BSD_VISIBLE #define SO_LABEL 0x1009 /* socket's MAC label */ #define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */ -#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */ -#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */ -#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ -#define SO_FIB 0x1014 /* get or set socket FIB */ +#define SO_LISTENQLIMIT 0x1011 /* int; socket's backlog limit */ +#define SO_LISTENQLEN 0x1012 /* int; socket's complete queue length */ +#define SO_LISTENINCQLEN 0x1013 /* int; socket's incomplete queue length */ +#define SO_FIB 0x1014 /* int; get or set socket FIB */ #define SO_SETFIB SO_FIB /* backward compat alias */ -#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ -#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ +#define SO_USER_COOKIE 0x1015 /* uint32_t; user cookie (dummynet etc.) */ +#define SO_PROTOCOL 0x1016 /* int; get socket protocol (Linux name) */ #define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ -#define SO_TS_CLOCK 0x1017 /* clock type used for SO_TIMESTAMP */ -#define SO_MAX_PACING_RATE 0x1018 /* socket's max TX pacing rate (Linux name) */ -#define SO_DOMAIN 0x1019 /* get socket domain */ -#define SO_SPLICE 0x1023 /* splice data to other socket */ +#define SO_TS_CLOCK 0x1017 /* int; clock type used for SO_TIMESTAMP */ +#define SO_MAX_PACING_RATE 0x1018 /* uint32_t; socket's max TX pacing rate (Linux name) */ +#define SO_DOMAIN 0x1019 /* int; get socket domain */ +#define SO_SPLICE 0x1023 /* struct splice; splice data to other socket */ #endif #if __BSD_VISIBLE diff --git a/sys/sys/un.h b/sys/sys/un.h index 41bde1701900..10ba6a51b2d8 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -63,8 +63,8 @@ struct sockaddr_un { /* Socket options. */ #define LOCAL_PEERCRED 1 /* retrieve peer credentials */ -#define LOCAL_CREDS 2 /* pass credentials to receiver */ -#define LOCAL_CREDS_PERSISTENT 3 /* pass credentials to receiver */ +#define LOCAL_CREDS 2 /* int; pass credentials to receiver */ +#define LOCAL_CREDS_PERSISTENT 3 /* int; pass credentials to receiver */ /* Start of reserved space for third-party socket options. */ #define LOCAL_VENDOR SO_VENDOR