diff options
author | Florin Coras <fcoras@cisco.com> | 2020-02-12 07:42:01 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-02-14 12:53:33 +0000 |
commit | 5e6305fb02ccdfd38c8c5e369a960deaa7602eba (patch) | |
tree | 87b1f93d572ae3c5b5a57a9382850751e608576a /src/vnet/tcp/tcp.h | |
parent | e84e9d708e0a7571bc24ae2f443462ed8cddbb84 (diff) |
tcp: minimal set of worker stats
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9dafe564229095d50285276a654f4983f93faff2
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r-- | src/vnet/tcp/tcp.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 59ccf8f1a73..1549efbeb7f 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -502,6 +502,24 @@ 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_finwait1, u32, "timeout fin-wait-1") \ + _(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") \ + +typedef struct tcp_wrk_stats_ +{ +#define _(name, type, str) type name; + foreach_tcp_wrk_stat +#undef _ +} tcp_wrk_stats_t; + typedef struct tcp_worker_ctx_ { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); @@ -538,8 +556,17 @@ typedef struct tcp_worker_ctx_ /** worker timer wheel */ tw_timer_wheel_16t_2w_512sl_t timer_wheel; + CLIB_CACHE_LINE_ALIGN_MARK (cacheline2); + + tcp_wrk_stats_t stats; } tcp_worker_ctx_t; +#define tcp_worker_stats_inc(_ti,_stat,_val) \ + tcp_main.wrk_ctx[_ti].stats._stat += _val + +#define tcp_workerp_stats_inc(_wrk,_stat,_val) \ + _wrk->stats._stat += _val + typedef struct tcp_iss_seed_ { u64 first; |