History

inet_diag: report delayed ack timer information

inet_sk_diag_fill() populates r->idiag_timer with the following precedence order: 1 - Retransmit timer. 4 - Probe0 timer. 2 - Keepalive timer. This patch adds a new value, last in the list, if other timers are not active. 5 - Delayed ACK timer. A corresponding iproute2 patch will follow to replace "unknown" with "delack": ESTAB 10 0 [2002:a05:6830:1f86::]:12875 [2002:a05:6830:1f85::]:50438 timer:(unknown,003ms,0) ino:152178 sk:3004 cgroup:unreachable:189 <-> skmem:(r1344,rb12780520,t0,tb262144,f2752,w0,o250,bl0,d0) ts usec_ts ... Also add the following enum in uapi/linux/inet_diag.h as suggested by David Ahern. enum { IDIAG_TIMER_OFF, IDIAG_TIMER_ON, IDIAG_TIMER_KEEPALIVE, IDIAG_TIMER_TIMEWAIT, IDIAG_TIMER_PROBE0, IDIAG_TIMER_DELACK, }; Neal Cardwell suggested to test for ICSK_ACK_TIMER: inet_csk_clear_xmit_timer() does not call sk_stop_timer() because INET_CSK_CLEAR_TIMERS is unset.

Eric Dumazet committed 8 months ago

Commit c698f5c1 parent db299703 files · +20 −6Browse files

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

Unified · Split

include/uapi/linux/inet_diag.h+9−0
@@ -129,6 +129,15 @@ struct inet_diag_msg { · 128 unmodified lines
129129 __u32 idiag_inode;
130130 };
131131
132+enum {
133+ IDIAG_TIMER_OFF,
134+ IDIAG_TIMER_ON,
135+ IDIAG_TIMER_KEEPALIVE,
136+ IDIAG_TIMER_TIMEWAIT,
137+ IDIAG_TIMER_PROBE0,
138+ IDIAG_TIMER_DELACK,
139+};
140+
132141 /* Extensions */
133142
134143 enum {