From owner-svn-src-all@FreeBSD.ORG Mon Sep 15 10:56:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1373015D; Mon, 15 Sep 2014 10:56:57 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AF25FA7; Mon, 15 Sep 2014 10:56:55 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8FAurtl076682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Sep 2014 14:56:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8FAurI8076681; Mon, 15 Sep 2014 14:56:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 15 Sep 2014 14:56:53 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r271538 - head/sys/net Message-ID: <20140915105653.GR60617@FreeBSD.org> References: <201409131813.s8DID8vR061538@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409131813.s8DID8vR061538@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org 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: Mon, 15 Sep 2014 10:56:57 -0000 On Sat, Sep 13, 2014 at 06:13:08PM +0000, Alexander V. Chernikov wrote: A> @@ -1099,15 +1117,39 @@ vlan_transmit(struct ifnet *ifp, struct A> * Send it, precisely as ether_output() would have. A> */ A> error = (p->if_transmit)(p, m); A> - if (!error) { A> - ifp->if_opackets++; A> - ifp->if_omcasts += mcast; A> - ifp->if_obytes += len; A> + if (error == 0) { A> + counter_u64_add(ifv->ifv_opackets, 1); A> + counter_u64_add(ifv->ifv_obytes, len); A> + counter_u64_add(ifv->ifv_omcasts, 1); A> } else A> ifp->if_oerrors++; A> return (error); A> } This looks like counting all packets as multicasts. Strange that compiler didn't warn you about write only variable. P.S. Why did you decide to keep if_oerrors old style? -- Totus tuus, Glebius.