FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
tcp_debug.h File Reference
+ Include dependency graph for tcp_debug.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tcp_dbg_main_
 

Macros

#define TCP_DEBUG_ALWAYS   (0)
 Build debugging infra unconditionally. More...
 
#define TCP_DEBUG_ENABLE   (0)
 Build debugging infra only if enabled. More...
 
#define TCP_DEBUG_SM   (0)
 
#define TCP_DEBUG_CC   (0)
 
#define TCP_DEBUG_CS   (0)
 
#define TCP_DEBUG_LC   (0 || TCP_DEBUG_SM || TCP_DEBUG_CC || TCP_DEBUG_CS)
 
#define TCP_DEBUG   (TCP_DEBUG_ALWAYS || TCP_DEBUG_ENABLE)
 
#define TCP_DEBUG_BUF_ALLOC   (0)
 
#define TCP_CONCAT_HELPER(_a, _b)   _a##_b
 
#define TCP_CC(_a, _b)   TCP_CONCAT_HELPER(_a, _b)
 
#define tcp_evt_lvl(_evt)   TCP_CC(_evt, _LVL)
 
#define tcp_evt_grp(_evt)   TCP_CC(_evt, _GRP)
 
#define tcp_evt_handler(_evt, _args...)   TCP_CC(_evt, _HANDLER) (_args)
 
#define tcp_evt_grp_dbg_lvl(_evt)   tcp_dbg_main.grp_dbg_lvl[tcp_evt_grp (_evt)]
 
#define foreach_tcp_evt_grp
 
#define foreach_tcp_dbg_evt
 
#define TCP_EVT(_evt, _args...)
 
#define TCP_DBG(_fmt, _args...)
 
#define TCP_DECLARE_ETD(_tc, _e, _size)
 
#define TCP_EVT_SYN_SENT_HANDLER(_tc, ...)
 
#define TCP_EVT_SYNACK_SENT_HANDLER(_tc, ...)
 
#define TCP_EVT_SYNACK_RCVD_HANDLER(_tc, ...)
 
#define TCP_EVT_SYN_RXT_HANDLER(_tc, ...)
 
#define TCP_EVT_FIN_SENT_HANDLER(_tc, ...)
 
#define TCP_EVT_RST_SENT_HANDLER(_tc, ...)
 
#define TCP_EVT_FIN_RCVD_HANDLER(_tc, ...)
 
#define TCP_EVT_RST_RCVD_HANDLER(_tc, ...)
 
#define TCP_EVT_STATE_CHANGE_HANDLER(_tc, ...)
 
#define TCP_EVT_TIMER_POP_HANDLER(_tc_index, _timer_id, ...)
 
#define TCP_EVT_SEG_INVALID_HANDLER(_tc, _btcp, ...)
 
#define TCP_EVT_PAWS_FAIL_HANDLER(_tc, _seq, _end, ...)
 
#define TCP_EVT_ACK_RCV_ERR_HANDLER(_tc, _type, _ack, ...)
 
#define TCP_EVT_RCV_WND_SHRUNK_HANDLER(_tc, _obs, _av, ...)
 
#define TCP_EVT_ACK_SENT_HANDLER(_tc, ...)
 
#define TCP_EVT_ACK_RCVD_HANDLER(_tc, ...)
 
#define TCP_EVT_PKTIZE_HANDLER(_tc, ...)
 
#define TCP_EVT_INPUT_HANDLER(_tc, _type, _len, _written, ...)
 
#define TCP_EVT_SND_WND_HANDLER(_tc, ...)
 
#define TCP_EVT_OUTPUT_HANDLER(_tc, flags, n_bytes, ...)
 
#define TCP_EVT_CC_EVT_HANDLER(_tc, _sub_evt, ...)
 
#define TCP_EVT_CC_RTX_HANDLER(_tc, offset, n_bytes, ...)
 
#define TCP_EVT_DUPACK_SENT_HANDLER(_tc, _btcp, ...)
 
#define TCP_EVT_DUPACK_RCVD_HANDLER(_tc, ...)
 
#define TCP_EVT_CC_PACK_HANDLER(_tc, ...)
 
#define TCP_EVT_CC_SCOREBOARD_HANDLER(_tc, ...)
 
#define TCP_EVT_CC_SACKS_HANDLER(_tc, ...)
 
#define TCP_EVT_CC_INPUT_HANDLER(_tc, _len, _written, ...)
 
#define TCP_EVT_CC_STAT_HANDLER(_tc, ...)
 
#define TCP_EVT_CC_STAT_PRINT(_tc)
 
#define TCP_DBG_BUFFER_ALLOC_MAYBE_FAIL(thread_index)
 

Typedefs

typedef enum tcp_evt_grp_ tcp_evt_grp_e
 
typedef struct tcp_dbg_main_ tcp_dbg_main_t
 
