This tool allows to set TCP options on TCP endpoints via the command line. It can be used, for example, to change the congestion control module or the TCP stack used by TCP endpoints.
It depends on D34138
Differential D34139
tcpsso, a tool to set socket options for TCP endpoints via the command line Authored by tuexen on Feb 2 2022, 10:56 AM. Tags None Referenced Files
Details
This tool allows to set TCP options on TCP endpoints via the command line. It can be used, for example, to change the congestion control module or the TCP stack used by TCP endpoints. It depends on D34138
Diff Detail
Event TimelineComment Actions When we discussed this tool, weren't generic SOCKOPTs also on the table? (SO_SNDBUF, SO_DEBUG spring to mind) - the use case would be to modify existing sockets underneath an application, which does not tune these (or when the system defaults can not be changed easily/application restartet).
Comment Actions Yes, these are on the table. But I need to figure out if this works with respect to locking. Right now, the socket can't go away, since the socket layer holds a refcount. This is not true when being called via the sysctl interface. I wanted to bring up things for review early to get some feedback, especially if I'm doing the locking correct.
Comment Actions Only mentioning the first .Nm with a redundant argument, but same applies to all following ones. Can't check manual page and code are consistent.
Comment Actions mandoc -Tlint shows a few nits that I'd like to see corrected before this is committed. You also have a few lines that exceed 80 characters in width, which I think it'd be good to have reflowed. Other than that (and the things noted by Pau Amma), mdoc syntax looks good to me.
Comment Actions Thanks to the man page reviews. I addressed the issues (the reported ones and the ones reported by mandoc). Comment Actions Add support for socket options of level other than IPPROTO_TCP. Also add more symbolic optnames.
Comment Actions The man page lists only some examples. tcpsso recognizes much more socket option names... Comment Actions It's funny because TCP_NODELAY is the first thing people end up enabling (edit: to disable Nagle, he hangs on HN these days as Animats) when they run RPC over a TCP transport on a LAN, the use of Nagle there is itself pretty apocryphal, modulo D-ACK implosion. I ended up doing it on my first "real job" as an A/P Trainee working on Sage Line 50 accounting systems and MS SQL Server in 1999, and ended up doing it when turning up Reuters Dealing 3000 in 2010 in HFT. Just saying. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||