From 8bf0efc264cd410731b3a8c7cd59266ece9fd444 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 21 Jun 2015 20:04:30 +0000 Subject: [PATCH] Count transmitted packets. --- sys/arch/sparc64/dev/vnet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index 505a8491941..4bb9beddff5 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.44 2015/04/13 08:45:48 mpi Exp $ */ +/* $OpenBSD: vnet.c,v 1.45 2015/06/21 20:04:30 kettenis Exp $ */ /* * Copyright (c) 2009, 2015 Mark Kettenis * @@ -767,6 +767,7 @@ vnet_rx_vio_desc_data(struct vnet_softc *sc, struct vio_msg_tag *tag) atomic_dec_int(&map->lm_count); pool_put(&sc->sc_pool, sc->sc_vsd[cons].vsd_buf); + ifp->if_opackets++; sc->sc_tx_cons++; break; @@ -880,6 +881,7 @@ vnet_rx_vio_dring_data(struct vnet_softc *sc, struct vio_msg_tag *tag) atomic_dec_int(&map->lm_count); pool_put(&sc->sc_pool, sc->sc_vsd[cons].vsd_buf); + ifp->if_opackets++; sc->sc_vd->vd_desc[cons].hdr.dstate = VIO_DESC_FREE; sc->sc_tx_cons++; -- 2.20.1