typedef enum tcp_evt_types_ tcp_evt_types_e
 
typedef enum tcp_evt_lvl_ tcp_evt_lvl_e
 
typedef enum tcp_evt_to_grp_ tcp_evt_to_grp_e
 

Enumerations

enum  tcp_evt_grp_ { TCP_EVT_N_GRP }
 
enum  tcp_evt_types_ { foreach_tcp_dbg_evt }
 
enum  tcp_evt_lvl_ { foreach_tcp_dbg_evt }
 
enum  tcp_evt_to_grp_ { foreach_tcp_dbg_evt }
 

Functions

void tcp_evt_track_register (elog_track_t *et)
 
void tcp_debug_init (void)
 

Variables

tcp_dbg_main_t tcp_dbg_main
 

Macro Definition Documentation

◆ foreach_tcp_dbg_evt

foreach_tcp_dbg_evt
Value:
_(INIT, LC, 1, "init") \
_(DEALLOC, LC, 1, "dealloc") \
_(OPEN, LC, 1, "open") \
_(CLOSE, LC, 1, "close") \
_(BIND, LC, 1, "bind") \
_(UNBIND, LC, 1, "unbind") \
_(DELETE, LC, 1, "delete") \
_(SYN_RCVD, LC, 1, "SYN rcvd") \
_(STATE_CHANGE, LC, 1, "state change") \
_(SYN_SENT, SM, 1, "SYN sent") \
_(SYN_RXT, SM, 1, "SYN retransmit") \
_(SYNACK_SENT, SM, 1, "SYNACK sent") \
_(SYNACK_RCVD, SM, 1, "SYNACK rcvd") \
_(FIN_SENT, SM, 1, "FIN sent") \
_(FIN_RCVD, SM, 1, "FIN rcvd") \
_(RST_SENT, SM, 1, "RST sent") \
_(RST_RCVD, SM, 1, "RST rcvd") \
_(TIMER_POP, SM, 1, "timer pop") \
_(SEG_INVALID, SM, 2, "invalid segment") \
_(PAWS_FAIL, SM, 2, "failed paws check") \
_(ACK_RCV_ERR, SM, 2, "invalid ack") \
_(RCV_WND_SHRUNK, SM, 2, "shrunk rcv_wnd") \
_(ACK_SENT, SM, 3, "ACK sent") \
_(ACK_RCVD, SM, 3, "ACK rcvd") \
_(PKTIZE, SM, 3, "packetize") \
_(INPUT, SM, 3, "in") \
_(OUTPUT, SM, 4, "output") \
_(SND_WND, SM, 4, "snd_wnd update") \
_(CC_EVT, CC, 1, "cc event") \
_(CC_RTX, CC, 2, "retransmit") \
_(CC_PACK, CC, 2, "cc partial ack") \
_(DUPACK_SENT, CC, 2, "DUPACK sent") \
_(DUPACK_RCVD, CC, 2, "DUPACK rcvd") \
_(CC_SCOREBOARD, CC, 2, "scoreboard stats") \
_(CC_SACKS, CC, 2, "snd sacks stats") \
_(CC_INPUT, CC, 2, "ooo data delivered") \
_(CC_STAT, CS, 1, "cc stats") \
_(CC_RTO_STAT, CS, 1, "cc rto stats") \

Definition at line 75 of file tcp_debug.h.

◆ foreach_tcp_evt_grp

#define foreach_tcp_evt_grp
Value:
_(LC, "life cycle") \
_(SM, "state machine") \
_(CC, "congestion control") \
_(CS, "cc stats") \

Definition at line 53 of file tcp_debug.h.

◆ TCP_CC

#define TCP_CC (   _a,
  _b 
)    TCP_CONCAT_HELPER(_a, _b)

Definition at line 46 of file tcp_debug.h.

◆ TCP_CONCAT_HELPER

#define TCP_CONCAT_HELPER (   _a,
  _b 
)    _a##_b

Definition at line 45 of file tcp_debug.h.

◆ TCP_DBG

#define TCP_DBG (   _fmt,
  _args... 
)

Definition at line 146 of file tcp_debug.h.

◆ TCP_DBG_BUFFER_ALLOC_MAYBE_FAIL

#define TCP_DBG_BUFFER_ALLOC_MAYBE_FAIL (   thread_index)

Definition at line 985 of file tcp_debug.h.

◆ TCP_DEBUG

#define TCP_DEBUG   (TCP_DEBUG_ALWAYS || TCP_DEBUG_ENABLE)

Definition at line 38 of file tcp_debug.h.

◆ TCP_DEBUG_ALWAYS

#define TCP_DEBUG_ALWAYS   (0)

Build debugging infra unconditionally.

Debug components controlled via debug configuration. Comes with some overhead so it's not recommended for production/performance scenarios. Takes priority over TCP_DEBUG_ENABLE.

