diff --git a/ethernet.h b/ethernet.h index b08fdeda90ca17c0e8bd30247ebe71ec2eed951a..02163ea9efd4324b0d21007970d7258e1e8d983b 100644 --- a/ethernet.h +++ b/ethernet.h @@ -72,6 +72,7 @@ struct eth_rmon_stats { uint64_t packets_256to511bytes; uint64_t packets_512to1023bytes; uint64_t packets_1024to1518bytes; + uint64_t pause_packets; } tx, rx; }; diff --git a/linux/linux/linux_eth.c b/linux/linux/linux_eth.c index 942d03d49db604bb72d76e77bee160667c76fb5b..5d27550180c9db387ceddfe2a4db533b9d4d8e07 100644 --- a/linux/linux/linux_eth.c +++ b/linux/linux/linux_eth.c @@ -39,6 +39,8 @@ typedef enum { iow_tx_fraglist_nr_frags_packets, iow_tx_tso_packets, iow_tx_tso_drop_packets, + iow_tx_gso_packets, + iow_tx_gso_dropped_packets, iow_rx_frame, iow_rx_bytes, iow_rx_bytes_g, @@ -315,7 +317,7 @@ int linux_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rmon) ret = -1; 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; /* These two counters are marked zero because they dont * hold much relevancy to Customer @@ -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_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.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.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) 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_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); diff --git a/linux/mtk/mtk_eth.c b/linux/mtk/mtk_eth.c index 0f32fad6b7ab3ccc41baec9ba9bbad6a16aeeb2b..abed7ec8efc2d3ac47a3fe244477dbfa606d1af3 100644 --- a/linux/mtk/mtk_eth.c +++ b/linux/mtk/mtk_eth.c @@ -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_512to1023bytes = g_mtk_stat.data[iow_TxPktSz512To1023]; 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.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) rmon->rx.packets_256to511bytes = g_mtk_stat.data[iow_RxPktSz256To511]; rmon->rx.packets_512to1023bytes = g_mtk_stat.data[iow_RxPktSz512To1023]; rmon->rx.packets_1024to1518bytes = g_mtk_stat.data[iow_RxPktSz1024ToMax]; + rmon->tx.pause_packets = g_mtk_stat.data[iow_RxPause]; return ret; }