summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/format.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-09-28 12:25:22 -0700
committerDamjan Marion <dmarion@me.com>2020-09-29 09:00:26 +0000
commit8b388e35b2aeca39c277453337751d14aeba0d40 (patch)
tree5f745cdd4e63f915726b23b0fd940fbcd30e1a2d /src/plugins/avf/format.c
parent4537c30925050ffa34c33e6a481f07f1ec0a01ff (diff)
avf: validate queue size config
Check CLI queue size is within the range of 64 and 4096 Enhance show hardware to display queue size and number of queues. Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I360e3cdb2e69e4ea7380ed924e71a5ae84ed4b64
Diffstat (limited to 'src/plugins/avf/format.c')
-rw-r--r--src/plugins/avf/format.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c
index e5da0e2bbf6..2c4eaf79041 100644
--- a/src/plugins/avf/format.c
+++ b/src/plugins/avf/format.c
@@ -90,8 +90,16 @@ format_avf_device (u8 * s, va_list * args)
avf_device_t *ad = avf_get_device (i);
u32 indent = format_get_indent (s);
u8 *a = 0;
-
- s = format (s, "flags: %U", format_avf_device_flags, ad);
+ avf_rxq_t *rxq = vec_elt_at_index (ad->rxqs, 0);
+ avf_txq_t *txq = vec_elt_at_index (ad->txqs, 0);
+
+ s = format (s, "rx: queues %u, desc %u (min %u max %u)", ad->n_rx_queues,
+ rxq->size, AVF_QUEUE_SZ_MIN, AVF_QUEUE_SZ_MAX);
+ s = format (s, "\n%Utx: queues %u, desc %u (min %u max %u)",
+ format_white_space, indent, ad->n_tx_queues, txq->size,
+ AVF_QUEUE_SZ_MIN, AVF_QUEUE_SZ_MAX);
+ s = format (s, "\n%Uflags: %U", format_white_space, indent,
+ format_avf_device_flags, ad);
s = format (s, "\n%Uoffload features: %U", format_white_space, indent,
format_avf_vf_cap_flags, ad->feature_bitmap);