aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_octeon/port.c
diff options
context:
space:
mode:
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;