X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.h;h=1549efbeb7fdace27e49aed13927cf340f27f0e4;hb=refs%2Fchanges%2F85%2F24985%2F10;hp=59ccf8f1a735838e7be13f59b13605c1fa61c9e5;hpb=e84e9d708e0a7571bc24ae2f443462ed8cddbb84;p=vpp.git 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;