Hello friends,
I am currently working on implementing the *TCP_INFO *socket option for both the OS and LX. The primary goal of this option is to expose *TCP* performance counters from the socket, accessible through *GETSOCKOPT(3SOCKET) <https://illumos.org/man/3SOCKET/getsockopt>*. The relevant metrics seem to come from the following RFC documents: *RFC 4898 <https://datatracker.ietf.org/doc/html/rfc4898>* and *RFC 6298 <https://datatracker.ietf.org/doc/html/rfc6298>*. Other systems attempting *TCP_INFO* compatibility with* Linux *fill only some of the members for tcp_info struct leaving the rest with zeroes and also adding their own extensions to the structure (example <https://github.com/freebsd/freebsd-src/blob/main/sys/netinet/tcp_usrreq.c#L1538>). A possible approach for our implementation is to follow a similar path but refrain from adding custom extensions. Instead, we could focus on populating the existing struct members that are already being used by certain applications <https://smartos.org/bugview/OS-4525>. For instance, popular applications like *iperf3, PHP,* and *Nginx *rely on specific fields such as **tcpi_snd_cwnd*, *tcpi_snd_mss*, *tcpi_snd_ssthresh**, and others. I am currently investigating the mapping between our *tcp_s* struct and these fields, but additional insights or information from anyone familiar with these details would be highly appreciated. On the LX side of this change, once the OS part is implemented, the only identified change is the mapping of our *TCP* states to Linux *TCP* states in tcp_info_t when *GETSOCKOPT(3SOCKET <https://illumos.org/man/3SOCKET/getsockopt>) *returns* *to lx_getsockopt. Here is my current WIP patch, keep in mind that mapping *TCP* states is missing( I would like to know if this patch is on the right track): https://neirac.srht.site/resources/patches/14744-Add-TCP_INFO-socket-option.patch Also as LX is not part of *illumos-gate, *I'm confused about where should I send patches when LX changes are required. Bests ------------------------------------------ illumos: illumos-discuss Permalink: https://illumos.topicbox.com/groups/discuss/Tbd27adee24ea3a50-M2cd4740f2f833142e13194bd Delivery options: https://illumos.topicbox.com/groups/discuss/subscription
