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/libshmif Count packets in if_shmem



details:   https://anonhg.NetBSD.org/src/rev/5895f3be66f6
branches:  trunk
changeset: 798116:5895f3be66f6
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Sat Aug 09 09:43:49 2014 +0000

description:
Count packets in if_shmem

ok @pooka

diffstat:

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

diffs (34 lines):

diff -r 0a82ae1f7e81 -r 5895f3be66f6 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c      Sat Aug 09 07:05:42 2014 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c      Sat Aug 09 09:43:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_shmem.c,v 1.61 2014/05/28 20:57:22 justin Exp $     */
+/*     $NetBSD: if_shmem.c,v 1.62 2014/08/09 09:43:49 ozaki-r Exp $    */
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.61 2014/05/28 20:57:22 justin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.62 2014/08/09 09:43:49 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -566,6 +566,7 @@
 
                m_freem(m0);
                wrote = true;
+               ifp->if_opackets++;
 
                DPRINTF(("shmif_start: send %d bytes at off %d\n",
                    pktsize, busmem->shm_last));
@@ -755,6 +756,7 @@
                }
 
                if (passup) {
+                       ifp->if_ipackets++;
                        KERNEL_LOCK(1, NULL);
                        bpf_mtap(ifp, m);
                        ifp->if_input(ifp, m);



Home | Main Index | Thread Index | Old Index