From owner-svn-src-head@FreeBSD.ORG Wed Mar 19 06:08:03 2014 Return-Path: Delivered-To: svn-src-head@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 EA66BB16; Wed, 19 Mar 2014 06:08:03 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D80507CF; Wed, 19 Mar 2014 06:08:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2J683ob069413; Wed, 19 Mar 2014 06:08:03 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2J68370069412; Wed, 19 Mar 2014 06:08:03 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201403190608.s2J68370069412@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 19 Mar 2014 06:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263333 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Mar 2014 06:08:04 -0000 Author: glebius Date: Wed Mar 19 06:08:03 2014 New Revision: 263333 URL: http://svnweb.freebsd.org/changeset/base/263333 Log: When exporting ifnet via sysctl, add ifqueue(9) drop count to the ifi_oqdrops. This is a temporary workaround until ifqueue(9) vanishes. While here, remove the pointless ifi_vhid assignment. It has sense only when we are exporting ifaddrs, not ifnets. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Wed Mar 19 06:03:26 2014 (r263332) +++ head/sys/net/rtsock.c Wed Mar 19 06:08:03 2014 (r263333) @@ -1598,9 +1598,8 @@ sysctl_iflist_ifml(struct ifnet *ifp, st *ifd = ifp->if_data; - /* Fixup if_data carp(4) vhid. */ - if (carp_get_vhid_p != NULL) - ifd->ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + /* Some drivers still use ifqueue(9), add its stats. */ + ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); } @@ -1633,9 +1632,9 @@ sysctl_iflist_ifm(struct ifnet *ifp, str } *ifd = ifp->if_data; - /* Fixup if_data carp(4) vhid. */ - if (carp_get_vhid_p != NULL) - ifd->ifi_vhid = (*carp_get_vhid_p)(ifp->if_addr); + + /* Some drivers still use ifqueue(9), add its stats. */ + ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; return (SYSCTL_OUT(w->w_req, (caddr_t)ifm, len)); }