Accumulate ifq_drops into if_oqdrops if if_start().
authoruebayasi <uebayasi@openbsd.org>
Mon, 5 Oct 2015 15:39:01 +0000 (15:39 +0000)
committeruebayasi <uebayasi@openbsd.org>
Mon, 5 Oct 2015 15:39:01 +0000 (15:39 +0000)
mpi@ questioned usefulness of if_snd.ifq_drops, but this is what exists now.
This area is going to be readily polished.

OK dlg@

sys/net/if.c

index e6a48dd..9fc4056 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if.c,v 1.382 2015/09/30 11:33:51 dlg Exp $    */
+/*     $OpenBSD: if.c,v 1.383 2015/10/05 15:39:01 uebayasi Exp $       */
 /*     $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $  */
 
 /*
@@ -542,6 +542,8 @@ if_start(struct ifnet *ifp)
                        CLR(ifp->if_xflags, IFXF_TXREADY);
                }
                ifp->if_start(ifp);
+               ifp->if_oqdrops += ifp->if_snd.ifq_drops;
+               ifp->if_snd.ifq_drops = 0;
                return;
        }