Date: Mon, 15 Sep 2014 14:56:53 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: "Alexander V. Chernikov" <melifaro@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r271538 - head/sys/net Message-ID: <20140915105653.GR60617@FreeBSD.org> In-Reply-To: <201409131813.s8DID8vR061538@svn.freebsd.org> References: <201409131813.s8DID8vR061538@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140915105653.GR60617>
