diff options
author | Monendra Singh Kushwaha <kmonendra@marvell.com> | 2024-05-16 14:15:40 +0530 |
---|---|---|
committer | Monendra Singh Kushwaha <kmonendra@marvell.com> | 2024-06-10 18:50:42 +0000 |
commit | d8d3ad99af90fccac88a83a77f8676097568fb71 (patch) | |
tree | 46a00a9b75f662097a593ea7b3f4e627703729fb /src/plugins/dev_octeon/port.c | |
parent | 2f93a43118a368d1e6f9d83237f94a5c3c639448 (diff) |
octeon: add counters support for port and queue
Type: feature
Change-Id: I5d52d78a93c7d0a12b9cee16fe7ebabdc2b19f0a
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
(cherry picked from commit b26b2bcd43500f2cf8b988874c7e0feb29e99afa)
Diffstat (limited to 'src/plugins/dev_octeon/port.c')
-rw-r--r-- | src/plugins/dev_octeon/port.c | 17 |
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; |