Definition at line 26 of file tcp_debug.h.

◆ TCP_DEBUG_BUF_ALLOC

#define TCP_DEBUG_BUF_ALLOC   (0)

Definition at line 39 of file tcp_debug.h.

◆ TCP_DEBUG_CC

#define TCP_DEBUG_CC   (0)

Definition at line 34 of file tcp_debug.h.

◆ TCP_DEBUG_CS

#define TCP_DEBUG_CS   (0)

Definition at line 35 of file tcp_debug.h.

◆ TCP_DEBUG_ENABLE

#define TCP_DEBUG_ENABLE   (0)

Build debugging infra only if enabled.

Debug components controlled via macros that follow.

Definition at line 31 of file tcp_debug.h.

◆ TCP_DEBUG_LC

#define TCP_DEBUG_LC   (0 || TCP_DEBUG_SM || TCP_DEBUG_CC || TCP_DEBUG_CS)

Definition at line 36 of file tcp_debug.h.

◆ TCP_DEBUG_SM

#define TCP_DEBUG_SM   (0)

Definition at line 33 of file tcp_debug.h.

◆ TCP_DECLARE_ETD

#define TCP_DECLARE_ETD (   _tc,
  _e,
  _size 
)
Value:
struct \
{ \
u32 data[_size]; \
} * ed; \
_tc->c_elog_track) \
vlib_main_t vlib_global_main
Definition: main.c:1943
elog_main_t elog_main
Definition: main.h:193
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:478
u8 data[128]
Definition: ipsec_types.api:87

Definition at line 152 of file tcp_debug.h.

◆ TCP_EVT

#define TCP_EVT (   _evt,
  _args... 
)

Definition at line 145 of file tcp_debug.h.

◆ TCP_EVT_ACK_RCV_ERR_HANDLER

#define TCP_EVT_ACK_RCV_ERR_HANDLER (   _tc,
  _type,
  _ack,
  ... 
)

Definition at line 588 of file tcp_debug.h.

◆ TCP_EVT_ACK_RCVD_HANDLER

#define TCP_EVT_ACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 661 of file tcp_debug.h.

◆ TCP_EVT_ACK_SENT_HANDLER

#define TCP_EVT_ACK_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 660 of file tcp_debug.h.

◆ TCP_EVT_CC_EVT_HANDLER

#define TCP_EVT_CC_EVT_HANDLER (   _tc,
  _sub_evt,
  ... 
)

Definition at line 737 of file tcp_debug.h.

◆ TCP_EVT_CC_INPUT_HANDLER

#define TCP_EVT_CC_INPUT_HANDLER (   _tc,
  _len,
  _written,
  ... 
)

Definition at line 864 of file tcp_debug.h.

◆ TCP_EVT_CC_PACK_HANDLER

#define TCP_EVT_CC_PACK_HANDLER (   _tc,
  ... 
)

Definition at line 861 of file tcp_debug.h.

◆ TCP_EVT_CC_RTX_HANDLER

#define TCP_EVT_CC_RTX_HANDLER (   _tc,
  offset,
  n_bytes,
  ... 
)

Definition at line 858 of file tcp_debug.h.

◆ TCP_EVT_CC_SACKS_HANDLER

#define TCP_EVT_CC_SACKS_HANDLER (   _tc,
  ... 
)

Definition at line 863 of file tcp_debug.h.

◆ TCP_EVT_CC_SCOREBOARD_HANDLER

#define TCP_EVT_CC_SCOREBOARD_HANDLER (   _tc,
  ... 
)

Definition at line 862 of file tcp_debug.h.

◆ TCP_EVT_CC_STAT_HANDLER

#define TCP_EVT_CC_STAT_HANDLER (   _tc,
  ... 
)

Definition at line 951 of file tcp_debug.h.

◆ TCP_EVT_CC_STAT_PRINT

#define TCP_EVT_CC_STAT_PRINT (   _tc)

Definition at line 952 of file tcp_debug.h.

◆ TCP_EVT_DUPACK_RCVD_HANDLER

#define TCP_EVT_DUPACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 860 of file tcp_debug.h.

◆ TCP_EVT_DUPACK_SENT_HANDLER

#define TCP_EVT_DUPACK_SENT_HANDLER (   _tc,
  _btcp,
  ... 
)

Definition at line 859 of file tcp_debug.h.

◆ TCP_EVT_FIN_RCVD_HANDLER

#define TCP_EVT_FIN_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 511 of file tcp_debug.h.

◆ TCP_EVT_FIN_SENT_HANDLER

#define TCP_EVT_FIN_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 509 of file tcp_debug.h.

◆ tcp_evt_grp

#define tcp_evt_grp (   _evt)    TCP_CC(_evt, _GRP)

Definition at line 49 of file tcp_debug.h.

◆ tcp_evt_grp_dbg_lvl

