FD.io VPP  v18.07-rc0-415-g6c78436
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.

Macros

#define TCP_DEBUG   (1)
 
#define TCP_DEBUG_SM   (0)
 
#define TCP_DEBUG_CC   (0)
 
#define TCP_DEBUG_CC_STAT   (0)
 
#define TCP_DEBUG_BUFFER_ALLOCATION   (0)
 
#define foreach_tcp_dbg_evt
 
#define TRANSPORT_DEBUG   (1)
 
#define TCP_DBG(_fmt, _args...)   clib_warning (_fmt, ##_args)
 
#define DECLARE_ETD(_tc, _e, _size)
 
#define TCP_DBG_IP_TAG_LCL(_tc)
 
#define TCP_DBG_IP_TAG_RMT(_tc)
 
#define TCP_EVT_INIT_HANDLER(_tc, _is_l, ...)
 
#define TCP_EVT_DEALLOC_HANDLER(_tc, ...)
 
#define TCP_EVT_OPEN_HANDLER(_tc, ...)
 
#define TCP_EVT_CLOSE_HANDLER(_tc, ...)
 
#define TCP_EVT_BIND_HANDLER(_tc, ...)
 
#define TCP_EVT_SYN_RCVD_HANDLER(_tc, _init, ...)
 
#define TCP_EVT_UNBIND_HANDLER(_tc, ...)
 
#define TCP_EVT_DELETE_HANDLER(_tc, ...)
 
#define CONCAT_HELPER(_a, _b)   _a##_b
 
#define CC(_a, _b)   CONCAT_HELPER(_a, _b)
 
#define TCP_EVT_DBG(_evt, _args...)   CC(_evt, _HANDLER)(_args)
 
#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_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_TIMER_POP_HANDLER(_tc_index, _timer_id, ...)
 
#define TCP_EVT_SND_WND_HANDLER(_tc, ...)
 
#define TCP_EVT_OUTPUT_HANDLER(_tc, flags, n_bytes, ...)
 
#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_EVT_HANDLER(_tc, _sub_evt, ...)
 
#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_DBG_BUFFER_ALLOC_MAYBE_FAIL(thread_index)
 

Typedefs

typedef enum _tcp_dbg tcp_dbg_e
 
typedef enum _tcp_dbg_evt tcp_dbg_evt_e
 

Macro Definition Documentation

#define CC (   _a,
  _b 
)    CONCAT_HELPER(_a, _b)

Definition at line 237 of file tcp_debug.h.

#define CONCAT_HELPER (   _a,
  _b 
)    _a##_b

Definition at line 236 of file tcp_debug.h.

#define DECLARE_ETD (   _tc,
  _e,
  _size 
)
Value:
struct \
{ \
u32 data[_size]; \
} * ed; \
_e, _tc->c_elog_track)
vlib_main_t vlib_global_main
Definition: main.c:1644
unsigned int u32
Definition: types.h:88
elog_main_t elog_main
Definition: main.h:158
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:475

Definition at line 91 of file tcp_debug.h.

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

Definition at line 27 of file tcp_debug.h.

