From owner-svn-src-all@FreeBSD.ORG Tue Oct 21 01:14:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A4849A9; Tue, 21 Oct 2014 01:14:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C282782; Tue, 21 Oct 2014 01:14:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9L1EwFj021193; Tue, 21 Oct 2014 01:14:58 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9L1Eva9021187; Tue, 21 Oct 2014 01:14:57 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201410210114.s9L1Eva9021187@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Tue, 21 Oct 2014 01:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273357 - in stable/10/sys/dev: alc ale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 01:14:58 -0000 Author: yongari Date: Tue Oct 21 01:14:56 2014 New Revision: 273357 URL: https://svnweb.freebsd.org/changeset/base/273357 Log: MFC r272721: Fix a long standing bug in MAC statistics register access. One additional register was erroneously added in the MAC register set such that 7 TX statistics counters were wrong. Modified: stable/10/sys/dev/alc/if_alc.c stable/10/sys/dev/alc/if_alcreg.h stable/10/sys/dev/ale/if_ale.c stable/10/sys/dev/ale/if_alereg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/alc/if_alc.c ============================================================================== --- stable/10/sys/dev/alc/if_alc.c Tue Oct 21 01:06:58 2014 (r273356) +++ stable/10/sys/dev/alc/if_alc.c Tue Oct 21 01:14:56 2014 (r273357) @@ -1286,8 +1286,6 @@ alc_sysctl_node(struct alc_softc *sc) &stats->tx_late_colls, "Late collisions"); ALC_SYSCTL_STAT_ADD32(ctx, child, "excess_colls", &stats->tx_excess_colls, "Excessive collisions"); - ALC_SYSCTL_STAT_ADD32(ctx, child, "abort", - &stats->tx_abort, "Aborted frames due to Excessive collisions"); ALC_SYSCTL_STAT_ADD32(ctx, child, "underruns", &stats->tx_underrun, "FIFO underruns"); ALC_SYSCTL_STAT_ADD32(ctx, child, "desc_underruns", @@ -2603,7 +2601,6 @@ alc_stats_update(struct alc_softc *sc) stat->tx_multi_colls += smb->tx_multi_colls; stat->tx_late_colls += smb->tx_late_colls; stat->tx_excess_colls += smb->tx_excess_colls; - stat->tx_abort += smb->tx_abort; stat->tx_underrun += smb->tx_underrun; stat->tx_desc_underrun += smb->tx_desc_underrun; stat->tx_lenerrs += smb->tx_lenerrs; @@ -2616,7 +2613,7 @@ alc_stats_update(struct alc_softc *sc) ifp->if_collisions += smb->tx_single_colls + smb->tx_multi_colls * 2 + smb->tx_late_colls + - smb->tx_abort * HDPX_CFG_RETRY_DEFAULT; + smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT; /* * XXX @@ -2625,8 +2622,8 @@ alc_stats_update(struct alc_softc *sc) * the counter name is not correct one so I've removed the * counter in output errors. */ - ifp->if_oerrors += smb->tx_abort + smb->tx_late_colls + - smb->tx_underrun; + ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + + smb->tx_underrun + smb->tx_pkts_truncated; ifp->if_ipackets += smb->rx_frames; Modified: stable/10/sys/dev/alc/if_alcreg.h ============================================================================== --- stable/10/sys/dev/alc/if_alcreg.h Tue Oct 21 01:06:58 2014 (r273356) +++ stable/10/sys/dev/alc/if_alcreg.h Tue Oct 21 01:14:56 2014 (r273357) @@ -860,7 +860,6 @@ struct smb { uint32_t tx_multi_colls; uint32_t tx_late_colls; uint32_t tx_excess_colls; - uint32_t tx_abort; uint32_t tx_underrun; uint32_t tx_desc_underrun; uint32_t tx_lenerrs; Modified: stable/10/sys/dev/ale/if_ale.c ============================================================================== --- stable/10/sys/dev/ale/if_ale.c Tue Oct 21 01:06:58 2014 (r273356) +++ stable/10/sys/dev/ale/if_ale.c Tue Oct 21 01:14:56 2014 (r273357) @@ -945,8 +945,6 @@ ale_sysctl_node(struct ale_softc *sc) &stats->tx_late_colls, "Late collisions"); ALE_SYSCTL_STAT_ADD32(ctx, child, "excess_colls", &stats->tx_excess_colls, "Excessive collisions"); - ALE_SYSCTL_STAT_ADD32(ctx, child, "abort", - &stats->tx_abort, "Aborted frames due to Excessive collisions"); ALE_SYSCTL_STAT_ADD32(ctx, child, "underruns", &stats->tx_underrun, "FIFO underruns"); ALE_SYSCTL_STAT_ADD32(ctx, child, "desc_underruns", @@ -2200,7 +2198,6 @@ ale_stats_update(struct ale_softc *sc) stat->tx_multi_colls += smb->tx_multi_colls; stat->tx_late_colls += smb->tx_late_colls; stat->tx_excess_colls += smb->tx_excess_colls; - stat->tx_abort += smb->tx_abort; stat->tx_underrun += smb->tx_underrun; stat->tx_desc_underrun += smb->tx_desc_underrun; stat->tx_lenerrs += smb->tx_lenerrs; @@ -2213,17 +2210,10 @@ ale_stats_update(struct ale_softc *sc) ifp->if_collisions += smb->tx_single_colls + smb->tx_multi_colls * 2 + smb->tx_late_colls + - smb->tx_abort * HDPX_CFG_RETRY_DEFAULT; + smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT; - /* - * XXX - * tx_pkts_truncated counter looks suspicious. It constantly - * increments with no sign of Tx errors. This may indicate - * the counter name is not correct one so I've removed the - * counter in output errors. - */ - ifp->if_oerrors += smb->tx_abort + smb->tx_late_colls + - smb->tx_underrun; + ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + + smb->tx_underrun + smb->tx_pkts_truncated; ifp->if_ipackets += smb->rx_frames; Modified: stable/10/sys/dev/ale/if_alereg.h ============================================================================== --- stable/10/sys/dev/ale/if_alereg.h Tue Oct 21 01:06:58 2014 (r273356) +++ stable/10/sys/dev/ale/if_alereg.h Tue Oct 21 01:14:56 2014 (r273357) @@ -605,7 +605,6 @@ struct smb { uint32_t tx_multi_colls; uint32_t tx_late_colls; uint32_t tx_excess_colls; - uint32_t tx_abort; uint32_t tx_underrun; uint32_t tx_desc_underrun; uint32_t tx_lenerrs;