aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/port.c
diff options
context:
space:
mode:
authorMonendra Singh Kushwaha <kmonendra@marvell.com>2024-05-16 14:15:40 +0530
committerDamjan Marion <dmarion@0xa5.net>2024-06-10 12:54:36 +0000
commitb26b2bcd43500f2cf8b988874c7e0feb29e99afa (patch)
treeadc90be2d35acf0bcca71f4da0b875b012c3ccfa /src/plugins/dev_octeon/port.c
parentafd03ffff561b05ab5e9f4be8bfe5630283028ad (diff)
octeon: add counters support for port and queue
Type: feature Change-Id: I5d52d78a93c7d0a12b9cee16fe7ebabdc2b19f0a Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Diffstat (limited to 'src/plugins/dev_octeon/port.c')
-rw-r--r--src/plugins/dev_octeon/port.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/dev_octeon/port.c b/src/plugins/dev_octeon/port.c
index 0bbada8ecc1..a53fa256884 100644
--- a/src/plugins/dev_octeon/port.c
+++ b/src/plugins/dev_octeon/port.c
@@ -124,6 +124,8 @@ oct_port_init (vlib_main_t *vm, vnet_dev_port_t *port)
return rv;
}
+ oct_port_add_counters (vm, port);
+
return VNET_DEV_OK;
}
@@ -172,6 +174,21 @@ oct_port_poll (vlib_main_t *vm, vnet_dev_port_t *port)
vnet_dev_port_state_changes_t changes = {};
int rrv;
+ if (oct_port_get_stats (vm, port))
+ return;
+
+ foreach_vnet_dev_port_rx_queue (q, port)
+ {
+ if (oct_rxq_get_stats (vm, port, q))
+ return;
+ }
+
+ foreach_vnet_dev_port_tx_queue (q, port)
+ {
+ if (oct_txq_get_stats (vm, port, q))
+ return;
+ }
+
if (roc_nix_is_lbk (nix))
{
link_info.status = 1;