session: make session code compile with SESSION_DEBUG enable 80/37380/3
authorSteven Luong <sluong@cisco.com>
Mon, 10 Oct 2022 18:37:57 +0000 (11:37 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 13 Oct 2022 18:25:46 +0000 (18:25 +0000)
commit10e5b4a016061f2d9485ff309d1239abb012aae0
treecdb9a68c3badf5f5ca1edea27e08300cba986507
parentaf36e96d07911f26e8e36f59ea2319cb5c13c0ad
session: make session code compile with SESSION_DEBUG enable

Session debug code does not compile anymore due to vlib_mains global
variable disappearing over time. Replace it with vlib_get_main_by_index
call.

Add a cmake variable and pass it from make command line to enable
session debug. Notice transport debug is required for session debug.

make rebuild VPP_EXTRA_CMAKE_ARGS=-DVPP_TCP_DEBUG_ALWAYS=ON VPP_EXTRA_CMAKE_ARGS+=-DVPP_SESSION_DEBUG=ON

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic2e887c6b10b77cbabd56934f4931fcfa04a6751
src/vnet/session/session_debug.c
src/vnet/session/session_debug.h
src/vpp/vnet/config.h.in