Skip to content
Snippets Groups Projects
Commit 99d02dc4 authored by Amit Kumar's avatar Amit Kumar
Browse files

linux: pause frame stats increment

parent 9c0e9ecd
Branches
Tags
1 merge request!17linux: pause frame stats increment
Pipeline #138792 passed
...@@ -72,6 +72,7 @@ struct eth_rmon_stats { ...@@ -72,6 +72,7 @@ struct eth_rmon_stats {
uint64_t packets_256to511bytes; uint64_t packets_256to511bytes;
uint64_t packets_512to1023bytes; uint64_t packets_512to1023bytes;
uint64_t packets_1024to1518bytes; uint64_t packets_1024to1518bytes;
uint64_t pause_packets;
} tx, rx; } tx, rx;
}; };
......
...@@ -39,6 +39,8 @@ typedef enum { ...@@ -39,6 +39,8 @@ typedef enum {
iow_tx_fraglist_nr_frags_packets, iow_tx_fraglist_nr_frags_packets,
iow_tx_tso_packets, iow_tx_tso_packets,
iow_tx_tso_drop_packets, iow_tx_tso_drop_packets,
iow_tx_gso_packets,
iow_tx_gso_dropped_packets,
iow_rx_frame, iow_rx_frame,
iow_rx_bytes, iow_rx_bytes,
iow_rx_bytes_g, iow_rx_bytes_g,
...@@ -315,7 +317,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ...@@ -315,7 +317,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
ret = -1; ret = -1;
rmon->tx.packets = (uint64_t)g_linux_stats->data[iow_tx_packets]; rmon->tx.packets = (uint64_t)g_linux_stats->data[iow_tx_packets];
rmon->tx.bytes = (uint64_t)g_linux_stats->data[iow_tx_bytes]; rmon->tx.bytes = (uint64_t)g_linux_stats->data[iow_tx_byte];
rmon->tx.crc_err_packets = 0; rmon->tx.crc_err_packets = 0;
/* These two counters are marked zero because they dont /* These two counters are marked zero because they dont
* hold much relevancy to Customer * hold much relevancy to Customer
...@@ -328,6 +330,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ...@@ -328,6 +330,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon->tx.packets_256to511bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt256to511]; rmon->tx.packets_256to511bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt256to511];
rmon->tx.packets_512to1023bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt512to1023]; rmon->tx.packets_512to1023bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt512to1023];
rmon->tx.packets_1024to1518bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt1024tomax]; rmon->tx.packets_1024to1518bytes = (uint64_t)g_linux_stats->data[iow_tx_pkt1024tomax];
rmon->tx.pause_packets = (uint64_t)g_linux_stats->data[iow_tx_pause];
rmon->rx.bytes = (uint64_t)g_linux_stats->data[iow_rx_byte]; rmon->rx.bytes = (uint64_t)g_linux_stats->data[iow_rx_byte];
rmon->rx.packets = (uint64_t)g_linux_stats->data[iow_rx_packets]; rmon->rx.packets = (uint64_t)g_linux_stats->data[iow_rx_packets];
...@@ -338,6 +341,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ...@@ -338,6 +341,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon->rx.over_sz_packets = (uint64_t)g_linux_stats->data[iow_rx_oversize]; rmon->rx.over_sz_packets = (uint64_t)g_linux_stats->data[iow_rx_oversize];
rmon->rx.packets_64bytes = (uint64_t)g_linux_stats->data[iow_rx_pkt64]; rmon->rx.packets_64bytes = (uint64_t)g_linux_stats->data[iow_rx_pkt64];
rmon->rx.packets_65to127bytes = (uint64_t)g_linux_stats->data[iow_rx_pkt65to127]; rmon->rx.packets_65to127bytes = (uint64_t)g_linux_stats->data[iow_rx_pkt65to127];
rmon->rx.pause_packets = (uint64_t)g_linux_stats->data[iow_rx_pause];
free(g_linux_stats); free(g_linux_stats);
......
...@@ -214,6 +214,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ...@@ -214,6 +214,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon->tx.packets_256to511bytes = g_mtk_stat.data[iow_TxPktSz256To511]; rmon->tx.packets_256to511bytes = g_mtk_stat.data[iow_TxPktSz256To511];
rmon->tx.packets_512to1023bytes = g_mtk_stat.data[iow_TxPktSz512To1023]; rmon->tx.packets_512to1023bytes = g_mtk_stat.data[iow_TxPktSz512To1023];
rmon->tx.packets_1024to1518bytes = g_mtk_stat.data[iow_Tx1024ToMax]; rmon->tx.packets_1024to1518bytes = g_mtk_stat.data[iow_Tx1024ToMax];
rmon->tx.pause_packets = g_mtk_stat.data[iow_TxPause];
rmon->rx.bytes = g_mtk_stat.data[iow_RxBytes]; rmon->rx.bytes = g_mtk_stat.data[iow_RxBytes];
rmon->rx.packets = g_mtk_stat.data[iow_rx_packets]; rmon->rx.packets = g_mtk_stat.data[iow_rx_packets];
...@@ -228,6 +229,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ...@@ -228,6 +229,7 @@ int mtk_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon)
rmon->rx.packets_256to511bytes = g_mtk_stat.data[iow_RxPktSz256To511]; rmon->rx.packets_256to511bytes = g_mtk_stat.data[iow_RxPktSz256To511];
rmon->rx.packets_512to1023bytes = g_mtk_stat.data[iow_RxPktSz512To1023]; rmon->rx.packets_512to1023bytes = g_mtk_stat.data[iow_RxPktSz512To1023];
rmon->rx.packets_1024to1518bytes = g_mtk_stat.data[iow_RxPktSz1024ToMax]; rmon->rx.packets_1024to1518bytes = g_mtk_stat.data[iow_RxPktSz1024ToMax];
rmon->tx.pause_packets = g_mtk_stat.data[iow_RxPause];
return ret; return ret;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment