History

tcp: support TCP_DELACK_MAX_US for set/getsockopt use

Support adjusting/reading delayed ack max for socket level by using set/getsockopt(). This option aligns with TCP_BPF_DELACK_MAX usage. Considering that bpf option was implemented before this patch, so we need to use a standalone new option for pure tcp set/getsockopt() use. Add WRITE_ONCE/READ_ONCE() to prevent data-race if setsockopt() happens to write one value to icsk_delack_max while icsk_delack_max is being read.

Jason Xing committed 1 year ago

Commit 9552f901 parent f38805c3 files · +14 −2Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/tcp.h+1−0
@@ -141,6 +141,7 @@ enum { · 140 unmodified lines
141141 #define TCP_IS_MPTCP 43 /* Is MPTCP being used? */
142142 #define TCP_RTO_MAX_MS 44 /* max rto time in ms */
143143 #define TCP_RTO_MIN_US 45 /* min rto time in us */
144+#define TCP_DELACK_MAX_US 46 /* max delayed ack time in us */
144145
145146 #define TCP_REPAIR_ON 1
146147 #define TCP_REPAIR_OFF 0