#define TCP_DBG (   _fmt,
  _args... 
)    clib_warning (_fmt, ##_args)

Definition at line 89 of file tcp_debug.h.

#define TCP_DBG_BUFFER_ALLOC_MAYBE_FAIL (   thread_index)

Definition at line 874 of file tcp_debug.h.

#define TCP_DBG_IP_TAG_LCL (   _tc)
Value:
{ \
if (_tc->c_is_ip4) \
{ \
{ \
.format = "lcl: %d.%d.%d.%d:%d", \
.format_args = "i4i4i4i4i4", \
}; \
DECLARE_ETD(_tc, _e, 5); \
ed->data[0] = _tc->c_lcl_ip.ip4.as_u8[0]; \
ed->data[1] = _tc->c_lcl_ip.ip4.as_u8[1]; \
ed->data[2] = _tc->c_lcl_ip.ip4.as_u8[2]; \
ed->data[3] = _tc->c_lcl_ip.ip4.as_u8[3]; \
ed->data[4] = clib_net_to_host_u16(_tc->c_lcl_port); \
} \
}
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 99 of file tcp_debug.h.

#define TCP_DBG_IP_TAG_RMT (   _tc)
Value:
{ \
if (_tc->c_is_ip4) \
{ \
{ \
.format = "rmt: %d.%d.%d.%d:%d", \
.format_args = "i4i4i4i4i4", \
}; \
DECLARE_ETD(_tc, _e, 5); \
ed->data[0] = _tc->c_rmt_ip.ip4.as_u8[0]; \
ed->data[1] = _tc->c_rmt_ip.ip4.as_u8[1]; \
ed->data[2] = _tc->c_rmt_ip.ip4.as_u8[2]; \
ed->data[3] = _tc->c_rmt_ip.ip4.as_u8[3]; \
ed->data[4] = clib_net_to_host_u16(_tc->c_rmt_port); \
} \
}
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 117 of file tcp_debug.h.

#define TCP_DEBUG   (1)

Definition at line 21 of file tcp_debug.h.

#define TCP_DEBUG_BUFFER_ALLOCATION   (0)

Definition at line 25 of file tcp_debug.h.

#define TCP_DEBUG_CC   (0)

Definition at line 23 of file tcp_debug.h.

#define TCP_DEBUG_CC_STAT   (0)

Definition at line 24 of file tcp_debug.h.

#define TCP_DEBUG_SM   (0)

Definition at line 22 of file tcp_debug.h.

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

Definition at line 474 of file tcp_debug.h.

#define TCP_EVT_ACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 587 of file tcp_debug.h.

#define TCP_EVT_ACK_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 586 of file tcp_debug.h.

#define TCP_EVT_BIND_HANDLER (   _tc,
  ... 
)
Value:
{ \
{ \
.format = "bind: listener %d", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->c_c_index; \
}
#define TCP_EVT_INIT_HANDLER(_tc, _is_l,...)
Definition: tcp_debug.h:135
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 187 of file tcp_debug.h.

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

Definition at line 775 of file tcp_debug.h.

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

Definition at line 778 of file tcp_debug.h.

#define TCP_EVT_CC_PACK_HANDLER (   _tc,
  ... 
)

Definition at line 774 of file tcp_debug.h.

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

Definition at line 771 of file tcp_debug.h.

#define TCP_EVT_CC_SACKS_HANDLER (   _tc,
  ... 
)

Definition at line 777 of file tcp_debug.h.

#define TCP_EVT_CC_SCOREBOARD_HANDLER (   _tc,
  ... 
)

Definition at line 776 of file tcp_debug.h.

#define TCP_EVT_CC_STAT_HANDLER (   _tc,
  ... 
)

Definition at line 841 of file tcp_debug.h.

#define TCP_EVT_CLOSE_HANDLER (   _tc,
  ... 
)
Value:
{ \
{ \
.format = "close: %d", \
.format_args = "i4", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->c_c_index; \
}
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 176 of file tcp_debug.h.

#define TCP_EVT_DBG (   _evt,
  _args... 
)    CC(_evt, _HANDLER)(_args)

Definition at line 238 of file tcp_debug.h.

#define TCP_EVT_DEALLOC_HANDLER (   _tc,
  ... 
)
Value:
{ \
vec_free (_tc->c_elog_track.name); \
}
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:339

Definition at line 159 of file tcp_debug.h.

