Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
This commit is contained in:
ozaki-r 2016-12-08 01:12:00 +00:00
parent 0cfa5e16fd
commit c0e7885f20
48 changed files with 264 additions and 178 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cpsw.c,v 1.16 2016/08/04 14:08:23 kiyohara Exp $ */
/* $NetBSD: if_cpsw.c,v 1.17 2016/12/08 01:12:00 ozaki-r Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.16 2016/08/04 14:08:23 kiyohara Exp $");
__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.17 2016/12/08 01:12:00 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -572,6 +572,7 @@ cpsw_attach(device_t parent, device_t self, void *aux)
}
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
/* The attach is successful. */
@ -1303,7 +1304,7 @@ next:
ifp->if_timer = 0;
if (handled)
cpsw_start(ifp);
if_schedule_deferred_start(ifp);
return handled;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_ebus.c,v 1.11 2016/10/03 17:35:38 maya Exp $ */
/* $NetBSD: if_le_ebus.c,v 1.12 2016/12/08 01:12:00 ozaki-r 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.11 2016/10/03 17:35:38 maya Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.12 2016/12/08 01:12:00 ozaki-r Exp $");
#include "opt_inet.h"
@ -216,6 +216,7 @@ enic_attach(device_t parent, device_t self, void *aux)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
sc->sc_sh = shutdownhook_establish(enic_shutdown, ifp);
@ -540,7 +541,7 @@ enic_init(struct ifnet *ifp)
printf("enic_init <- %x\n",ctl);
#endif
enic_start(ifp);
if_schedule_deferred_start(ifp);
return 0;
}
@ -819,7 +820,7 @@ void enic_tint(struct enic_softc *sc, uint32_t saf, paddr_t phys)
ifp->if_timer = 0;
ifp->if_flags &= ~IFF_OACTIVE;
enic_start(ifp);
if_schedule_deferred_start(ifp);
#if DEBUG
sc->it = 1;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bm.c,v 1.51 2016/10/03 01:23:55 ozaki-r Exp $ */
/* $NetBSD: if_bm.c,v 1.52 2016/12/08 01:12:00 ozaki-r Exp $ */
/*-
* Copyright (C) 1998, 1999, 2000 Tsubai Masanari. All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.51 2016/10/03 01:23:55 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.52 2016/12/08 01:12:00 ozaki-r Exp $");
#include "opt_inet.h"
@ -260,6 +260,7 @@ bmac_attach(device_t parent, device_t self, void *aux)
bmac_reset_chip(sc);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
}
@ -441,7 +442,7 @@ bmac_intr(void *v)
sc->sc_if.if_flags &= ~IFF_OACTIVE;
sc->sc_if.if_timer = 0;
sc->sc_if.if_opackets++;
bmac_start(&sc->sc_if);
if_schedule_deferred_start(&sc->sc_if);
}
/* XXX should do more! */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gm.c,v 1.47 2016/06/10 13:27:11 ozaki-r Exp $ */
/* $NetBSD: if_gm.c,v 1.48 2016/12/08 01:12:00 ozaki-r Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.47 2016/06/10 13:27:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.48 2016/12/08 01:12:00 ozaki-r Exp $");
#include "opt_inet.h"
@ -247,6 +247,7 @@ gmac_attach(device_t parent, device_t self, void *aux)
ifmedia_set(&mii->mii_media, IFM_ETHER|IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, laddr);
rnd_attach_source(&sc->sc_rnd_source, xname, RND_TYPE_NET,
RND_FLAG_DEFAULT);
@ -343,7 +344,7 @@ gmac_tint(struct gmac_softc *sc)
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
gmac_start(ifp);
if_schedule_deferred_start(ifp);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_admsw.c,v 1.14 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_admsw.c,v 1.15 2016/12/08 01:12:00 ozaki-r Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.14 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.15 2016/12/08 01:12:00 ozaki-r Exp $");
#include <sys/param.h>
@ -480,6 +480,7 @@ admsw_attach(device_t parent, device_t self, void *aux)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
enaddr[5]++;
}
@ -886,7 +887,7 @@ admsw_txintr(struct admsw_softc *sc, int prio)
ifp = &sc->sc_ethercom[0].ec_if;
/* Try to queue more packets. */
admsw_start(ifp);
if_schedule_deferred_start(ifp);
/*
* If there are no more pending transmissions,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aumac.c,v 1.41 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_aumac.c,v 1.42 2016/12/08 01:12:00 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.41 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.42 2016/12/08 01:12:00 ozaki-r Exp $");
@ -338,6 +338,7 @@ aumac_attach(device_t parent, device_t self, void *aux)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(self),
@ -578,7 +579,7 @@ aumac_txintr(struct aumac_softc *sc)
ifp->if_flags &= ~IFF_OACTIVE;
/* Try to queue more packets. */
aumac_start(ifp);
if_schedule_deferred_start(ifp);
}
if (pkts)

View File

