travelping / upg-vpp

User Plane Gateway (UPG) based on VPP
Apache License 2.0
150 stars 51 forks source link

[WiP] Add trajectory tracing for debug builds and E2E_GDBSERVER option #275

Closed ivan4th closed 2 years ago

ivan4th commented 2 years ago

This enables VPP trajectory tracing facility in debug builds of UPG-VPP, which makes it possible to see the exact path of a buffer across the graph, regardless of normal packet tracing, and also in an event of crash. Example use:

(gdb) print gdb_dump_trajectory_trace (vlib_get_buffer_index (vlib_get_main(), b))
  VPP: Context trace for bi 2640185 b 0x100a124e40, visited 12  pid=14934 what=stdout
  VPP: ethernet-input (681)
  VPP: ip4-input (615)
  VPP: ip4-sv-reassembly-feature (602)
  VPP: nat-pre-out2in (114)
  VPP: nat44-ed-out2in (116)
  VPP: ip4-lookup (631)
  VPP: upf-ip4-session-dpo (44)
  VPP: upf-ip4-flow-process (52)
  VPP: upf-ip4-classify (50)
  VPP: upf-ip4-proxy-input (38)
  VPP: tcp4-input (477)
  VPP: tcp4-reset (489)

Also, this adds E2E_GDBSERVER option for e2e tests that makes it possible to start VPP under interactive gdb control from the beginning, which is important for many debugging scenarios.

Both changes require vpp-base update, which enables the trajectory tracing facility for debug builds and also includes gdbserver in the dev image: travelping/vpp-base#8

sergeymatov commented 2 years ago

@ivan4th could you please remove WIP prefix of commit so we can proceed with this PR?