Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/net/lib/libvirtif Count packets in if_virt



details:   https://anonhg.NetBSD.org/src/rev/693f08d17581
branches:  trunk
changeset: 331356:693f08d17581
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Sat Aug 09 09:47:02 2014 +0000

description:
Count packets in if_virt

diffstat:

 sys/rump/net/lib/libvirtif/if_virt.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r b07d90484b64 -r 693f08d17581 sys/rump/net/lib/libvirtif/if_virt.c
--- a/sys/rump/net/lib/libvirtif/if_virt.c      Sat Aug 09 09:43:49 2014 +0000
+++ b/sys/rump/net/lib/libvirtif/if_virt.c      Sat Aug 09 09:47:02 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $       */
+/*     $NetBSD: if_virt.c,v 1.48 2014/08/09 09:47:02 ozaki-r Exp $     */
 
 /*
  * Copyright (c) 2008, 2013 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.48 2014/08/09 09:47:02 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -310,6 +310,7 @@
                VIFHYPER_SEND(sc->sc_viu, io, i);
 
                m_freem(m0);
+               ifp->if_opackets++;
        }
 
        ifp->if_flags &= ~IFF_OACTIVE;
@@ -372,6 +373,7 @@
        }
 
        if (passup) {
+               ifp->if_ipackets++;
                m->m_pkthdr.rcvif = ifp;
                KERNEL_LOCK(1, NULL);
                bpf_mtap(ifp, m);



Home | Main Index | Thread Index | Old Index