From 24f045f4f6b22f2b284c336b2913cd9af171bd82 Mon Sep 17 00:00:00 2001 From: henning Date: Sat, 19 Apr 2014 12:25:03 +0000 Subject: [PATCH] another questionable "optimization": de used tulip_ifstart_one instead of tulip_ifstart if the sendqueue was empty, but only if altq wasn't compiled in (i. e., that's a _compile time_ decision and not based on wether altq was actually used). just use tulip_ifstart all the time, as before in our regular kernels. kill tulip_ifstart_one completely. makes sense to sthen --- sys/dev/pci/if_de.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index ecaa384bb2f..11ec84bea9f 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.112 2013/11/26 09:50:33 mpi Exp $ */ +/* $OpenBSD: if_de.c,v 1.113 2014/04/19 12:25:03 henning Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -215,7 +215,6 @@ struct mbuf *tulip_txput(tulip_softc_t * const sc, struct mbuf *m, int); void tulip_txput_setup(tulip_softc_t * const sc); int tulip_ifioctl(struct ifnet * ifp, u_long cmd, caddr_t data); void tulip_ifstart(struct ifnet *ifp); -void tulip_ifstart_one(struct ifnet *ifp); void tulip_ifwatchdog(struct ifnet *ifp); int tulip_busdma_allocmem(tulip_softc_t * const sc, size_t size, bus_dmamap_t *map_p, tulip_desc_t **desc_p); @@ -4255,35 +4254,11 @@ tulip_ifstart(struct ifnet * const ifp) break; } } -#ifdef ALTQ - if (0) /* don't switch to the one packet mode */ -#else - if (IFQ_IS_EMPTY(&sc->tulip_if.if_snd)) -#endif - sc->tulip_if.if_start = tulip_ifstart_one; } TULIP_PERFEND(ifstart); } -void -tulip_ifstart_one(struct ifnet * const ifp) -{ - TULIP_PERFSTART(ifstart_one) - tulip_softc_t * const sc = TULIP_IFP_TO_SOFTC(ifp); - - if ((sc->tulip_if.if_flags & IFF_RUNNING) - && !IFQ_IS_EMPTY(&sc->tulip_if.if_snd)) { - struct mbuf *m, *m0; - IFQ_POLL(&sc->tulip_if.if_snd, m); - if (m != NULL && (m0 = tulip_txput(sc, m, 0)) != NULL) - if (m0 != m) - /* should not happen */ - printf("tulip_if_start_one: txput failed!\n"); - } - TULIP_PERFEND(ifstart_one); -} - void tulip_ifwatchdog(struct ifnet *ifp) { -- 2.20.1