#define TCP_EVT_DELETE_HANDLER (   _tc,
  ... 
)
Value:
{ \
{ \
.format = "delete: %d", \
.format_args = "i4", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->c_c_index; \
}
#define TCP_EVT_DEALLOC_HANDLER(_tc,...)
Definition: tcp_debug.h:159
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 224 of file tcp_debug.h.

#define TCP_EVT_DUPACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 773 of file tcp_debug.h.

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

Definition at line 772 of file tcp_debug.h.

#define TCP_EVT_FIN_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 398 of file tcp_debug.h.

#define TCP_EVT_FIN_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 396 of file tcp_debug.h.

#define TCP_EVT_INIT_HANDLER (   _tc,
  _is_l,
  ... 
)
Value:
{ \
char *_fmt = _is_l ? "l[%d].%d:%d%c" : "[%d].%d:%d->.%d:%d%c"; \
if (_tc->c_is_ip4) \
{ \
_tc->c_elog_track.name = \
(char *) format (0, _fmt, _tc->c_thread_index, \
_tc->c_lcl_ip.ip4.as_u8[3], \
clib_net_to_host_u16(_tc->c_lcl_port), \
_tc->c_rmt_ip.ip4.as_u8[3], \
clib_net_to_host_u16(_tc->c_rmt_port), 0); \
} \
else \
_tc->c_elog_track.name = \
(char *) format (0, _fmt, _tc->c_thread_index, \
_tc->c_lcl_ip.ip6.as_u8[15], \
clib_net_to_host_u16(_tc->c_lcl_port), \
_tc->c_rmt_ip.ip6.as_u8[15], \
clib_net_to_host_u16(_tc->c_rmt_port), 0); \
}
vlib_main_t vlib_global_main
Definition: main.c:1644
word elog_track_register(elog_main_t *em, elog_track_t *t)
register an event track
Definition: elog.c:198
#define TCP_DBG_IP_TAG_LCL(_tc)
Definition: tcp_debug.h:99
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:419
elog_main_t elog_main
Definition: main.h:158
#define TCP_DBG_IP_TAG_RMT(_tc)
Definition: tcp_debug.h:117

Definition at line 135 of file tcp_debug.h.

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

Definition at line 589 of file tcp_debug.h.

#define TCP_EVT_OPEN_HANDLER (   _tc,
  ... 
)
Value:
{ \
{ \
.format = "open: index %d", \
.format_args = "i4", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->c_c_index; \
}
#define TCP_EVT_INIT_HANDLER(_tc, _is_l,...)
Definition: tcp_debug.h:135
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 164 of file tcp_debug.h.

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

Definition at line 621 of file tcp_debug.h.

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

Definition at line 473 of file tcp_debug.h.

#define TCP_EVT_PKTIZE_HANDLER (   _tc,
  ... 
)

Definition at line 588 of file tcp_debug.h.

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

Definition at line 475 of file tcp_debug.h.

#define TCP_EVT_RST_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 399 of file tcp_debug.h.

#define TCP_EVT_RST_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 397 of file tcp_debug.h.

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

Definition at line 472 of file tcp_debug.h.

#define TCP_EVT_SND_WND_HANDLER (   _tc,
  ... 
)

Definition at line 620 of file tcp_debug.h.

#define TCP_EVT_STATE_CHANGE_HANDLER (   _tc,
  ... 
)

Definition at line 400 of file tcp_debug.h.

#define TCP_EVT_SYN_RCVD_HANDLER (   _tc,
  _init,
  ... 
)
Value:
{ \
if (_init) \
{ \
.format = "syn-rx: irs %u", \
.format_args = "i4", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->irs; \
}
#define TCP_EVT_INIT_HANDLER(_tc, _is_l,...)
Definition: tcp_debug.h:135
#define TCP_EVT_STATE_CHANGE_HANDLER(_tc,...)
Definition: tcp_debug.h:400
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 198 of file tcp_debug.h.

#define TCP_EVT_SYN_RXT_HANDLER (   _tc,
  ... 
)

Definition at line 395 of file tcp_debug.h.

#define TCP_EVT_SYN_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 392 of file tcp_debug.h.

#define TCP_EVT_SYNACK_RCVD_HANDLER (   _tc,
  ... 
)

Definition at line 394 of file tcp_debug.h.

#define TCP_EVT_SYNACK_SENT_HANDLER (   _tc,
  ... 
)

Definition at line 393 of file tcp_debug.h.

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

Definition at line 590 of file tcp_debug.h.

#define TCP_EVT_UNBIND_HANDLER (   _tc,
  ... 
)
Value:
{ \
{ \
.format = "unbind: listener %d", \
}; \
DECLARE_ETD(_tc, _e, 1); \
ed->data[0] = _tc->c_c_index; \
}
#define TCP_EVT_DEALLOC_HANDLER(_tc,...)
Definition: tcp_debug.h:159
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define DECLARE_ETD(_tc, _e, _size)
Definition: tcp_debug.h:91

Definition at line 212 of file tcp_debug.h.

#define TRANSPORT_DEBUG   (1)

Definition at line 83 of file tcp_debug.h.

Typedef Documentation

typedef enum _tcp_dbg tcp_dbg_e
typedef enum _tcp_dbg_evt tcp_dbg_evt_e