diff options
author | Aritra Basu <aritrbas@cisco.com> | 2024-07-30 14:34:59 -0700 |
---|---|---|
committer | Aritra Basu <aritrbas@cisco.com> | 2024-08-01 11:46:59 -0700 |
commit | 80a16d134ef9c8a41149c4842d7a3f4eb62425d9 (patch) | |
tree | 425a36d6d4e9fc945af731e1681c6b84996f9364 | |
parent | 519983b44d247e79b8ac44e5a64ddd82230d6267 (diff) |
tcp: add establish timer pops to stats
Type: improvement
Change-Id: Ibc1e391356cef415b992b65c00f3d365fc97386d
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
-rw-r--r-- | src/vnet/tcp/tcp.h | 28 | ||||
-rw-r--r-- | src/vnet/tcp/tcp_output.c | 4 |
2 files changed, 19 insertions, 13 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index d032a3dc749..8676db413a0 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -45,19 +45,21 @@ typedef struct _tcp_lookup_dispatch u8 next, error; } tcp_lookup_dispatch_t; -#define foreach_tcp_wrk_stat \ - _(timer_expirations, u64, "timer expirations") \ - _(rxt_segs, u64, "segments retransmitted") \ - _(tr_events, u32, "timer retransmit events") \ - _(to_closewait, u32, "timeout close-wait") \ - _(to_closewait2, u32, "timeout close-wait w/data") \ - _(to_finwait1, u32, "timeout fin-wait-1") \ - _(to_finwait2, u32, "timeout fin-wait-2") \ - _(to_lastack, u32, "timeout last-ack") \ - _(to_closing, u32, "timeout closing") \ - _(tr_abort, u32, "timer retransmit abort") \ - _(rst_unread, u32, "reset on close due to unread data") \ - _(no_buffer, u32, "out of buffers") \ +#define foreach_tcp_wrk_stat \ + _ (timer_expirations, u64, "timer expirations") \ + _ (rxt_segs, u64, "segments retransmitted") \ + _ (tr_events, u32, "timer retransmit events") \ + _ (to_establish, u32, "timeout establish") \ + _ (to_persist, u32, "timeout persist") \ + _ (to_closewait, u32, "timeout close-wait") \ + _ (to_closewait2, u32, "timeout close-wait w/data") \ + _ (to_finwait1, u32, "timeout fin-wait-1") \ + _ (to_finwait2, u32, "timeout fin-wait-2") \ + _ (to_lastack, u32, "timeout last-ack") \ + _ (to_closing, u32, "timeout closing") \ + _ (tr_abort, u32, "timer retransmit abort") \ + _ (rst_unread, u32, "reset on close due to unread data") \ + _ (no_buffer, u32, "out of buffers") typedef struct tcp_wrk_stats_ { diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 373bb2a9e0f..dd1ec555902 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -1458,6 +1458,8 @@ tcp_timer_retransmit_syn_handler (tcp_connection_t * tc) TCP_EVT (TCP_EVT_CC_EVT, tc, 2); tc->rtt_ts = 0; + tcp_worker_stats_inc (wrk, to_establish, 1); + /* Active open establish timeout */ if (tc->rto >= TCP_ESTABLISH_TIME >> 1) { @@ -1507,6 +1509,8 @@ tcp_timer_persist_handler (tcp_connection_t * tc) int n_bytes = 0; u8 *data; + tcp_worker_stats_inc (wrk, to_persist, 1); + /* Problem already solved or worse */ if (tc->state == TCP_STATE_CLOSED || tc->snd_wnd > tc->snd_mss || (tc->flags & TCP_CONN_FINSNT)) |