Date: Tue, 24 Sep 2024 10:04:21 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: aa7d086ad946 - main - e1000: Add sysctls for some missing MAC stats Message-ID: <202409241004.48OA4Laa058834@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=aa7d086ad94642fa40375db9976177fc9e54a2cf commit aa7d086ad94642fa40375db9976177fc9e54a2cf Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2024-09-24 09:39:33 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2024-09-24 10:00:18 +0000 e1000: Add sysctls for some missing MAC stats MFC after: 1 week Sponsored by: Blue Box Systems --- sys/dev/e1000/if_em.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e2d8535143ef..5fb46c9f6dce 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4304,6 +4304,10 @@ em_update_stats_counters(struct e1000_softc *sc) sc->stats.roc += E1000_READ_REG(&sc->hw, E1000_ROC); sc->stats.rjc += E1000_READ_REG(&sc->hw, E1000_RJC); + sc->stats.mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC); + sc->stats.mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC); + sc->stats.mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC); + sc->stats.tor += E1000_READ_REG(&sc->hw, E1000_TORH); sc->stats.tot += E1000_READ_REG(&sc->hw, E1000_TOTH); @@ -4520,6 +4524,9 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &sc->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &sc->stats.rnbc, "Receive No Buffers"); @@ -4560,6 +4567,18 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &sc->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409241004.48OA4Laa058834>