quic: fix show session verbose
Proprely display quic connections in show session verbose, and add a
small fix for UDPC listeners and UDP sessions formatting.
Change-Id: I33f83e77bf357347623d87ad23c483aba60a9bb2
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Type: feature
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index d839532..ca4b8c1 100755
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -68,7 +68,8 @@
if (verbose == 1)
{
u8 post_accept = ss->session_state >= SESSION_STATE_ACCEPTING;
- u8 hasf = post_accept | session_tx_is_dgram (ss);
+ u8 hasf = post_accept
+ || session_transport_service_type (ss) == TRANSPORT_SERVICE_CL;
u32 rxf, txf;
rxf = hasf ? svm_fifo_max_dequeue (ss->rx_fifo) : 0;
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 1a4431b..7dd0d2a 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -216,7 +216,7 @@
if (verbose)
{
if (verbose == 1)
- s = format (s, "%-15s\n", "-");
+ s = format (s, "%-15s", "-");
else
s = format (s, "\n");
}
@@ -249,9 +249,9 @@
{
u32 tci = va_arg (*args, u32);
u32 __clib_unused thread_index = va_arg (*args, u32);
- u32 __clib_unused verbose = va_arg (*args, u32);
+ u32 verbose = va_arg (*args, u32);
udp_connection_t *uc = udp_listener_get (tci);
- return format (s, "%U", format_udp_connection, uc);
+ return format (s, "%U", format_udp_connection, uc, verbose);
}
u16