git: 09526a771afc - main - igc: Add sysctls for some missing MAC stats
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Oct 2024 13:08:22 UTC
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=09526a771afc411e641a3d04c905824fe8afc627 commit 09526a771afc411e641a3d04c905824fe8afc627 Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2024-10-14 13:07:41 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2024-10-14 13:07:41 +0000 igc: Add sysctls for some missing MAC stats MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index da897d636cfe..b927b9e3b260 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -2491,6 +2491,10 @@ igc_update_stats_counters(struct igc_adapter *adapter) adapter->stats.roc += IGC_READ_REG(&adapter->hw, IGC_ROC); adapter->stats.rjc += IGC_READ_REG(&adapter->hw, IGC_RJC); + adapter->stats.mgprc += IGC_READ_REG(&adapter->hw, IGC_MGTPRC); + adapter->stats.mgpdc += IGC_READ_REG(&adapter->hw, IGC_MGTPDC); + adapter->stats.mgptc += IGC_READ_REG(&adapter->hw, IGC_MGTPTC); + adapter->stats.tor += IGC_READ_REG(&adapter->hw, IGC_TORH); adapter->stats.tot += IGC_READ_REG(&adapter->hw, IGC_TOTH); @@ -2731,6 +2735,9 @@ igc_add_hw_stats(struct igc_adapter *adapter) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &adapter->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &adapter->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &adapter->stats.rnbc, "Receive No Buffers"); @@ -2767,6 +2774,18 @@ igc_add_hw_stats(struct igc_adapter *adapter) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &adapter->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &adapter->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &adapter->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &adapter->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &adapter->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd",