summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/format.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-13 17:33:32 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-11-16 16:01:35 +0000
commit69768d99eed0f44f6955370cb1ad83b8b73e5368 (patch)
tree00c689be86b41fe36aae2a9e6e0d3422e1272d81 /src/vnet/dev/format.c
parentf3be34e4433bb86509044290fa3cced543697a31 (diff)
dev: device and port specific args
Type: improvement Change-Id: I26124a50d8e05d6f01a2e6dbc4bc8183fb5a09c4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/dev/format.c')
-rw-r--r--src/vnet/dev/format.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/vnet/dev/format.c b/src/vnet/dev/format.c
index 8816c0e552c..944da0698ea 100644
--- a/src/vnet/dev/format.c
+++ b/src/vnet/dev/format.c
@@ -2,9 +2,6 @@
* Copyright (c) 2023 Cisco Systems, Inc.
*/
-#include "vlib/pci/pci.h"
-#include "vnet/dev/counters.h"
-#include "vppinfra/error.h"
#include <vnet/vnet.h>
#include <vnet/dev/dev.h>
#include <vnet/dev/counters.h>
@@ -75,9 +72,14 @@ format_vnet_dev_info (u8 *s, va_list *args)
s = format (s, "\n%UAssigned process node is '%U'", format_white_space,
indent, format_vlib_node_name, vm, dev->process_node_index);
+ if (dev->args)
+ s = format (s, "\n%UDevice Specific Arguments:\n%U%U", format_white_space,
+ indent, format_white_space, indent + 2, format_vnet_dev_args,
+ dev->args);
if (dev->ops.format_info)
- s = format (s, "\n%U%U", format_white_space, indent, dev->ops.format_info,
- a, dev);
+ s =
+ format (s, "\n%UDevice Specific Info:\n%U%U", format_white_space, indent,
+ format_white_space, indent + 2, dev->ops.format_info, a, dev);
return s;
}
@@ -121,8 +123,13 @@ format_vnet_dev_port_info (u8 *s, va_list *args)
format_white_space, indent, port->max_rx_frame_size,
port->attr.max_supported_rx_frame_size);
if (port->port_ops.format_status)
- s = format (s, "\n%U%U", format_white_space, indent,
+ s = format (s, "\n%UDevice Specific Port Status:\n%U%U",
+ format_white_space, indent, format_white_space, indent + 2,
port->port_ops.format_status, a, port);
+ if (port->args)
+ s = format (s, "\n%UDevice Specific Port Arguments:\n%U%U",
+ format_white_space, indent, format_white_space, indent + 2,
+ format_vnet_dev_args, port->args);
s = format (s, "\n%UInterface ", format_white_space, indent);
if (port->interface_created)