@ -1,4 +1,4 @@
/* $Id: if_ae.c,v 1.28 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $Id: if_ae.c,v 1.29 2016/12/08 01:12:00 ozaki-r Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
* Copyright (c) 2006 Garrett D'Amore.
@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.28 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.29 2016/12/08 01:12:00 ozaki-r Exp $");
#include <sys/param.h>
@ -383,6 +383,7 @@ ae_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, ae_ifflags_cb);
@ -993,7 +994,7 @@ ae_intr(void *arg)
}
/* Try to get more packets going. */
ae_start(ifp);
if_schedule_deferred_start(ifp);
if (handled)
rnd_add_uint32(&sc->sc_rnd_source, status);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_smap.c,v 1.21 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_smap.c,v 1.22 2016/12/08 01:12:00 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.21 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.22 2016/12/08 01:12:00 ozaki-r Exp $");
#include "debug_playstation2.h"
@ -246,6 +246,7 @@ smap_attach(struct device *parent, struct device *self, void *aux)
}
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, emac3->eaddr);
spd_intr_establish(SPD_NIC, smap_intr, sc);
@ -321,8 +322,7 @@ smap_intr(void *arg)
/* if transmission is pending, start here */
ifp = &sc->ethercom.ec_if;
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
smap_start(ifp);
if_schedule_deferred_start(ifp);
rnd_add_uint32(&sc->rnd_source, cause | sc->tx_fifo_ptr << 16);
return (1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_emac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_emac.c,v 1.46 2016/12/08 01:12:00 ozaki-r Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.45 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.46 2016/12/08 01:12:00 ozaki-r Exp $");
#include "opt_emac.h"
@ -550,6 +550,7 @@ emac_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
#ifdef EMAC_EVENT_COUNTERS
@ -1559,7 +1560,7 @@ emac_txeob_intr(void *arg)
handled |= emac_txreap(sc);
/* try to get more packets going */
emac_start(&sc->sc_ethercom.ec_if);
if_schedule_deferred_start(&sc->sc_ethercom.ec_if);
return handled;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sq.c,v 1.46 2016/06/10 13:27:12 ozaki-r Exp $ */
/* $NetBSD: if_sq.c,v 1.47 2016/12/08 01:12:00 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Rafal K. Boni
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.46 2016/06/10 13:27:12 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.47 2016/12/08 01:12:00 ozaki-r Exp $");
#include <sys/param.h>
@ -324,6 +324,7 @@ sq_attach(device_t parent, device_t self, void *aux)
IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
memset(&sc->sq_trace, 0, sizeof(sc->sq_trace));
@ -1110,7 +1111,7 @@ sq_txintr(struct sq_softc *sc)
ifp->if_timer = 0;
SQ_TRACE(SQ_TXINTR_EXIT, sc, sc->sc_prevtx, status);
sq_start(ifp);
if_schedule_deferred_start(ifp);
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mec.c,v 1.53 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_mec.c,v 1.54 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.53 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.54 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_ddb.h"
@ -614,6 +614,7 @@ mec_attach(device_t parent, device_t self, void *aux)
/* attach the interface */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
/* establish interrupt */
@ -1607,9 +1608,9 @@ mec_intr(void *arg)
}
}
if (sent && !IFQ_IS_EMPTY(&ifp->if_snd)) {
if (sent) {
/* try to get more packets going */
mec_start(ifp);
if_schedule_deferred_start(ifp);
}
if (handled)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ec.c,v 1.25 2016/06/10 13:27:13 ozaki-r Exp $ */
/* $NetBSD: if_ec.c,v 1.26 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.25 2016/06/10 13:27:13 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.26 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -232,6 +232,7 @@ ec_attach(device_t parent, device_t self, void *aux)
/* Now we can attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
idprom_etheraddr(myaddr);
ether_ifattach(ifp, myaddr);
aprint_normal_dev(self, "address %s\n", ether_sprintf(myaddr));
@ -352,7 +353,6 @@ ec_intr(void *arg)
int recv_first;
int recv_second;
int retval;
struct mbuf *m0;
retval = 0;
@ -434,9 +434,7 @@ ec_intr(void *arg)
sc->sc_ethercom.ec_if.if_opackets++;
sc->sc_jammed = 0;
ifp->if_flags &= ~IFF_OACTIVE;
IFQ_POLL(&ifp->if_snd, m0);
if (m0 != NULL)
ec_start(ifp);
if_schedule_deferred_start(ifp);
}
} else {
@ -646,7 +644,6 @@ ec_coll(struct ec_softc *sc)
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
u_short jams;
struct mbuf *m0;
if ((++sc->sc_colliding) >= EC_COLLISIONS_JAMMED) {
sc->sc_ethercom.ec_if.if_oerrors++;
@ -656,9 +653,7 @@ ec_coll(struct ec_softc *sc)
sc->sc_jammed = 1;
sc->sc_colliding = 0;
ifp->if_flags &= ~IFF_OACTIVE;
IFQ_POLL(&ifp->if_snd, m0);
if (m0 != NULL)
ec_start(ifp);
if_schedule_deferred_start(ifp);
} else {
jams = MAX(sc->sc_colliding, EC_BACKOFF_PRNG_COLL_MAX);
sc->sc_backoff_seed =

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vmx.c,v 1.11 2016/11/29 22:27:09 dholland Exp $ */
/* $NetBSD: if_vmx.c,v 1.12 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.11 2016/11/29 22:27:09 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.12 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@ -1717,6 +1717,7 @@ vmxnet3_setup_interface(struct vmxnet3_softc *sc)
ifmedia_set(&sc->vmx_media, IFM_ETHER|IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->vmx_lladdr);
ether_set_ifflags_cb(&sc->vmx_ethercom, vmxnet3_ifflags_cb);
vmxnet3_link_status(sc);
@ -1747,7 +1748,7 @@ vmxnet3_evintr(struct vmxnet3_softc *sc)
if (event & VMXNET3_EVENT_LINK) {
vmxnet3_link_status(sc);
if (sc->vmx_link_active != 0)
vmxnet3_start(&sc->vmx_ethercom.ec_if);
if_schedule_deferred_start(&sc->vmx_ethercom.ec_if);
}
if (event & (VMXNET3_EVENT_TQERROR | VMXNET3_EVENT_RQERROR)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mvgbe.c,v 1.45 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_mvgbe.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
* All rights reserved.
@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.45 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_multiprocessor.h"
@ -909,6 +909,7 @@ mvgbe_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, mvgbe_ifflags_cb);
@ -1050,8 +1051,7 @@ mvgbe_intr(void *arg)
mvgbe_txeof(sc);
}
if (!IFQ_IS_EMPTY(&ifp->if_snd))
mvgbe_start(ifp);
if_schedule_deferred_start(ifp);
rnd_add_uint32(&sc->sc_rnd_source, datum);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mvxpe.c,v 1.15 2016/10/20 09:53:08 skrll Exp $ */
/* $NetBSD: if_mvxpe.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2015 Internet Initiative Japan Inc.
* All rights reserved.
@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.15 2016/10/20 09:53:08 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_multiprocessor.h"
@ -503,6 +503,7 @@ mvxpe_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, mvxpe_ifflags_cb);
@ -1479,8 +1480,7 @@ mvxpe_rxtxth_intr(void *arg)
}
mvxpe_sc_unlock(sc);
if (!IFQ_IS_EMPTY(&ifp->if_snd))
mvxpe_start(ifp);
if_schedule_deferred_start(ifp);
rnd_add_uint32(&sc->sc_rnd_source, datum);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_age.c,v 1.48 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_age.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */
/*-
@ -31,7 +31,7 @@
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.48 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $");
#include "vlan.h"
@ -285,6 +285,7 @@ age_attach(device_t parent, device_t self, void *aux)
ifmedia_set(&sc->sc_miibus.mii_media, IFM_ETHER | IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
if (pmf_device_register1(self, NULL, age_resume, age_shutdown))
@ -535,7 +536,7 @@ age_intr(void *arg)
age_init(ifp);
}
age_start(ifp);
if_schedule_deferred_start(ifp);
if (status & INTR_SMB)
age_stats_update(sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_alc.c,v 1.21 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_alc.c,v 1.22 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
@ -1466,6 +1466,7 @@ alc_attach(device_t parent, device_t self, void *aux)
ifmedia_set(&sc->sc_miibus.mii_media, IFM_ETHER | IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->alc_eaddr);
if (!pmf_device_register(self, NULL, NULL))
@ -2300,8 +2301,7 @@ alc_intr(void *arg)
}
alc_txeof(sc);
if (!IFQ_IS_EMPTY(&ifp->if_snd))
alc_start(ifp);
if_schedule_deferred_start(ifp);
}
/* Re-enable interrupts. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bce.c,v 1.42 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_bce.c,v 1.43 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2003 Clifford Wright. All rights reserved.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.42 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.43 2016/12/08 01:12:01 ozaki-r Exp $");
#include "vlan.h"
@ -445,6 +445,7 @@ bce_attach(device_t parent, device_t self, void *aux)
/* Attach the interface */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
sc->enaddr[0] = bus_space_read_1(sc->bce_btag, sc->bce_bhandle,
BCE_MAGIC_ENET0);
sc->enaddr[1] = bus_space_read_1(sc->bce_btag, sc->bce_bhandle,
@ -713,7 +714,7 @@ bce_intr(void *xsc)
bce_init(ifp);
rnd_add_uint32(&sc->rnd_source, intstatus);
/* Try to get more packets going. */
bce_start(ifp);
if_schedule_deferred_start(ifp);
}
return (handled);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bge.c,v 1.298 2016/07/11 06:14:51 knakahara Exp $ */
/* $NetBSD: if_bge.c,v 1.299 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.298 2016/07/11 06:14:51 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.299 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -4061,6 +4061,7 @@ alloc_retry:
*/
DPRINTFN(5, ("if_attach\n"));
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
DPRINTFN(5, ("ether_ifattach\n"));
ether_ifattach(ifp, eaddr);
ether_set_ifflags_cb(&sc->ethercom, bge_ifflags_cb);
@ -4788,8 +4789,8 @@ bge_intr(void *xsc)
/* Re-enable interrupts. */
bge_writembx_flush(sc, BGE_MBX_IRQ0_LO, statustag);
if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd))
bge_start(ifp);
if (ifp->if_flags & IFF_RUNNING)
if_schedule_deferred_start(ifp);
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bnx.c,v 1.59 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_bnx.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
/*-
@ -35,7 +35,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
#endif
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.59 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $");
/*
* The following controllers are supported by this driver:
@ -846,6 +846,7 @@ bnx_attach(device_t parent, device_t self, void *aux)
/* Attach to the Ethernet interface list. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp,sc->eaddr);
callout_init(&sc->bnx_timeout, 0);
@ -5384,8 +5385,7 @@ bnx_intr(void *xsc)
BNX_PCICFG_INT_ACK_CMD_INDEX_VALID | sc->last_status_idx);
/* Handle any frames that arrived while handling the interrupt. */
if (!IFQ_IS_EMPTY(&ifp->if_snd))
bnx_start(ifp);
if_schedule_deferred_start(ifp);
return 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cas.c,v 1.24 2016/02/09 08:32:11 ozaki-r Exp $ */
/* $NetBSD: if_cas.c,v 1.25 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.24 2016/02/09 08:32:11 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.25 2016/12/08 01:12:01 ozaki-r Exp $");
#ifndef _MODULE
#include "opt_inet.h"
@ -609,6 +609,7 @@ cas_config(struct cas_softc *sc, const uint8_t *enaddr)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(sc->sc_dev),
@ -2016,7 +2017,7 @@ cas_tint(struct cas_softc *sc, u_int32_t status)
if (sc->sc_tx_cnt == 0)
ifp->if_timer = 0;
cas_start(ifp);
if_schedule_deferred_start(ifp);
return (1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.147 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_de.c,v 1.148 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -37,7 +37,7 @@
* board which support 21040, 21041, or 21140 (mostly).
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.147 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.148 2016/12/08 01:12:01 ozaki-r Exp $");
#define TULIP_HDR_DATA
@ -4111,7 +4111,7 @@ tulip_intr_handler(
if (sc->tulip_flags & (TULIP_WANTTXSTART|TULIP_TXPROBE_ACTIVE|TULIP_DOINGSETUP|TULIP_PROMISC)) {
tulip_tx_intr(sc);
if ((sc->tulip_flags & TULIP_TXPROBE_ACTIVE) == 0)
tulip_ifstart(&sc->tulip_if);
if_schedule_deferred_start(&sc->tulip_if);
}
}
if (sc->tulip_flags & TULIP_NEEDRESET) {
@ -5136,6 +5136,7 @@ tulip_attach(
TULIP_ETHER_IFATTACH(sc);
#else
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
#if defined(__NetBSD__) || (defined(__FreeBSD__) && BSD >= 199506)
TULIP_ETHER_IFATTACH(sc);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_dge.c,v 1.45 2016/07/07 06:55:41 msaitoh Exp $ */
/* $NetBSD: if_dge.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2004, SUNET, Swedish University Computer Network.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.45 2016/07/07 06:55:41 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $");
@ -943,6 +943,7 @@ dge_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(sc->sc_dev),
RND_TYPE_NET, RND_FLAG_DEFAULT);
@ -1578,7 +1579,7 @@ dge_intr(void *arg)
dge_init(ifp);
/* Try to get more packets going. */
dge_start(ifp);
if_schedule_deferred_start(ifp);
}
return (handled);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_et.c,v 1.12 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_et.c,v 1.13 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.12 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.13 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
#include "vlan.h"
@ -284,6 +284,7 @@ et_attach(device_t parent, device_t self, void *aux)
ifmedia_set(&sc->sc_miibus.mii_media, IFM_ETHER | IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
callout_init(&sc->sc_tick, 0);
@ -1971,7 +1972,7 @@ et_txeof(struct et_softc *sc)
if (tbd->tbd_used + ET_NSEG_SPARE <= ET_TX_NDESC)
ifp->if_flags &= ~IFF_OACTIVE;
et_start(ifp);
if_schedule_deferred_start(ifp);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ipw.c,v 1.60 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_ipw.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $ */
/* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */
/*-
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.60 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@ -297,6 +297,7 @@ ipw_attach(device_t parent, device_t self, void *aux)
ether_sprintf(ic->ic_myaddr));
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ieee80211_ifattach(ic);
/* override state transition machine */
@ -1215,7 +1216,7 @@ ipw_tx_intr(struct ipw_softc *sc)
/* Call start() since some buffer descriptors have been released */
ifp->if_flags &= ~IFF_OACTIVE;
(*ifp->if_start)(ifp);
if_schedule_deferred_start(ifp);
}
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iwi.c,v 1.100 2016/08/03 19:59:57 mlelstv Exp $ */
/* $NetBSD: if_iwi.c,v 1.101 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */
/*-
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.100 2016/08/03 19:59:57 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.101 2016/12/08 01:12:01 ozaki-r Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@ -355,6 +355,7 @@ iwi_attach(device_t parent, device_t self, void *aux)
memcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ieee80211_ifattach(ic);
/* override default methods */
ic->ic_node_alloc = iwi_node_alloc;
@ -1444,7 +1445,7 @@ iwi_tx_intr(struct iwi_softc *sc, struct iwi_tx_ring *txq)
ifp->if_flags &= ~IFF_OACTIVE;
/* Call start() since some buffer descriptors have been released */
(*ifp->if_start)(ifp);
if_schedule_deferred_start(ifp);
}
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iwm.c,v 1.43 2016/09/23 19:53:52 maya Exp $ */
/* $NetBSD: if_iwm.c,v 1.44 2016/12/08 01:12:01 ozaki-r Exp $ */
/* OpenBSD: if_iwm.c,v 1.41 2015/05/22 06:50:54 kettenis Exp */
/*
@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.43 2016/09/23 19:53:52 maya Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.44 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -3330,7 +3330,7 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc,
* I guess net80211 does all sorts of stunts in
* interrupt context, so maybe this is no biggie.
*/
(*ifp->if_start)(ifp);
if_schedule_deferred_start(ifp);
}
}
}
@ -6831,9 +6831,10 @@ iwm_attach(device_t parent, device_t self, void *aux)
#else
ether_ifattach(ifp, ic->ic_myaddr); /* XXX */
#endif
if_register(ifp);
/* Use common softint-based if_input */
ifp->if_percpuq = if_percpuq_create(ifp);
if_deferred_start_init(ifp, NULL);
if_register(ifp);
callout_init(&sc->sc_calib_to, 0);
callout_setfunc(&sc->sc_calib_to, iwm_calib_timeout, sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iwn.c,v 1.80 2016/11/24 12:32:47 hkenken Exp $ */
/* $NetBSD: if_iwn.c,v 1.81 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */
/*-
@ -22,7 +22,7 @@
* adapters.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.80 2016/11/24 12:32:47 hkenken Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.81 2016/12/08 01:12:01 ozaki-r Exp $");
#define IWN_USE_RBUF /* Use local storage for RX */
#undef IWN_HWCRYPTO /* XXX does not even compile yet */
@ -593,6 +593,7 @@ iwn_attach(device_t parent __unused, device_t self, void *aux)
memcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ieee80211_ifattach(ic);
ic->ic_node_alloc = iwn_node_alloc;
ic->ic_newassoc = iwn_newassoc;
@ -2341,7 +2342,7 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt,
sc->qfullmsk &= ~(1 << ring->qid);
if (sc->qfullmsk == 0 && (ifp->if_flags & IFF_OACTIVE)) {
ifp->if_flags &= ~IFF_OACTIVE;
(*ifp->if_start)(ifp);
if_schedule_deferred_start(ifp);
}
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_lii.c,v 1.15 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_lii.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.15 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.16 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
@ -336,6 +336,7 @@ lii_attach(device_t parent, device_t self, void *aux)
sc->sc_ec.ec_capabilities = ETHERCAP_VLAN_MTU;
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, eaddr);
if (pmf_device_register(self, NULL, NULL))
@ -1048,7 +1049,7 @@ lii_txintr(struct lii_softc *sc)
}
if (sc->sc_free_tx_slots)
lii_start(ifp);
if_schedule_deferred_start(ifp);
}
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_msk.c,v 1.52 2016/11/06 21:51:31 christos Exp $ */
/* $NetBSD: if_msk.c,v 1.53 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
/*
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.52 2016/11/06 21:51:31 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.53 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1135,6 +1135,7 @@ msk_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc_if->sk_enaddr);
if (pmf_device_register(self, NULL, msk_resume))
@ -1972,10 +1973,10 @@ msk_intr(void *xsc)
CSR_WRITE_4(sc, SK_Y2_ICR, 2);
if (ifp0 != NULL && !IFQ_IS_EMPTY(&ifp0->if_snd))
msk_start(ifp0);
if (ifp1 != NULL && !IFQ_IS_EMPTY(&ifp1->if_snd))
msk_start(ifp1);
if (ifp0 != NULL)
if_schedule_deferred_start(ifp0);
if (ifp1 != NULL)
if_schedule_deferred_start(ifp1);
rnd_add_uint32(&sc->rnd_source, status);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_nfe.c,v 1.61 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_nfe.c,v 1.62 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */
/*-
@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.61 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.62 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
#include "vlan.h"
@ -409,6 +409,7 @@ nfe_attach(device_t parent, device_t self, void *aux)
ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER | IFM_AUTO);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, nfe_ifflags_cb);
@ -631,8 +632,8 @@ nfe_intr(void *arg)
}
}
if (handled && !IF_IS_EMPTY(&ifp->if_snd))
nfe_start(ifp);
if (handled)
if_schedule_deferred_start(ifp);
return handled;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pcn.c,v 1.62 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_pcn.c,v 1.63 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.62 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.63 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -812,6 +812,7 @@ pcn_attach(device_t parent, device_t self, void *aux)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(self),
RND_TYPE_NET, RND_FLAG_DEFAULT);
@ -1288,7 +1289,7 @@ pcn_intr(void *arg)
pcn_init(ifp);
/* Try to get more packets going. */
pcn_start(ifp);
if_schedule_deferred_start(ifp);
}
return (handled);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_rtwn.c,v 1.8 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_rtwn.c,v 1.9 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_rtwn.c,v 1.5 2015/06/14 08:02:47 stsp Exp $ */
#define IEEE80211_NO_HT
/*-
@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.8 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_rtwn.c,v 1.9 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@ -357,9 +357,10 @@ rtwn_attach(device_t parent, device_t self, void *aux)
if_initialize(ifp);
ieee80211_ifattach(ic);
if_register(ifp);
/* Use common softint-based if_input */
ifp->if_percpuq = if_percpuq_create(ifp);
if_deferred_start_init(ifp, NULL);
if_register(ifp);
/* override default methods */
ic->ic_newassoc = rtwn_newassoc;
@ -3519,7 +3520,7 @@ rtwn_intr(void *xsc)
if ((status & RTWN_INT_ENABLE_TX) && sc->qfullmsk == 0) {
struct ifnet *ifp = GET_IFP(sc);
ifp->if_flags &= ~IFF_OACTIVE;
rtwn_start(ifp);
if_schedule_deferred_start(ifp);
}
/* Enable interrupts. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sip.c,v 1.163 2016/07/14 10:19:06 msaitoh Exp $ */
/* $NetBSD: if_sip.c,v 1.164 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.163 2016/07/14 10:19:06 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.164 2016/12/08 01:12:01 ozaki-r Exp $");
@ -1283,6 +1283,7 @@ sipcom_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, sip_ifflags_cb);
sc->sc_prev.ec_capenable = sc->sc_ethercom.ec_capenable;
@ -1952,7 +1953,7 @@ sipcom_intr(void *arg)
bus_space_write_4(sc->sc_st, sc->sc_sh, SIP_IER, IER_IE);
/* Try to get more packets going. */
sipcom_start(ifp);
if_schedule_deferred_start(ifp);
return (handled);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sk.c,v 1.82 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_sk.c,v 1.83 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -115,7 +115,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.82 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.83 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1458,6 +1458,7 @@ sk_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc_if->sk_enaddr);
@ -2397,10 +2398,10 @@ sk_intr(void *xsc)
CSR_WRITE_4(sc, SK_IMR, sc->sk_intrmask);
if (ifp0 != NULL && !IFQ_IS_EMPTY(&ifp0->if_snd))
sk_start(ifp0);
if (ifp1 != NULL && !IFQ_IS_EMPTY(&ifp1->if_snd))
sk_start(ifp1);
if (ifp0 != NULL)
if_schedule_deferred_start(ifp0);
if (ifp1 != NULL)
if_schedule_deferred_start(ifp1);
rnd_add_uint32(&sc->rnd_source, status);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ste.c,v 1.48 2016/07/07 06:55:41 msaitoh Exp $ */
/* $NetBSD: if_ste.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.48 2016/07/07 06:55:41 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.49 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
@ -505,6 +505,7 @@ ste_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
/*
@ -912,7 +913,7 @@ ste_intr(void *arg)
sc->sc_IntEnable);
/* Try to get more packets going. */
ste_start(ifp);
if_schedule_deferred_start(ifp);
return (1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stge.c,v 1.60 2016/07/07 06:55:41 msaitoh Exp $ */
/* $NetBSD: if_stge.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.60 2016/07/07 06:55:41 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.61 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
@ -658,6 +658,7 @@ stge_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
#ifdef STGE_EVENT_COUNTERS
@ -1141,7 +1142,7 @@ stge_intr(void *arg)
sc->sc_IntEnable);
/* Try to get more packets going. */
stge_start(ifp);
if_schedule_deferred_start(ifp);
return (1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ti.c,v 1.99 2016/07/14 04:15:27 msaitoh Exp $ */
/* $NetBSD: if_ti.c,v 1.100 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.99 2016/07/14 04:15:27 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.100 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
@ -1866,6 +1866,7 @@ ti_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, eaddr);
/*
@ -2180,9 +2181,8 @@ ti_intr(void *xsc)
/* Re-enable interrupts. */
CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0);
if ((ifp->if_flags & IFF_RUNNING) != 0 &&
IFQ_IS_EMPTY(&ifp->if_snd) == 0)
ti_start(ifp);
if ((ifp->if_flags & IFF_RUNNING) != 0)
if_schedule_deferred_start(ifp);
return (1);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_txp.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $ */
/* $NetBSD: if_txp.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2001
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.45 2016/07/14 10:19:06 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.46 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
@ -343,6 +343,7 @@ txp_attach(device_t parent, device_t self, void *aux)
* Attach us everywhere
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
if (pmf_device_register1(self, NULL, NULL, txp_shutdown))
@ -652,7 +653,7 @@ txp_intr(void *vsc)
/* unmask all interrupts */
WRITE_REG(sc, TXP_IMR, TXP_INT_A2H_3);
txp_start(&sc->sc_arpcom.ec_if);
if_schedule_deferred_start(&sc->sc_arpcom.ec_if);
return (claimed);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vge.c,v 1.58 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_vge.c,v 1.59 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2004
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.58 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.59 2016/12/08 01:12:01 ozaki-r Exp $");
/*
* VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@ -1067,6 +1067,7 @@ vge_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, eaddr);
ether_set_ifflags_cb(&sc->sc_ethercom, vge_ifflags_cb);
@ -1529,8 +1530,8 @@ vge_intr(void *arg)
/* Re-enable interrupts */
CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK);
if (claim && !IFQ_IS_EMPTY(&ifp->if_snd))
vge_start(ifp);
if (claim)
if_schedule_deferred_start(ifp);
return claim;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vioif.c,v 1.27 2016/11/29 21:54:11 uwe Exp $ */
/* $NetBSD: if_vioif.c,v 1.28 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.27 2016/11/29 21:54:11 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.28 2016/12/08 01:12:01 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@ -672,6 +672,7 @@ skip:
sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->sc_mac);
return;
@ -1130,7 +1131,7 @@ vioif_tx_vq_done(struct virtqueue *vq)
out:
VIOIF_TX_UNLOCK(sc);
if (r)
vioif_start(ifp);
if_schedule_deferred_start(ifp);
return r;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_vr.c,v 1.119 2016/07/14 04:00:46 msaitoh Exp $ */
/* $NetBSD: if_vr.c,v 1.120 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.119 2016/07/14 04:00:46 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.120 2016/12/08 01:12:01 ozaki-r Exp $");
@ -987,7 +987,7 @@ vr_intr(void *arg)
CSR_WRITE_2(sc, VR_IMR, VR_INTRS);
if (dotx)
vr_start(ifp);
if_schedule_deferred_start(ifp);
return (handled);
}
@ -1745,6 +1745,7 @@ vr_attach(device_t parent, device_t self, void *aux)
* Call MI attach routines.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, sc->vr_enaddr);
rnd_attach_source(&sc->rnd_source, device_xname(self),

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wm.c,v 1.455 2016/12/02 01:48:44 knakahara Exp $ */
/* $NetBSD: if_wm.c,v 1.456 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.455 2016/12/02 01:48:44 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.456 2016/12/08 01:12:01 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@ -696,6 +696,7 @@ static void wm_nq_start_locked(struct ifnet *);
static int wm_nq_transmit(struct ifnet *, struct mbuf *);
static void wm_nq_transmit_locked(struct ifnet *, struct wm_txqueue *);
static void wm_nq_send_common_locked(struct ifnet *, struct wm_txqueue *, bool);
static void wm_deferred_start(struct ifnet *);
/* Interrupt */
static int wm_txeof(struct wm_softc *, struct wm_txqueue *);
static void wm_rxeof(struct wm_rxqueue *);
@ -1612,6 +1613,7 @@ wm_attach(device_t parent, device_t self, void *aux)
bool force_clear_smbi;
uint32_t link_mode;
uint32_t reg;
void (*deferred_start_func)(struct ifnet *) = NULL;
sc->sc_dev = self;
callout_init(&sc->sc_tick_ch, CALLOUT_FLAGS);
@ -2514,12 +2516,16 @@ alloc_retry:
ifp->if_ioctl = wm_ioctl;
if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) {
ifp->if_start = wm_nq_start;
if (sc->sc_nqueues > 1)
if (sc->sc_nqueues > 1) {
ifp->if_transmit = wm_nq_transmit;
deferred_start_func = wm_deferred_start;
}
} else {
ifp->if_start = wm_start;
if (sc->sc_nqueues > 1)
if (sc->sc_nqueues > 1) {
ifp->if_transmit = wm_transmit;
deferred_start_func = wm_deferred_start;
}
}
ifp->if_watchdog = wm_watchdog;
ifp->if_init = wm_init;
@ -2620,6 +2626,7 @@ alloc_retry:
/* Attach the interface. */
if_initialize(ifp);
sc->sc_ipq = if_percpuq_create(&sc->sc_ethercom.ec_if);
if_deferred_start_init(ifp, deferred_start_func);
ether_ifattach(ifp, enaddr);
if_register(ifp);
ether_set_ifflags_cb(&sc->sc_ethercom, wm_ifflags_cb);
@ -7245,6 +7252,53 @@ wm_nq_send_common_locked(struct ifnet *ifp, struct wm_txqueue *txq,
}
}
static void
wm_deferred_start(struct ifnet *ifp)
{
struct wm_softc *sc = ifp->if_softc;
int qid = 0;
/*
* Try to transmit on all Tx queues. Passing a txq somehow and
* transmitting only on the txq may be better.
*/
restart:
WM_CORE_LOCK(sc);
if (sc->sc_core_stopping)
goto out;
for (; qid < sc->sc_nqueues; qid++) {
struct wm_txqueue *txq = &sc->sc_queue[qid].wmq_txq;
if (!mutex_tryenter(txq->txq_lock))
continue;
if (txq->txq_stopping) {
mutex_exit(txq->txq_lock);
continue;
}
WM_CORE_UNLOCK(sc);
if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) {
/* XXX need for ALTQ */
if (qid == 0)
wm_nq_start_locked(ifp);
wm_nq_transmit_locked(ifp, txq);
} else {
/* XXX need for ALTQ */
if (qid == 0)
wm_start_locked(ifp);
wm_transmit_locked(ifp, txq);
}
mutex_exit(txq->txq_lock);
qid++;
goto restart;
}
out:
WM_CORE_UNLOCK(sc);
}
/* Interrupt */
/*
@ -7926,7 +7980,7 @@ wm_intr_legacy(void *arg)
if (handled) {
/* Try to get more packets going. */
ifp->if_start(ifp);
if_schedule_deferred_start(ifp);
}
return handled;
@ -7965,15 +8019,13 @@ wm_txrxintr_msix(void *arg)
/* Try to get more packets going. */
if (pcq_peek(txq->txq_interq) != NULL)
wm_nq_transmit_locked(ifp, txq);
if_schedule_deferred_start(ifp);
/*
* There are still some upper layer processing which call
* ifp->if_start(). e.g. ALTQ
*/
if (wmq->wmq_id == 0) {
if (!IFQ_IS_EMPTY(&ifp->if_snd))
wm_nq_start_locked(ifp);
}
if (wmq->wmq_id == 0)
if_schedule_deferred_start(ifp);
mutex_exit(txq->txq_lock);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wpi.c,v 1.74 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_wpi.c,v 1.75 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 2006, 2007
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.74 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.75 2016/12/08 01:12:01 ozaki-r Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@ -359,6 +359,7 @@ wpi_attach(device_t parent __unused, device_t self, void *aux)
memcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ieee80211_ifattach(ic);
/* override default methods */
ic->ic_node_alloc = wpi_node_alloc;
@ -1630,7 +1631,7 @@ wpi_tx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc)
sc->sc_tx_timer = 0;
ifp->if_flags &= ~IFF_OACTIVE;
wpi_start(ifp);
if_schedule_deferred_start(ifp);
}
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_xge.c,v 1.23 2016/07/14 04:00:46 msaitoh Exp $ */
/* $NetBSD: if_xge.c,v 1.24 2016/12/08 01:12:01 ozaki-r Exp $ */
/*
* Copyright (c) 2004, SUNET, Swedish University Computer Network.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.23 2016/07/14 04:00:46 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.24 2016/12/08 01:12:01 ozaki-r Exp $");
#include <sys/param.h>
@ -553,6 +553,7 @@ xge_attach(device_t parent, device_t self, void *aux)
* Attach the interface.
*/
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, enaddr);
/*
@ -750,7 +751,7 @@ xge_intr(void *pv)
if (sc->sc_lasttx != lasttx)
ifp->if_flags &= ~IFF_OACTIVE;
xge_start(ifp); /* Try to get more packets on the wire */
if_schedule_deferred_start(ifp); /* Try to get more packets on the wire */
if ((val = PIF_RCSR(RX_TRAFFIC_INT))) {
XGE_EVCNT_INCR(&sc->sc_rxintr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cnw.c,v 1.59 2016/10/02 14:16:03 christos Exp $ */
/* $NetBSD: if_cnw.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.59 2016/10/02 14:16:03 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.60 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
@ -558,6 +558,7 @@ cnw_attach(device_t parent, device_t self, void *aux)
/* Attach the interface */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, macaddr);
sc->sc_resource |= CNW_RES_NET;
@ -975,7 +976,7 @@ cnw_intr(void *arg)
ifp->if_flags &= ~IFF_OACTIVE;
/* Continue to send packets from the queue */
cnw_start(&sc->sc_ethercom.ec_if);
if_schedule_deferred_start(&sc->sc_ethercom.ec_if);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_malo_pcmcia.c,v 1.10 2016/03/11 22:09:54 macallan Exp $ */
/* $NetBSD: if_malo_pcmcia.c,v 1.11 2016/12/08 01:12:01 ozaki-r Exp $ */
/* $OpenBSD: if_malo.c,v 1.65 2009/03/29 21:53:53 sthen Exp $ */
/*
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.10 2016/03/11 22:09:54 macallan Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.11 2016/12/08 01:12:01 ozaki-r Exp $");
#ifdef _MODULE
#include <sys/module.h>
@ -356,6 +356,7 @@ cmalo_attach(void *arg)
/* attach interface */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ieee80211_ifattach(ic);
sc->sc_newstate = ic->ic_newstate;
@ -1070,7 +1071,7 @@ cmalo_tx_done(struct malo_softc *sc)
ifp->if_opackets++;
ifp->if_flags &= ~IFF_OACTIVE;
ifp->if_timer = 0;
cmalo_start(ifp);
if_schedule_deferred_start(ifp);
}
static void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_xi.c,v 1.78 2016/10/02 14:16:03 christos Exp $ */
/* $NetBSD: if_xi.c,v 1.79 2016/12/08 01:12:01 ozaki-r Exp $ */
/* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */
/*
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.78 2016/10/02 14:16:03 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.79 2016/12/08 01:12:01 ozaki-r Exp $");
#include "opt_inet.h"
@ -219,6 +219,7 @@ xi_attach(struct xi_softc *sc, u_int8_t *myea)
/* Attach the interface. */
if_attach(ifp);
if_deferred_start_init(ifp, NULL);
ether_ifattach(ifp, myea);
/*
@ -360,8 +361,7 @@ xi_intr(void *arg)
}
/* Try to start more packets transmitting. */
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
xi_start(ifp);
if_schedule_deferred_start(ifp);
/* Detected excessive collisions? */
if ((tx_status & EXCESSIVE_COLL) && ifp->if_opackets > 0) {