git: 1dae98bc4bfd - stable/14 - igc: Add sysctls for some missing MAC stats
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Oct 2024 15:11:12 UTC
The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1dae98bc4bfdcdfa389e9b41098421316a26c87e commit 1dae98bc4bfdcdfa389e9b41098421316a26c87e Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2024-10-14 13:07:41 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2024-10-21 15:09:51 +0000 igc: Add sysctls for some missing MAC stats Sponsored by: BBOX.io (cherry picked from commit 09526a771afc411e641a3d04c905824fe8afc627) --- 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",