#define tcp_evt_grp_dbg_lvl (   _evt)    tcp_dbg_main.grp_dbg_lvl[tcp_evt_grp (_evt)]

Definition at line 51 of file tcp_debug.h.

◆ tcp_evt_handler

#define tcp_evt_handler (   _evt,
  _args... 
)    TCP_CC(_evt, _HANDLER) (_args)

Definition at line 50 of file tcp_debug.h.

◆ TCP_EVT_INPUT_HANDLER

#define TCP_EVT_INPUT_HANDLER (   _tc,
  _type,
  _len,
  _written,
  ... 
)

Definition at line 663 of file tcp_debug.h.

◆ tcp_evt_lvl

#define tcp_evt_lvl (   _evt)    TCP_CC(_evt, _LVL)

Definition at line 48 of file tcp_debug.h.

◆ TCP_EVT_OUTPUT_HANDLER

#define TCP_EVT_OUTPUT_HANDLER (   _tc,
  flags,
  n_bytes,
  ... 
)

Definition at line 694 of file tcp_debug.h.

◆ TCP_EVT_PAWS_FAIL_HANDLER

#define TCP_EVT_PAWS_FAIL_HANDLER (   _tc,
  _seq,
  _end,
  ... 
)

Definition at line 587 of file tcp_debug.h.

◆ TCP_EVT_PKTIZE_HANDLER

#define TCP_EVT_PKTIZE_HANDLER (   _tc,
  ... 
)

Definition at line 662 of file tcp_debug.h.

◆ TCP_EVT_RCV_WND_SHRUNK_HANDLER

#define TCP_EVT_RCV_WND_SHRUNK_HANDLER (   _tc,
  _obs,
  _av,
  ... 
)

Definition at line 589 of file tcp_debug.h.

◆ TCP_EVT_RST_RCVD_HANDLER

#define TCP_EVT_RST_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 512 of file tcp_debug.h.

◆ TCP_EVT_RST_SENT_HANDLER

#define TCP_EVT_RST_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 510 of file tcp_debug.h.

◆ TCP_EVT_SEG_INVALID_HANDLER

#define TCP_EVT_SEG_INVALID_HANDLER (   _tc,
  _btcp,
  ... 
)

Definition at line 586 of file tcp_debug.h.

◆ TCP_EVT_SND_WND_HANDLER

#define TCP_EVT_SND_WND_HANDLER (   _tc,
  ... 
)

Definition at line 693 of file tcp_debug.h.

◆ TCP_EVT_STATE_CHANGE_HANDLER

#define TCP_EVT_STATE_CHANGE_HANDLER (   _tc,
  ... 
)

Definition at line 513 of file tcp_debug.h.

◆ TCP_EVT_SYN_RXT_HANDLER

#define TCP_EVT_SYN_RXT_HANDLER (   _tc,
  ... 
)

Definition at line 508 of file tcp_debug.h.

◆ TCP_EVT_SYN_SENT_HANDLER

#define TCP_EVT_SYN_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 505 of file tcp_debug.h.

◆ TCP_EVT_SYNACK_RCVD_HANDLER

#define TCP_EVT_SYNACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 507 of file tcp_debug.h.

◆ TCP_EVT_SYNACK_SENT_HANDLER

#define TCP_EVT_SYNACK_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 506 of file tcp_debug.h.

◆ TCP_EVT_TIMER_POP_HANDLER

#define TCP_EVT_TIMER_POP_HANDLER (   _tc_index,
  _timer_id,
  ... 
)

Definition at line 514 of file tcp_debug.h.

Typedef Documentation

◆ tcp_dbg_main_t

typedef struct tcp_dbg_main_ tcp_dbg_main_t

◆ tcp_evt_grp_e

◆ tcp_evt_lvl_e

◆ tcp_evt_to_grp_e

◆ tcp_evt_types_e

Enumeration Type Documentation

◆ tcp_evt_grp_

Enumerator
TCP_EVT_N_GRP 

Definition at line 59 of file tcp_debug.h.

◆ tcp_evt_lvl_

Enumerator
foreach_tcp_dbg_evt 

Definition at line 122 of file tcp_debug.h.

◆ tcp_evt_to_grp_

Enumerator
foreach_tcp_dbg_evt 

Definition at line 129 of file tcp_debug.h.

◆ tcp_evt_types_

Enumerator
foreach_tcp_dbg_evt 

Definition at line 115 of file tcp_debug.h.

Function Documentation

◆ tcp_debug_init()

void tcp_debug_init ( void  )

◆ tcp_evt_track_register()

void tcp_evt_track_register ( elog_track_t et)

Definition at line 20 of file tcp_debug.c.

Variable Documentation

◆ tcp_dbg_main

tcp_dbg_main_t tcp_dbg_main

Definition at line 17 of file tcp_debug.c.