Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2014 07:43:39 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272242 - head/sys/net
Message-ID:  <201409280743.s8S7hdXs077482@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Sun Sep 28 07:43:38 2014
New Revision: 272242
URL: http://svnweb.freebsd.org/changeset/base/272242

Log:
  Convert to if_inc_counter() last remnantes of bare access to struct ifnet
  counters.

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Sun Sep 28 07:40:26 2014	(r272241)
+++ head/sys/net/if_lagg.c	Sun Sep 28 07:43:38 2014	(r272242)
@@ -1485,7 +1485,7 @@ lagg_transmit(struct ifnet *ifp, struct 
 	if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) {
 		LAGG_RUNLOCK(sc, &tracker);
 		m_freem(m);
-		ifp->if_oerrors++;
+		if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
 		return (ENXIO);
 	}
 
@@ -1495,7 +1495,7 @@ lagg_transmit(struct ifnet *ifp, struct 
 	LAGG_RUNLOCK(sc, &tracker);
 
 	if (error != 0)
-		ifp->if_oerrors++;
+		if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
 
 	return (error);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409280743.s8S7hdXs077482>