From 2961dfda406df702606b31b03dd30a1683f92e7c Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Wed, 14 Aug 2019 19:12:17 -0700 Subject: devices: VPP crash when doing packet trace dump VPP recycles the graph node index when the interface is deleted. Most tx graph nodes have format_tx_function. tapcli does not. If tapcli happens to recycle a tx graph node index which has format_tx_function, problem will arise when showing the trace buffer which was collected for the node index that tapcli recycles. The fix is nothing fantasy, just add a format_tx_trace function which does nothing in case it it called. tapcli is deprecated in 19.04. There is no need to cherrypick this to later releases. Type: fix Ticket: VPP-1742 Signed-off-by: Steven Luong Change-Id: I010b3f35e59a474cb134a8b1bc718c242e3aa93c --- src/vnet/unix/tapcli.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vnet/unix/tapcli.c b/src/vnet/unix/tapcli.c index b4df8e84fe4..81725a91a23 100644 --- a/src/vnet/unix/tapcli.c +++ b/src/vnet/unix/tapcli.c @@ -753,6 +753,13 @@ tapcli_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return 0; } +u8 * +format_tapcli_tx_trace (u8 * s, va_list * va) +{ + s = format (s, "tapcli tx trace is not supported"); + return s; +} + /* *INDENT-OFF* */ VNET_DEVICE_CLASS (tapcli_dev_class,static) = { .name = "tapcli", @@ -761,6 +768,7 @@ VNET_DEVICE_CLASS (tapcli_dev_class,static) = { .rx_redirect_to_node = tapcli_set_interface_next_node, .name_renumber = tap_name_renumber, .admin_up_down_function = tapcli_interface_admin_up_down, + .format_tx_trace = format_tapcli_tx_trace, }; /* *INDENT-ON* */ -- cgit 1.2.3-korg