Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Adopt <net/if_stats.h>
details: https://anonhg.NetBSD.org/src/rev/7f8dfd79fe7d
branches: trunk
changeset: 1007036:7f8dfd79fe7d
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Feb 04 07:35:21 2020 +0000
description:
Adopt <net/if_stats.h>
diffstat:
sys/arch/acorn32/podulebus/if_ie.c | 12 ++++++------
sys/arch/arm/at91/at91emac.c | 12 ++++++------
sys/arch/arm/gemini/gemini_gmac.c | 10 +++++-----
sys/arch/arm/omap/if_cpsw.c | 12 ++++++------
sys/arch/emips/ebus/if_le_ebus.c | 12 ++++++------
sys/arch/evbppc/virtex/dev/if_temac.c | 6 +++---
sys/arch/mac68k/nubus/if_netdock_nubus.c | 8 ++++----
sys/arch/macppc/dev/am79c950.c | 10 +++++-----
sys/arch/macppc/dev/if_bm.c | 10 +++++-----
sys/arch/macppc/dev/if_gm.c | 12 ++++++------
sys/arch/newsmips/apbus/if_sn.c | 12 ++++++------
sys/dev/ic/am79900.c | 30 +++++++++++++++---------------
sys/dev/marvell/if_gfe.c | 18 +++++++++---------
sys/dev/marvell/if_mvxpe.c | 10 +++++-----
sys/dev/pci/if_kse.c | 12 ++++++------
sys/dev/pci/if_rge.c | 12 ++++++------
sys/dev/ppbus/if_plip.c | 14 +++++++-------
sys/dev/qbus/if_dmc.c | 12 ++++++------
sys/dev/usb/if_urndis.c | 6 +++---
19 files changed, 115 insertions(+), 115 deletions(-)
diffs (truncated from 933 to 300 lines):
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/acorn32/podulebus/if_ie.c
--- a/sys/arch/acorn32/podulebus/if_ie.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/acorn32/podulebus/if_ie.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.44 2019/09/13 07:55:05 msaitoh Exp $ */
+/* $NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.44 2019/09/13 07:55:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.45 2020/02/04 07:35:21 skrll Exp $");
#define IGNORE_ETHER1_IDROM_CHECKSUM
@@ -1274,7 +1274,7 @@
}
if ( m==0 ) {
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1529,10 +1529,10 @@
printf ( "ietint: command still busy!\n" );
if ( status & IE_STAT_OK ) {
- ifp->if_opackets++;
- ifp->if_collisions += status & IE_XS_MAXCOLL;
+ if_statinc(ifp, if_opackets);
+ if_statadd(ifp, if_collisions, status & IE_XS_MAXCOLL);
} else {
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
if ( status & IE_STAT_ABORT )
printf ( "ie: send aborted\n" );
if ( status & IE_XS_LATECOLL )
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/arm/at91/at91emac.c
--- a/sys/arch/arm/at91/at91emac.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/arm/at91/at91emac.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: at91emac.c,v 1.29 2019/05/28 07:41:46 msaitoh Exp $ */
+/* $NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.29 2019/05/28 07:41:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -245,13 +245,13 @@
EMAC_WRITE(ETH_CTL, ctl & ~ETH_CTL_RE); // disable receiver
EMAC_WRITE(ETH_RSR, ETH_RSR_BNA); // clear BNA bit
EMAC_WRITE(ETH_CTL, ctl | ETH_CTL_RE); // re-enable receiver
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
ifp->if_ipackets++;
DPRINTFN(1,("%s: out of receive buffers\n", __FUNCTION__));
}
if (isr & ETH_ISR_ROVR) {
EMAC_WRITE(ETH_RSR, ETH_RSR_OVR); // clear interrupt
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
ifp->if_ipackets++;
DPRINTFN(1,("%s: receive overrun\n", __FUNCTION__));
}
@@ -306,7 +306,7 @@
if (m != NULL) {
m_freem(m);
}
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
}
sc->rxqi++;
}
@@ -587,7 +587,7 @@
int s;
uint32_t misses;
- ifp->if_collisions += EMAC_READ(ETH_SCOL) + EMAC_READ(ETH_MCOL);
+ if_statadd(ifp, if_collisions, EMAC_READ(ETH_SCOL) + EMAC_READ(ETH_MCOL));
/* These misses are ok, they will happen if the RAM/CPU can't keep up */
misses = EMAC_READ(ETH_DRFC);
if (misses > 0)
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/arm/gemini/gemini_gmac.c
--- a/sys/arch/arm/gemini/gemini_gmac.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/arm/gemini/gemini_gmac.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_gmac.c,v 1.18 2019/10/30 10:12:37 msaitoh Exp $ */
+/* $NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -49,7 +49,7 @@
#include <sys/gpio.h>
-__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.18 2019/10/30 10:12:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.19 2020/02/04 07:35:34 skrll Exp $");
#define SWFREEQ_DESCS 256 /* one page worth */
#define HWFREEQ_DESCS 256 /* one page worth */
@@ -546,8 +546,8 @@
gmac_mapcache_put(hqm->hqm_mc, map);
ifp = hwq->hwq_ifp;
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
+ if_statinc(ifp, if_opackets);
+ if_statiadd(ifp, if_obytes, m->m_pkthdr.len);
aprint_debug("gmac_hwqueue_txconsume(%p): %zu@%p: %s m=%p\n",
hwq, d - hwq->hwq_base, d, ifp->if_xname, m);
@@ -859,7 +859,7 @@
if_percpuq_enqueue(ifp->if_percpuq, m);
break;
default:
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
m_freem(m);
break;
}
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/arm/omap/if_cpsw.c
--- a/sys/arch/arm/omap/if_cpsw.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/arm/omap/if_cpsw.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $ */
+/* $NetBSD: if_cpsw.c,v 1.28 2020/02/04 07:35:34 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.27 2020/02/04 05:15:44 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.28 2020/02/04 07:35:34 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -621,7 +621,7 @@
device_printf(sc->sc_dev, "won't fit\n");
IFQ_DEQUEUE(&ifp->if_snd, m);
m_freem(m);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
} else if (error != 0) {
device_printf(sc->sc_dev, "error\n");
@@ -731,7 +731,7 @@
device_printf(sc->sc_dev, "device timeout\n");
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
cpsw_init(ifp);
cpsw_start(ifp);
}
@@ -1161,7 +1161,7 @@
if (cpsw_new_rxbuf(sc, i) != 0) {
/* drop current packet, reuse buffer for new */
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
goto next;
}
@@ -1266,7 +1266,7 @@
m_freem(rdp->tx_mb[sc->sc_txhead]);
rdp->tx_mb[sc->sc_txhead] = NULL;
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
handled = true;
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/emips/ebus/if_le_ebus.c
--- a/sys/arch/emips/ebus/if_le_ebus.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/emips/ebus/if_le_ebus.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $ */
+/* $NetBSD: if_le_ebus.c,v 1.22 2020/02/04 07:35:45 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.22 2020/02/04 07:35:45 skrll Exp $");
#include "opt_inet.h"
@@ -693,7 +693,7 @@
/* uhu?? */
printf("%s: bad recv phys %llx\n", device_xname(sc->sc_dev),
(long long)phys);
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
/* got it, pop it */
@@ -714,7 +714,7 @@
len > ((sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) ?
ETHER_VLAN_ENCAP_LEN + ETHERMTU + sizeof(struct ether_header) :
ETHERMTU + sizeof(struct ether_header))) {
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
/* reuse it */
enic_post_recv(sc, m);
@@ -755,7 +755,7 @@
/* uhu?? */
printf("%s: bad xmit phys %llx\n", device_xname(sc->sc_dev),
(long long)phys);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
return;
/* got it, pop it */
@@ -771,7 +771,7 @@
sc->bxh++;
#endif
m_freem(m);
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
if (--sc->sc_no_td == 0)
ifp->if_timer = 0;
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/evbppc/virtex/dev/if_temac.c
--- a/sys/arch/evbppc/virtex/dev/if_temac.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/evbppc/virtex/dev/if_temac.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_temac.c,v 1.15 2019/05/29 06:21:57 msaitoh Exp $ */
+/* $NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $ */
/*
* Copyright (c) 2006 Jachym Holecek
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.15 2019/05/29 06:21:57 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $");
#include <sys/param.h>
@@ -1212,7 +1212,7 @@
(TEMAC_ISINTR(tail) ? CDMAC_STAT_INTR : 0) |
(TEMAC_ISLAST(tail) ? CDMAC_STAT_STOP : 0);
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
continue;
}
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/mac68k/nubus/if_netdock_nubus.c
--- a/sys/arch/mac68k/nubus/if_netdock_nubus.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/mac68k/nubus/if_netdock_nubus.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_netdock_nubus.c,v 1.32 2020/01/29 05:25:42 thorpej Exp $ */
+/* $NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $ */
/*
* Copyright (C) 2000,2002 Daishi Kato <daishi%axlight.com@localhost>
@@ -43,7 +43,7 @@
/***********************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.32 2020/01/29 05:25:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_netdock_nubus.c,v 1.33 2020/02/04 07:36:28 skrll Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -674,9 +674,9 @@
NIC_GET_2(sc, REG_ISR);
regdata = NIC_GET_2(sc, REG_DATA);
if ((regdata & REG_DATA_BIT_08) == 0) {
- /* ifp->if_collisions++; */
+ /* if_statinc(ifp, if_collisions); */
if (regdata & REG_DATA_BIT_07)
- /* ifp->if_oerrors++; */
+ /* if_statinc(ifp, if_oerrors); */
NIC_PUT_2(sc, REG_000E, 0);
NIC_ORW(sc, REG_0000, 0x0100);
NIC_PUT_2(sc, REG_000E, 0x0200);
diff -r 1de57c3c1ca6 -r 7f8dfd79fe7d sys/arch/macppc/dev/am79c950.c
--- a/sys/arch/macppc/dev/am79c950.c Tue Feb 04 06:30:46 2020 +0000
+++ b/sys/arch/macppc/dev/am79c950.c Tue Feb 04 07:35:21 2020 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index