From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 16:44:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AE00B86; Thu, 18 Sep 2014 16:44:29 +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 D077633E; Thu, 18 Sep 2014 16:44:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IGiSu3038126; Thu, 18 Sep 2014 16:44:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IGiSXC038125; Thu, 18 Sep 2014 16:44:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409181644.s8IGiSXC038125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 18 Sep 2014 16:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271786 - head/sys/compat/linprocfs X-SVN-Group: head 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: Thu, 18 Sep 2014 16:44:29 -0000 Author: glebius Date: Thu Sep 18 16:44:28 2014 New Revision: 271786 URL: http://svnweb.freebsd.org/changeset/base/271786 Log: - Use if_get_counter() to fetch ifnet statistics. - Report IFCOUNTER_OQDROPS to linprocfs. Wasn't there before. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Thu Sep 18 16:38:03 2014 (r271785) +++ head/sys/compat/linprocfs/linprocfs.c Thu Sep 18 16:44:28 2014 (r271786) @@ -1139,26 +1139,26 @@ linprocfs_donetdev(PFS_FILL_ARGS) linux_ifname(ifp, ifname, sizeof ifname); sbuf_printf(sb, "%6.6s: ", ifname); sbuf_printf(sb, "%7ju %7ju %4ju %4ju %4lu %5lu %10lu %9ju ", - (uintmax_t )ifp->if_ibytes, /* rx_bytes */ - (uintmax_t )ifp->if_ipackets, /* rx_packets */ - (uintmax_t )ifp->if_ierrors, /* rx_errors */ - (uintmax_t )ifp->if_iqdrops, /* rx_dropped + - * rx_missed_errors */ + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_IBYTES), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_IERRORS), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_IQDROPS), + /* rx_missed_errors */ 0UL, /* rx_fifo_errors */ 0UL, /* rx_length_errors + * rx_over_errors + * rx_crc_errors + * rx_frame_errors */ 0UL, /* rx_compressed */ - (uintmax_t )ifp->if_imcasts); /* multicast, - * XXX-BZ rx only? */ + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_IMCASTS)); + /* XXX-BZ rx only? */ sbuf_printf(sb, "%8ju %7ju %4ju %4lu %4lu %5ju %7lu %10lu\n", - (uintmax_t )ifp->if_obytes, /* tx_bytes */ - (uintmax_t )ifp->if_opackets, /* tx_packets */ - (uintmax_t )ifp->if_oerrors, /* tx_errors */ - 0UL, /* tx_dropped */ + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_OBYTES), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_OERRORS), + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_OQDROPS), 0UL, /* tx_fifo_errors */ - (uintmax_t )ifp->if_collisions, /* collisions */ + (uintmax_t )ifp->if_get_counter(ifp, IFCOUNTER_COLLISIONS), 0UL, /* tx_carrier_errors + * tx_aborted_errors + * tx_window_errors +