diff options
117 files changed, 308 insertions, 315 deletions
diff --git a/sys/arch/armv7/omap/if_cpsw.c b/sys/arch/armv7/omap/if_cpsw.c index 6c9f0f86f87..2d8dfc29a7b 100644 --- a/sys/arch/armv7/omap/if_cpsw.c +++ b/sys/arch/armv7/omap/if_cpsw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cpsw.c,v 1.48 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: if_cpsw.c,v 1.49 2020/07/10 13:26:36 patrick Exp $ */ /* $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $ */ /* @@ -448,7 +448,7 @@ cpsw_attach(struct device *parent, struct device *self, void *aux) ifp->if_start = cpsw_start; ifp->if_ioctl = cpsw_ioctl; ifp->if_watchdog = cpsw_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, CPSW_NTXDESCS - 1); + ifq_set_maxlen(&ifp->if_snd, CPSW_NTXDESCS - 1); memcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); cpsw_stop(ifp); @@ -520,7 +520,7 @@ cpsw_start(struct ifnet *ifp) if (!ISSET(ifp->if_flags, IFF_RUNNING) || ifq_is_oactive(&ifp->if_snd) || - IFQ_IS_EMPTY(&ifp->if_snd)) + ifq_empty(&ifp->if_snd)) return; if (sc->sc_txnext >= sc->sc_txhead) diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c index c1c4259a783..a8850cba930 100644 --- a/sys/arch/armv7/sunxi/sxie.c +++ b/sys/arch/armv7/sunxi/sxie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxie.c,v 1.28 2019/09/12 03:17:12 jsg Exp $ */ +/* $OpenBSD: sxie.c,v 1.29 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * Copyright (c) 2013 Artturi Alm @@ -267,7 +267,7 @@ sxie_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = sxie_watchdog; ifp->if_capabilities = IFCAP_VLAN_MTU; /* XXX status check in recv? */ - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* Initialize MII/media info. */ mii = &sc->sc_mii; diff --git a/sys/arch/octeon/dev/if_cnmac.c b/sys/arch/octeon/dev/if_cnmac.c index 4be44bf2c9e..c9156f7db22 100644 --- a/sys/arch/octeon/dev/if_cnmac.c +++ b/sys/arch/octeon/dev/if_cnmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnmac.c,v 1.76 2020/07/04 09:00:09 visa Exp $ */ +/* $OpenBSD: if_cnmac.c,v 1.77 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -310,7 +310,7 @@ cnmac_attach(struct device *parent, struct device *self, void *aux) ifp->if_qstart = cnmac_start; ifp->if_watchdog = cnmac_watchdog; ifp->if_hardmtu = CNMAC_MAX_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, max(GATHER_QUEUE_SIZE, IFQ_MAXLEN)); + ifq_set_maxlen(&ifp->if_snd, max(GATHER_QUEUE_SIZE, IFQ_MAXLEN)); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4 | IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6; diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index 6408f16b62e..44c58f42de8 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.26 2017/07/19 12:23:16 claudio Exp $ */ +/* $OpenBSD: if_iec.c,v 1.27 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -408,7 +408,7 @@ iec_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = iec_watchdog; if_attach(ifp); - IFQ_SET_MAXLEN(&ifp->if_snd, IEC_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, IEC_NTXDESC - 1); ether_ifattach(ifp); /* Establish interrupt handler. */ diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index f8b18abcc16..f9a2e4876c1 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.40 2018/12/10 05:42:34 visa Exp $ */ +/* $OpenBSD: if_mec.c,v 1.41 2020/07/10 13:26:36 patrick Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -460,7 +460,7 @@ mec_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = mec_watchdog; if_attach(ifp); - IFQ_SET_MAXLEN(&ifp->if_snd, MEC_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, MEC_NTXDESC - 1); ether_ifattach(ifp); /* Establish interrupt handler. */ diff --git a/sys/arch/sgi/hpc/if_sq.c b/sys/arch/sgi/hpc/if_sq.c index 65716393dce..89f704b8f6c 100644 --- a/sys/arch/sgi/hpc/if_sq.c +++ b/sys/arch/sgi/hpc/if_sq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sq.c,v 1.29 2017/03/08 15:07:10 mpi Exp $ */ +/* $OpenBSD: if_sq.c,v 1.30 2020/07/10 13:26:36 patrick Exp $ */ /* $NetBSD: if_sq.c,v 1.42 2011/07/01 18:53:47 dyoung Exp $ */ /* @@ -362,7 +362,7 @@ sq_attach(struct device *parent, struct device *self, void *aux) ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST; if_attach(ifp); - IFQ_SET_MAXLEN(&ifp->if_snd, SQ_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, SQ_NTXDESC - 1); ether_ifattach(ifp); if (haa->hpc_regs->revision == 3) { diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index 68bc88d677e..2eaeabc22aa 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.61 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2009, 2015 Mark Kettenis * @@ -314,7 +314,7 @@ vnet_attach(struct device *parent, struct device *self, void *aux) ifp->if_start = vnet_start; ifp->if_watchdog = vnet_watchdog; strlcpy(ifp->if_xname, sc->sc_dv.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, 31); /* XXX */ + ifq_set_maxlen(&ifp->if_snd, 31); /* XXX */ ifmedia_init(&sc->sc_media, 0, vnet_media_change, vnet_media_status); ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_AUTO, 0, NULL); @@ -1087,7 +1087,7 @@ vnet_start(struct ifnet *ifp) if (!(ifp->if_flags & IFF_RUNNING) || ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; /* diff --git a/sys/dev/fdt/if_dwge.c b/sys/dev/fdt/if_dwge.c index 0ca21490caf..58114bf3e38 100644 --- a/sys/dev/fdt/if_dwge.c +++ b/sys/dev/fdt/if_dwge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dwge.c,v 1.3 2020/06/22 02:23:21 dlg Exp $ */ +/* $OpenBSD: if_dwge.c,v 1.4 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org> * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -392,7 +392,7 @@ dwge_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = dwge_ioctl; ifp->if_start = dwge_start; ifp->if_watchdog = dwge_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, DWGE_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, DWGE_NTXDESC - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -540,7 +540,7 @@ dwge_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; if (!sc->sc_link) return; diff --git a/sys/dev/fdt/if_dwxe.c b/sys/dev/fdt/if_dwxe.c index 6d70551a697..e4895a9a044 100644 --- a/sys/dev/fdt/if_dwxe.c +++ b/sys/dev/fdt/if_dwxe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dwxe.c,v 1.16 2020/06/22 02:23:21 dlg Exp $ */ +/* $OpenBSD: if_dwxe.c,v 1.17 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -434,7 +434,7 @@ dwxe_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = dwxe_ioctl; ifp->if_start = dwxe_start; ifp->if_watchdog = dwxe_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, DWXE_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, DWXE_NTXDESC - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -594,7 +594,7 @@ dwxe_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; if (!sc->sc_link) return; diff --git a/sys/dev/fdt/if_fec.c b/sys/dev/fdt/if_fec.c index 3324f9dd672..d870a633f94 100644 --- a/sys/dev/fdt/if_fec.c +++ b/sys/dev/fdt/if_fec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fec.c,v 1.9 2020/06/22 02:23:21 dlg Exp $ */ +/* $OpenBSD: if_fec.c,v 1.10 2020/07/10 13:26:36 patrick Exp $ */ /* * Copyright (c) 2012-2013,2019 Patrick Wildt <patrick@blueri.se> * @@ -857,7 +857,7 @@ fec_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; idx = sc->sc_tx_prod; @@ -1016,7 +1016,7 @@ fec_intr(void *arg) fec_tx_proc(sc); /* Try to transmit. */ - if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifp->if_flags & IFF_RUNNING && !ifq_empty(&ifp->if_snd)) fec_start(ifp); return 1; diff --git a/sys/dev/fdt/if_mvneta.c b/sys/dev/fdt/if_mvneta.c index 79e436d6607..0e9d542c321 100644 --- a/sys/dev/fdt/if_mvneta.c +++ b/sys/dev/fdt/if_mvneta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvneta.c,v 1.12 2020/06/25 12:39:19 patrick Exp $ */ +/* $OpenBSD: if_mvneta.c,v 1.13 2020/07/10 13:26:36 patrick Exp $ */ /* $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $ */ /* * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi @@ -621,7 +621,7 @@ mvneta_attach(struct device *parent, struct device *self, void *aux) ifp->if_capabilities &= ~IFCAP_CSUM_TCPv4; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, max(MVNETA_TX_RING_CNT - 1, IFQ_MAXLEN)); + ifq_set_maxlen(&ifp->if_snd, max(MVNETA_TX_RING_CNT - 1, IFQ_MAXLEN)); strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, sizeof(ifp->if_xname)); /* @@ -728,7 +728,7 @@ mvneta_intr(void *arg) if (ic & MVNETA_PRXTXTI_RBICTAPQ(0)) mvneta_rx_proc(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mvneta_start(ifp); return 1; @@ -747,7 +747,7 @@ mvneta_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; /* If Link is DOWN, can't start TX */ diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c index cf3083f4fb7..e459dd16ed3 100644 --- a/sys/dev/fdt/if_mvpp.c +++ b/sys/dev/fdt/if_mvpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvpp.c,v 1.7 2020/06/26 21:02:36 patrick Exp $ */ +/* $OpenBSD: if_mvpp.c,v 1.8 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org> * Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se> @@ -1433,7 +1433,7 @@ mvpp2_port_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = mvpp2_ioctl; ifp->if_start = mvpp2_start; ifp->if_watchdog = mvpp2_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, MVPP2_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, MVPP2_NTXDESC - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1600,7 +1600,7 @@ mvpp2_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; if (!sc->sc_link) return; diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 806d8c184a8..b26fce44c8f 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.123 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: acx.c,v 1.124 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -284,7 +284,7 @@ acx_attach(struct acx_softc *sc) ifp->if_watchdog = acx_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* Set channels */ for (i = 1; i <= 14; ++i) { diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 78239f2804c..6ace32dbff3 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.c,v 1.22 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: aic6915.c,v 1.23 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ /*- @@ -289,7 +289,7 @@ sf_attach(struct sf_softc *sc) ifp->if_ioctl = sf_ioctl; ifp->if_start = sf_start; ifp->if_watchdog = sf_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, SF_NTXDESC_MASK); + ifq_set_maxlen(&ifp->if_snd, SF_NTXDESC_MASK); /* * Attach the interface. diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index 421e5749ae5..e92aa27a7f0 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.75 2019/11/07 12:56:34 bluhm Exp $ */ +/* $OpenBSD: an.c,v 1.76 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -562,7 +562,7 @@ an_intr(void *arg) if (ifq_is_oactive(&ifp->if_snd) == 0 && sc->sc_ic.ic_state == IEEE80211_S_RUN && - !IFQ_IS_EMPTY(&ifp->if_snd)) + !ifq_empty(&ifp->if_snd)) an_start(ifp); } diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 53f8f22e330..bac05281930 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.120 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: ath.c,v 1.121 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -355,7 +355,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) #ifndef __OpenBSD__ ifp->if_stop = ath_stop; /* XXX */ #endif - IFQ_SET_MAXLEN(&ifp->if_snd, ATH_TXBUF * ATH_TXDESC); + ifq_set_maxlen(&ifp->if_snd, ATH_TXBUF * ATH_TXDESC); ic->ic_softc = sc; ic->ic_newassoc = ath_newassoc; diff --git a/sys/dev/ic/bcmgenet.c b/sys/dev/ic/bcmgenet.c index 3da74eaf968..c9b21f7768b 100644 --- a/sys/dev/ic/bcmgenet.c +++ b/sys/dev/ic/bcmgenet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcmgenet.c,v 1.2 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: bcmgenet.c,v 1.3 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: bcmgenet.c,v 1.3 2020/02/27 17:30:07 jmcneill Exp $ */ /*- @@ -975,7 +975,7 @@ genet_attach(struct genet_softc *sc) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = genet_start; ifp->if_ioctl = genet_ioctl; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* 802.1Q VLAN-sized frames are supported */ ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index 15f1bbfb510..8942bc3b479 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.72 2020/06/19 20:56:23 kettenis Exp $ */ +/* $OpenBSD: bwfm.c,v 1.73 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -352,7 +352,7 @@ bwfm_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; /* TODO: return if no link? */ diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 73caf29a7f3..91948caf03b 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.129 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: bwi.c,v 1.130 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -789,7 +789,7 @@ bwi_attach(struct bwi_softc *sc) ifp->if_watchdog = bwi_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* Get locale */ sc->sc_locale = __SHIFTOUT(bwi_read_sprom(sc, BWI_SPROM_CARD_INFO), diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 9903977378e..7162fd885c9 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.153 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: dc.c,v 1.154 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1698,7 +1698,7 @@ hasmac: ifp->if_ioctl = dc_ioctl; ifp->if_start = dc_start; ifp->if_watchdog = dc_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, DC_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, DC_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -2358,7 +2358,7 @@ dc_tick(void *xsc) if (!sc->dc_link && mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->dc_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); } @@ -2488,7 +2488,7 @@ dc_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, DC_IMR, DC_INTRS); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); return (claimed); @@ -2959,7 +2959,7 @@ dc_watchdog(struct ifnet *ifp) dc_init(sc); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); } diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 5b722b758c5..5cab63c21c7 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.96 2018/11/09 14:14:31 claudio Exp $ */ +/* $OpenBSD: elink3.c,v 1.97 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -334,7 +334,7 @@ epconfig(struct ep_softc *sc, u_short chipset, u_int8_t *enaddr) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; /* 64 packets are around 100ms on 10Mbps */ - IFQ_SET_MAXLEN(&ifp->if_snd, 64); + ifq_set_maxlen(&ifp->if_snd, 64); if_attach(ifp); ether_ifattach(ifp); diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 9041fbb8af8..349b17f7168 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.131 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: fxp.c,v 1.132 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -429,7 +429,7 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr) ifp->if_ioctl = fxp_ioctl; ifp->if_start = fxp_start; ifp->if_watchdog = fxp_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, FXP_NTXCB - 1); + ifq_set_maxlen(&ifp->if_snd, FXP_NTXCB - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -835,7 +835,7 @@ fxp_intr(void *arg) ifp->if_timer = sc->sc_cbt_cnt ? 5 : 0; sc->sc_cbt_cons = txs; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + if (!ifq_empty(&ifp->if_snd)) { /* * Try to start more packets transmitting. */ diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index fc1480d14fe..0cd66dbfd63 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.124 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: gem.c,v 1.125 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -222,7 +222,7 @@ gem_config(struct gem_softc *sc) ifp->if_qstart = gem_start; ifp->if_ioctl = gem_ioctl; ifp->if_watchdog = gem_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, GEM_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, GEM_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index 6ab438eda0a..6895e28c175 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.173 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: if_wi.c,v 1.174 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -512,7 +512,7 @@ wi_intr(void *vsc) if (status == 0) return (0); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) wi_start(ifp); return (1); diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index 6f52d451aeb..76e7ae20574 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.120 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: malo.c,v 1.121 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -347,7 +347,7 @@ malo_attach(struct malo_softc *sc) ifp->if_watchdog = malo_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* set supported rates */ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b; diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index f5639ff1960..1392815ab4c 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.32 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.33 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -798,7 +798,7 @@ mtd_watchdog(struct ifnet *ifp) mtd_init(ifp); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mtd_start(ifp); } @@ -851,7 +851,7 @@ mtd_intr(void *xsc) /* Re-enable interrupts. */ CSR_WRITE_4(MTD_IMR, IMR_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mtd_start(ifp); return (claimed); diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index 40d8cfe1aea..6847e5c3be9 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.98 2020/02/20 15:32:17 cheloha Exp $ */ +/* $OpenBSD: pgt.c,v 1.99 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1239,7 +1239,7 @@ pgt_intr(void *arg) pgt_read_4(sc, PGT_REG_CTRL_STAT))); } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) pgt_start(ifp); return (1); @@ -1878,7 +1878,7 @@ pgt_net_attach(struct pgt_softc *sc) ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* * Set channels @@ -2116,7 +2116,7 @@ pgt_start(struct ifnet *ifp) * net80211 management queue. */ for (; sc->sc_dirtyq_count[PGT_QUEUE_DATA_LOW_TX] < - PGT_QUEUE_FULL_THRESHOLD && !IFQ_IS_EMPTY(&ifp->if_snd);) { + PGT_QUEUE_FULL_THRESHOLD && !ifq_empty(&ifp->if_snd);) { pd = TAILQ_FIRST(&sc->sc_freeq[PGT_QUEUE_DATA_LOW_TX]); m = ifq_deq_begin(&ifp->if_snd); if (m == NULL) diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index ce00fbc20da..9a0ad251d86 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.205 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: re.c,v 1.206 2020/07/10 13:26:37 patrick Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1008,7 +1008,7 @@ re_attach(struct rl_softc *sc, const char *intrstr) ifp->if_qstart = re_start; ifp->if_watchdog = re_watchdog; ifp->if_hardmtu = sc->rl_max_mtu; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->rl_ldata.rl_tx_desc_cnt); + ifq_set_maxlen(&ifp->if_snd, sc->rl_ldata.rl_tx_desc_cnt); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 1726d68f218..fa642d3617b 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.97 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.98 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998 @@ -774,7 +774,7 @@ rl_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_2(sc, RL_IMR, RL_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) rl_start(ifp); return (claimed); diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 8811dd95783..517e4ab5a7d 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc83c170.c,v 1.28 2018/07/03 14:33:43 kevlo Exp $ */ +/* $OpenBSD: smc83c170.c,v 1.29 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */ /*- @@ -278,7 +278,7 @@ epic_attach(struct epic_softc *sc, const char *intrstr) ifp->if_ioctl = epic_ioctl; ifp->if_start = epic_start; ifp->if_watchdog = epic_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, EPIC_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, EPIC_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c index 43653ca6631..da779ef51ce 100644 --- a/sys/dev/ic/ti.c +++ b/sys/dev/ic/ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ti.c,v 1.26 2019/09/25 09:30:28 kevlo Exp $ */ +/* $OpenBSD: ti.c,v 1.27 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1443,7 +1443,7 @@ ti_attach(struct ti_softc *sc) ifp->if_start = ti_start; ifp->if_watchdog = ti_watchdog; ifp->if_hardmtu = TI_JUMBO_FRAMELEN - ETHER_HDR_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, TI_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, TI_TX_RING_CNT - 1); bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1737,7 +1737,7 @@ ti_intr(void *xsc) /* Re-enable interrupts. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0); - if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifp->if_flags & IFF_RUNNING && !ifq_empty(&ifp->if_snd)) ti_start(ifp); return (1); diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index e4c3dd23daf..463d1a0297f 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.134 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: xl.c,v 1.135 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1467,7 +1467,7 @@ xl_intr(void *arg) } } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) (*ifp->if_start)(ifp); return (claimed); @@ -2234,7 +2234,7 @@ xl_watchdog(struct ifnet *ifp) xl_rxeof(sc); xl_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) (*ifp->if_start)(ifp); } @@ -2462,7 +2462,7 @@ xl_attach(struct xl_softc *sc) ifp->if_start = xl_start; ifp->if_watchdog = xl_watchdog; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, XL_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, XL_TX_LIST_CNT - 1); memcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index 04f90e46213..88249fe0516 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.46 2017/06/04 20:28:05 naddy Exp $ */ +/* $OpenBSD: if_ex.c,v 1.47 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -590,7 +590,7 @@ ex_intr(void *arg) * be sent, attempt to send more packets to the network card. */ - if (send_pkts && IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (send_pkts && ifq_empty(&ifp->if_snd) == 0) ex_start(ifp); #ifdef EX_DEBUG exintr_count--; diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index 1d3947948e1..5a923078129 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_age.c,v 1.36 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_age.c,v 1.37 2020/07/10 13:26:37 patrick Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> @@ -220,7 +220,7 @@ age_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = age_ioctl; ifp->if_start = age_start; ifp->if_watchdog = age_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, AGE_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, AGE_TX_RING_CNT - 1); bcopy(sc->age_eaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -960,7 +960,7 @@ age_start(struct ifnet *ifp) return; if ((sc->age_flags & AGE_FLAG_LINK) == 0) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; enq = 0; diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 3e718c552ae..d15cf7ba26b 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.53 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_alc.c,v 1.54 2020/07/10 13:26:37 patrick Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1382,7 +1382,7 @@ alc_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = alc_ioctl; ifp->if_start = alc_start; ifp->if_watchdog = alc_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, ALC_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, ALC_TX_RING_CNT - 1); bcopy(sc->alc_eaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -1905,7 +1905,7 @@ alc_start(struct ifnet *ifp) return; if ((sc->alc_flags & ALC_FLAG_LINK) == 0) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; for (;;) { diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index e5c5da37a7c..fecc6f0ef27 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.47 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_ale.c,v 1.48 2020/07/10 13:26:37 patrick Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -499,7 +499,7 @@ ale_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = ale_ioctl; ifp->if_start = ale_start; ifp->if_watchdog = ale_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, ALE_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, ALE_TX_RING_CNT - 1); bcopy(sc->ale_eaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -986,7 +986,7 @@ ale_start(struct ifnet *ifp) return; if ((sc->ale_flags & ALE_FLAG_LINK) == 0) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; enq = 0; diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 75506f2fdb3..337a9795dd4 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.390 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_bge.c,v 1.391 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -2999,7 +2999,7 @@ bge_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = bge_ioctl; ifp->if_qstart = bge_start; ifp->if_watchdog = bge_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, BGE_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, BGE_TX_RING_CNT - 1); DPRINTFN(5, ("bcopy\n")); bcopy(sc->bge_dev.dv_xname, ifp->if_xname, IFNAMSIZ); diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index a672f14cd1b..771735cb308 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.128 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.129 2020/07/10 13:26:37 patrick Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -877,7 +877,7 @@ bnx_attachhook(struct device *self) ifp->if_watchdog = bnx_watchdog; ifp->if_hardmtu = BNX_MAX_JUMBO_ETHER_MTU_VLAN - sizeof(struct ether_header); - IFQ_SET_MAXLEN(&ifp->if_snd, USABLE_TX_BD - 1); + ifq_set_maxlen(&ifp->if_snd, USABLE_TX_BD - 1); bcopy(sc->eaddr, sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->bnx_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -5152,7 +5152,7 @@ bnx_intr(void *xsc) /* Start moving packets again */ if (ifp->if_flags & IFF_RUNNING && - !IFQ_IS_EMPTY(&ifp->if_snd)) + !ifq_empty(&ifp->if_snd)) ifq_start(&ifp->if_snd); } diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index 934b125ca3f..3bbff64ee14 100644 --- a/sys/dev/pci/if_bnxt.c +++ b/sys/dev/pci/if_bnxt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxt.c,v 1.25 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.26 2020/07/10 13:26:37 patrick Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -608,7 +608,7 @@ bnxt_attach(struct device *parent, struct device *self, void *aux) #if NVLAN > 0 ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, 1024); /* ? */ + ifq_set_maxlen(&ifp->if_snd, 1024); /* ? */ ifmedia_init(&sc->sc_media, IFM_IMASK, bnxt_media_change, bnxt_media_status); diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index 3e4f4de7b4f..8172e35f5f0 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.52 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_cas.c,v 1.53 2020/07/10 13:26:37 patrick Exp $ */ /* * @@ -493,7 +493,7 @@ cas_config(struct cas_softc *sc) ifp->if_start = cas_start; ifp->if_ioctl = cas_ioctl; ifp->if_watchdog = cas_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, CAS_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, CAS_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1859,7 +1859,7 @@ cas_tint(struct cas_softc *sc, u_int32_t status) if (used == 0) ifp->if_timer = 0; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + if (!ifq_empty(&ifp->if_snd)) { KERNEL_LOCK(); cas_start(ifp); KERNEL_UNLOCK(); diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 640d12b9daf..0a083b940ed 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.354 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_em.c,v 1.355 2020/07/10 13:26:37 patrick Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -1935,7 +1935,7 @@ em_setup_interface(struct em_softc *sc) ifp->if_watchdog = em_watchdog; ifp->if_hardmtu = sc->hw.max_frame_size - ETHER_HDR_LEN - ETHER_CRC_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_slots - 1); + ifq_set_maxlen(&ifp->if_snd, sc->sc_tx_slots - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index b10094cb72e..3146c98bc88 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_et.c,v 1.38 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_et.c,v 1.39 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. * @@ -245,7 +245,7 @@ et_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = et_ioctl; ifp->if_start = et_start; ifp->if_watchdog = et_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, ET_TX_NDESC); + ifq_set_maxlen(&ifp->if_snd, ET_TX_NDESC); strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_iavf.c b/sys/dev/pci/if_iavf.c index b6ac8aacf64..fc2fb49a6ae 100644 --- a/sys/dev/pci/if_iavf.c +++ b/sys/dev/pci/if_iavf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iavf.c,v 1.8 2020/06/25 04:25:55 dlg Exp $ */ +/* $OpenBSD: if_iavf.c,v 1.9 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -890,7 +890,7 @@ iavf_attach(struct device *parent, struct device *self, void *aux) if (ifp->if_hardmtu == 0) ifp->if_hardmtu = IAVF_HARDMTU; strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_ndescs); + ifq_set_maxlen(&ifp->if_snd, sc->sc_tx_ring_ndescs); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; #if 0 diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 9f621f18bcc..da4ea7236c4 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.166 2020/06/07 23:52:05 dlg Exp $ */ +/* $OpenBSD: if_ix.c,v 1.167 2020/07/10 13:26:38 patrick Exp $ */ /****************************************************************************** @@ -1867,7 +1867,7 @@ ixgbe_setup_interface(struct ix_softc *sc) ifp->if_watchdog = ixgbe_watchdog; ifp->if_hardmtu = IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1); + ifq_set_maxlen(&ifp->if_snd, sc->num_tx_desc - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 99e74146100..7f49df7c974 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.71 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.72 2020/07/10 13:26:38 patrick Exp $ */ #include <dev/pci/if_ixgb.h> @@ -548,7 +548,7 @@ ixgb_intr(void *arg) } } - if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifp->if_flags & IFF_RUNNING && !ifq_empty(&ifp->if_snd)) ixgb_start(ifp); return (claimed); @@ -1011,7 +1011,7 @@ ixgb_setup_interface(struct ixgb_softc *sc) ifp->if_watchdog = ixgb_watchdog; ifp->if_hardmtu = IXGB_MAX_JUMBO_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1); + ifq_set_maxlen(&ifp->if_snd, sc->num_tx_desc - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c index ae8b8daf91f..cb6906156d7 100644 --- a/sys/dev/pci/if_ixl.c +++ b/sys/dev/pci/if_ixl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ixl.c,v 1.63 2020/07/07 12:40:30 dlg Exp $ */ +/* $OpenBSD: if_ixl.c,v 1.64 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -1915,7 +1915,7 @@ ixl_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = ixl_watchdog; ifp->if_hardmtu = IXL_HARDMTU; strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_ndescs); + ifq_set_maxlen(&ifp->if_snd, sc->sc_tx_ring_ndescs); ifp->if_capabilities = IFCAP_VLAN_MTU; #if 0 diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c index 95b3f6cd666..cb546e23c70 100644 --- a/sys/dev/pci/if_jme.c +++ b/sys/dev/pci/if_jme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_jme.c,v 1.53 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: if_jme.c,v 1.54 2020/07/10 13:26:38 patrick Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -662,7 +662,7 @@ jme_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = jme_ioctl; ifp->if_start = jme_start; ifp->if_watchdog = jme_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, JME_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, JME_TX_RING_CNT - 1); strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 | @@ -1205,7 +1205,7 @@ jme_start(struct ifnet *ifp) return; if ((sc->jme_flags & JME_FLAG_LINK) == 0) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; for (;;) { diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index 0784367c62f..fa90aee736d 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.74 2019/09/25 09:30:28 kevlo Exp $ */ +/* $OpenBSD: if_lge.c,v 1.75 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -499,7 +499,7 @@ lge_attach(struct device *parent, struct device *self, void *aux) ifp->if_start = lge_start; ifp->if_watchdog = lge_watchdog; ifp->if_hardmtu = LGE_JUMBO_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, LGE_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, LGE_TX_LIST_CNT - 1); DPRINTFN(5, ("bcopy\n")); bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -814,7 +814,7 @@ lge_tick(void *xsc) if (mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->lge_link++; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) lge_start(ifp); } } @@ -873,7 +873,7 @@ lge_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, LGE_IMR, LGE_IMR_SETRST_CTL0|LGE_IMR_INTR_ENB); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) lge_start(ifp); return (claimed); @@ -1227,7 +1227,7 @@ lge_watchdog(struct ifnet *ifp) lge_reset(sc); lge_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) lge_start(ifp); } diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index 49778d78f37..4cf44343750 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.61 2020/07/09 01:08:55 dlg Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.62 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2017 David Gwynne <dlg@openbsd.org> @@ -2563,7 +2563,7 @@ mcx_attach(struct device *parent, struct device *self, void *aux) #if NVLAN > 0 ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, 1024); + ifq_set_maxlen(&ifp->if_snd, 1024); ifmedia_init(&sc->sc_media, IFM_IMASK, mcx_media_change, mcx_media_status); diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 95fd778440c..371d3b5b920 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.134 2020/01/05 01:07:58 jsg Exp $ */ +/* $OpenBSD: if_msk.c,v 1.135 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -939,7 +939,7 @@ msk_attach(struct device *parent, struct device *self, void *aux) if (sc->sk_type != SK_YUKON_FE && sc->sk_type != SK_YUKON_FE_P) ifp->if_hardmtu = SK_JUMBO_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, MSK_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, MSK_TX_RING_CNT - 1); bcopy(sc_if->sk_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index e491726b4bf..c2885f88eb7 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.108 2019/07/03 10:34:59 dlg Exp $ */ +/* $OpenBSD: if_myx.c,v 1.109 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -512,7 +512,7 @@ myx_attachhook(struct device *self) ifp->if_watchdog = myx_watchdog; ifp->if_hardmtu = MYX_RXBIG_SIZE; strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, 1); + ifq_set_maxlen(&ifp->if_snd, 1); ifp->if_capabilities = IFCAP_VLAN_MTU; #if 0 @@ -1065,7 +1065,7 @@ myx_up(struct myx_softc *sc) sc->sc_tx_ring_count = r / sizeof(struct myx_tx_desc); sc->sc_tx_nsegs = min(16, sc->sc_tx_ring_count / 4); /* magic */ sc->sc_tx_count = 0; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_count - 1); + ifq_set_maxlen(&ifp->if_snd, sc->sc_tx_ring_count - 1); /* Allocate Interrupt Queue */ diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c index 72a6e3e328b..35e3c7eec1d 100644 --- a/sys/dev/pci/if_nep.c +++ b/sys/dev/pci/if_nep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nep.c,v 1.32 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_nep.c,v 1.33 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2014, 2015 Mark Kettenis * @@ -1876,7 +1876,7 @@ nep_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; idx = sc->sc_tx_prod; diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index baba17caeb0..e34ffc219a5 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.121 2019/09/25 09:30:28 kevlo Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.122 2020/07/10 13:26:38 patrick Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr> @@ -320,7 +320,7 @@ nfe_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = nfe_ioctl; ifp->if_start = nfe_start; ifp->if_watchdog = nfe_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, NFE_IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, NFE_IFQ_MAXLEN); strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index b2195e18e29..8a6ea7e2301 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.93 2019/09/25 09:30:28 kevlo Exp $ */ +/* $OpenBSD: if_nge.c,v 1.94 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -792,7 +792,7 @@ nge_attach(struct device *parent, struct device *self, void *aux) ifp->if_start = nge_start; ifp->if_watchdog = nge_watchdog; ifp->if_hardmtu = NGE_JUMBO_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, NGE_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, NGE_TX_LIST_CNT - 1); DPRINTFN(5, ("%s: bcopy\n", sc->sc_dv.dv_xname)); bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -1218,7 +1218,7 @@ nge_tick(void *xsc) DPRINTF(("%s: gigabit link up\n", sc->sc_dv.dv_xname)); sc->nge_link++; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) nge_start(ifp); } else { mii_tick(mii); @@ -1228,7 +1228,7 @@ nge_tick(void *xsc) if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) DPRINTF(("%s: gigabit link up\n", sc->sc_dv.dv_xname)); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) nge_start(ifp); } @@ -1310,7 +1310,7 @@ nge_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, NGE_IER, 1); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) nge_start(ifp); /* Data LED off for TBI mode */ @@ -1849,7 +1849,7 @@ nge_watchdog(struct ifnet *ifp) ifp->if_flags &= ~IFF_RUNNING; nge_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) nge_start(ifp); } diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c index 8971b7a7b9d..d880d798eee 100644 --- a/sys/dev/pci/if_nxe.c +++ b/sys/dev/pci/if_nxe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nxe.c,v 1.76 2020/01/05 01:07:58 jsg Exp $ */ +/* $OpenBSD: if_nxe.c,v 1.77 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -919,7 +919,7 @@ nxe_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = nxe_watchdog; ifp->if_hardmtu = MCLBYTES - ETHER_HDR_LEN - ETHER_CRC_LEN; strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, 512); /* XXX */ + ifq_set_maxlen(&ifp->if_snd, 512); /* XXX */ ifmedia_init(&sc->sc_media, 0, nxe_media_change, nxe_media_status); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_AUTO, 0, NULL); @@ -1308,7 +1308,7 @@ nxe_start(struct ifnet *ifp) if (!ISSET(ifp->if_flags, IFF_RUNNING) || ifq_is_oactive(&ifp->if_snd) || - IFQ_IS_EMPTY(&ifp->if_snd)) + ifq_empty(&ifp->if_snd)) return; if (nxe_ring_writeable(nr, sc->sc_cmd_consumer_cur) < NXE_TXD_DESCS) { diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index 7d104f016cf..662e58ae91a 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.102 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_oce.c,v 1.103 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -823,7 +823,7 @@ oce_attach_ifp(struct oce_softc *sc) ifp->if_watchdog = oce_watchdog; ifp->if_hardmtu = OCE_MAX_MTU; ifp->if_softc = sc; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_size - 1); + ifq_set_maxlen(&ifp->if_snd, sc->sc_tx_ring_size - 1); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4; diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 6d6c367f077..02541cd7fb7 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.43 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.44 2020/07/10 13:26:38 patrick Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -769,7 +769,7 @@ pcn_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = pcn_ioctl; ifp->if_start = pcn_start; ifp->if_watchdog = pcn_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, PCN_NTXDESC -1); + ifq_set_maxlen(&ifp->if_snd, PCN_NTXDESC -1); /* Attach the interface. */ if_attach(ifp); diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c index 5b3fff4f0ea..2bb0cd3f968 100644 --- a/sys/dev/pci/if_rge.c +++ b/sys/dev/pci/if_rge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rge.c,v 1.3 2020/03/27 15:15:24 krw Exp $ */ +/* $OpenBSD: if_rge.c,v 1.4 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2019 Kevin Lo <kevlo@openbsd.org> @@ -242,7 +242,7 @@ rge_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = rge_ioctl; ifp->if_qstart = rge_start; ifp->if_watchdog = rge_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, RGE_TX_LIST_CNT); + ifq_set_maxlen(&ifp->if_snd, RGE_TX_LIST_CNT); ifp->if_hardmtu = RGE_JUMBO_MTU; ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 | diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c index 33fcdb0f27a..73b94d1934b 100644 --- a/sys/dev/pci/if_se.c +++ b/sys/dev/pci/if_se.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_se.c,v 1.20 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: if_se.c,v 1.21 2020/07/10 13:26:38 patrick Exp $ */ /*- * Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de> @@ -690,7 +690,7 @@ se_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = se_ioctl; ifp->if_start = se_start; ifp->if_watchdog = se_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, SE_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, SE_TX_RING_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1041,7 +1041,7 @@ se_tick(void *xsc) if ((sc->sc_flags & SE_FLAG_LINK) == 0) { se_miibus_statchg(&sc->sc_dev); if ((sc->sc_flags & SE_FLAG_LINK) != 0 && - !IFQ_IS_EMPTY(&ifp->if_snd)) + !ifq_empty(&ifp->if_snd)) se_start(ifp); } splx(s); @@ -1088,7 +1088,7 @@ se_intr(void *arg) if ((ifp->if_flags & IFF_RUNNING) != 0) { /* Re-enable interrupts */ CSR_WRITE_4(sc, IntrMask, SE_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) se_start(ifp); } @@ -1402,7 +1402,7 @@ se_watchdog(struct ifnet *ifp) s = splnet(); se_init(ifp); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) se_start(ifp); splx(s); } diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 8860671c66a..61133b09308 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.136 2020/06/22 02:31:32 dlg Exp $ */ +/* $OpenBSD: if_sis.c,v 1.137 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1185,7 +1185,7 @@ sis_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = sis_ioctl; ifp->if_start = sis_start; ifp->if_watchdog = sis_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, SIS_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, SIS_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_hardmtu = 1518; /* determined experimentally on DP83815 */ @@ -1586,7 +1586,7 @@ sis_intr(void *arg) */ SIS_SETBIT(sc, SIS_CSR, SIS_CSR_RX_ENABLE); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) sis_start(ifp); return (1); @@ -1966,7 +1966,7 @@ sis_watchdog(struct ifnet *ifp) s = splnet(); sis_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) sis_start(ifp); splx(s); diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 94507976ba5..e7992d296ec 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.190 2020/06/22 02:31:33 dlg Exp $ */ +/* $OpenBSD: if_sk.c,v 1.191 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -998,7 +998,7 @@ sk_attach(struct device *parent, struct device *self, void *aux) ifp->if_start = sk_start; ifp->if_watchdog = sk_watchdog; ifp->if_hardmtu = SK_JUMBO_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, SK_TX_RING_CNT - 1); bcopy(sc_if->sk_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1929,9 +1929,9 @@ sk_intr(void *xsc) CSR_WRITE_4(sc, SK_IMR, sc->sk_intrmask); - if (ifp0 != NULL && !IFQ_IS_EMPTY(&ifp0->if_snd)) + if (ifp0 != NULL && !ifq_empty(&ifp0->if_snd)) sk_start(ifp0); - if (ifp1 != NULL && !IFQ_IS_EMPTY(&ifp1->if_snd)) + if (ifp1 != NULL && !ifq_empty(&ifp1->if_snd)) sk_start(ifp1); return (claimed); diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index faecd3f2f10..48ff4820043 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.66 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_ste.c,v 1.67 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -592,7 +592,7 @@ ste_intr(void *xsc) /* Re-enable interrupts */ CSR_WRITE_2(sc, STE_IMR, STE_INTRS); - if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifp->if_flags & IFF_RUNNING && !ifq_empty(&ifp->if_snd)) ste_start(ifp); return claimed; @@ -786,7 +786,7 @@ ste_stats_update(void *xsc) * otherwise we get stuck in the wrong link state */ ste_miibus_statchg((struct device *)sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) ste_start(ifp); } } @@ -900,7 +900,7 @@ ste_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = ste_ioctl; ifp->if_start = ste_start; ifp->if_watchdog = ste_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, STE_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, STE_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1390,6 +1390,6 @@ ste_watchdog(struct ifnet *ifp) ste_rxeof(sc); ste_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) ste_start(ifp); } diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 155ed623341..e92e320e20e 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.69 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: if_stge.c,v 1.70 2020/07/10 13:26:38 patrick Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -361,7 +361,7 @@ stge_attach(struct device *parent, struct device *self, void *aux) #ifdef STGE_JUMBO ifp->if_hardmtu = STGE_JUMBO_MTU; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, STGE_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, STGE_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index a562222fcb8..f37b6f4ec24 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.141 2020/01/09 14:35:19 mpi Exp $ */ +/* $OpenBSD: if_tht.c,v 1.142 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -782,7 +782,7 @@ tht_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = tht_watchdog; ifp->if_hardmtu = MCLBYTES - ETHER_HDR_LEN - ETHER_CRC_LEN; /* XXX */ strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, 400); + ifq_set_maxlen(&ifp->if_snd, 400); ifmedia_init(&sc->sc_media, 0, tht_media_change, tht_media_status); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_AUTO, 0, NULL); @@ -1099,7 +1099,7 @@ tht_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; if (tht_fifo_writable(sc, &sc->sc_txt) <= THT_FIFO_DESC_LEN) diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index df758ec328d..9a64cbd78d4 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.73 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_tl.c,v 1.74 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1295,7 +1295,7 @@ tl_intr(void *xsc) CMD_PUT(sc, TL_CMD_ACK | r | type); } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) tl_start(ifp); return r; @@ -1962,7 +1962,7 @@ tl_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = tl_ioctl; ifp->if_start = tl_start; ifp->if_watchdog = tl_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, TL_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, TL_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 718b4b8e08a..0092a1fab20 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.127 2017/08/23 10:10:56 mikeb Exp $ */ +/* $OpenBSD: if_txp.c,v 1.128 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2001 @@ -213,7 +213,7 @@ txp_attachhook(struct device *self) ifp->if_start = txp_start; ifp->if_watchdog = txp_watchdog; ifp->if_baudrate = IF_Mbps(10); - IFQ_SET_MAXLEN(&ifp->if_snd, TX_ENTRIES); + ifq_set_maxlen(&ifp->if_snd, TX_ENTRIES); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); txp_capabilities(sc); diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index f035069dff2..c728877cff9 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.73 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_vge.c,v 1.74 2020/07/10 13:26:38 patrick Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -777,7 +777,7 @@ vge_attach(struct device *parent, struct device *self, void *aux) #ifdef VGE_JUMBO ifp->if_hardmtu = VGE_JUMBO_MTU; #endif - IFQ_SET_MAXLEN(&ifp->if_snd, VGE_IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, VGE_IFQ_MAXLEN); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4; @@ -1231,7 +1231,7 @@ vge_tick(void *xsc) else ifp->if_link_state = LINK_STATE_HALF_DUPLEX; if_link_state_change(ifp); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vge_start(ifp); } } @@ -1299,7 +1299,7 @@ vge_intr(void *arg) /* Re-enable interrupts */ CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vge_start(ifp); return (claimed); @@ -1412,7 +1412,7 @@ vge_start(struct ifnet *ifp) if (!sc->vge_link || ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; idx = sc->vge_ldata.vge_tx_prodidx; diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index 1b007a49512..80d6a1df298 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.100 2020/06/22 02:31:33 dlg Exp $ */ +/* $OpenBSD: if_vic.c,v 1.101 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org> @@ -480,7 +480,7 @@ vic_attach(struct device *parent, struct device *self, void *aux) ifp->if_watchdog = vic_watchdog; ifp->if_hardmtu = VIC_JUMBO_MTU; strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_ntxbuf - 1); + ifq_set_maxlen(&ifp->if_snd, sc->sc_ntxbuf - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1039,7 +1039,7 @@ vic_start(struct ifnet *ifp) if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; sc = (struct vic_softc *)ifp->if_softc; @@ -1161,7 +1161,7 @@ vic_watchdog(struct ifnet *ifp) } } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vic_start(ifp); #endif } diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index 07dba87e710..f2dc04193b3 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.63 2020/07/07 10:14:35 dlg Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.64 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -371,7 +371,7 @@ vmxnet3_attach(struct device *parent, struct device *self, void *aux) if (sc->sc_ds->upt_features & UPT1_F_VLAN) ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; - IFQ_SET_MAXLEN(&ifp->if_snd, NTXDESC); + ifq_set_maxlen(&ifp->if_snd, NTXDESC); ifmedia_init(&sc->sc_media, IFM_IMASK, vmxnet3_media_change, vmxnet3_media_status); diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 98cd6de5e2c..c9aa6b9bce5 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.155 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_vr.c,v 1.156 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1167,7 +1167,7 @@ vr_intr(void *arg) } } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vr_start(ifp); return (claimed); @@ -1584,7 +1584,7 @@ vr_watchdog(struct ifnet *ifp) printf("%s: watchdog timeout\n", sc->sc_dev.dv_xname); vr_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vr_start(ifp); } diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index 291fb150d7b..3d880222d4f 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vte.c,v 1.23 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_vte.c,v 1.24 2020/07/10 13:26:38 patrick Exp $ */ /*- * Copyright (c) 2010, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -329,7 +329,7 @@ vte_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = vte_ioctl; ifp->if_start = vte_start; ifp->if_watchdog = vte_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, VTE_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, VTE_TX_RING_CNT - 1); bcopy(sc->vte_eaddr, sc->sc_arpcom.ac_enaddr, ETHER_ADDR_LEN); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -710,7 +710,7 @@ vte_watchdog(struct ifnet *ifp) ifp->if_oerrors++; vte_init(ifp); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vte_start(ifp); } @@ -870,7 +870,7 @@ vte_intr(void *arg) vte_txeof(sc); if (status & MISR_EVENT_CNT_OFLOW) vte_stats_update(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) vte_start(ifp); if (--n > 0) status = CSR_READ_2(sc, VTE_MISR); diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 20d74594fa3..72fba9c7274 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.71 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_wb.c,v 1.72 2020/07/10 13:26:38 patrick Exp $ */ /* * Copyright (c) 1997, 1998 @@ -784,7 +784,7 @@ wb_attach(parent, self, aux) ifp->if_ioctl = wb_ioctl; ifp->if_start = wb_start; ifp->if_watchdog = wb_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, WB_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, WB_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); @@ -1150,7 +1150,7 @@ int wb_intr(arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, WB_IMR, WB_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + if (!ifq_empty(&ifp->if_snd)) { wb_start(ifp); } @@ -1569,7 +1569,7 @@ void wb_watchdog(ifp) #endif wb_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) wb_start(ifp); return; diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 4aa4e6a3c5a..8f27541617c 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.78 2019/07/17 02:13:43 kevlo Exp $ */ +/* $OpenBSD: if_xge.c,v 1.79 2020/07/10 13:26:40 patrick Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -679,7 +679,7 @@ xge_attach(struct device *parent, struct device *self, void *aux) ifp->if_ioctl = xge_ioctl; ifp->if_start = xge_start; ifp->if_hardmtu = XGE_MAX_MTU; - IFQ_SET_MAXLEN(&ifp->if_snd, NTXDESCS - 1); + ifq_set_maxlen(&ifp->if_snd, NTXDESCS - 1); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4; diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index eda8f9324e1..609c1c50c5b 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.59 2017/01/22 10:17:39 dlg Exp $ */ +/* $OpenBSD: if_xe.c,v 1.60 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -718,7 +718,7 @@ xe_intr(arg) } /* Try to start more packets transmitting. */ - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) xe_start(ifp); /* Detected excessive collisions? */ diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c index 6d5e919b01c..9cce8ba7335 100644 --- a/sys/dev/pv/if_hvn.c +++ b/sys/dev/pv/if_hvn.c @@ -279,7 +279,7 @@ hvn_attach(struct device *parent, struct device *self, void *aux) #endif } - IFQ_SET_MAXLEN(&ifp->if_snd, HVN_TX_DESC - 1); + ifq_set_maxlen(&ifp->if_snd, HVN_TX_DESC - 1); ifmedia_init(&sc->sc_media, IFM_IMASK, hvn_media_change, hvn_media_status); diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c index a96b96b68ba..4b5e36a6eb3 100644 --- a/sys/dev/pv/if_vio.c +++ b/sys/dev/pv/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.17 2020/06/22 02:31:33 dlg Exp $ */ +/* $OpenBSD: if_vio.c,v 1.18 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -592,7 +592,7 @@ vio_attach(struct device *parent, struct device *self, void *aux) ifp->if_capabilities = IFCAP_VLAN_MTU; if (virtio_has_feature(vsc, VIRTIO_NET_F_CSUM)) ifp->if_capabilities |= IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4; - IFQ_SET_MAXLEN(&ifp->if_snd, vsc->sc_vqs[1].vq_num - 1); + ifq_set_maxlen(&ifp->if_snd, vsc->sc_vqs[1].vq_num - 1); ifmedia_init(&sc->sc_media, 0, vio_media_change, vio_media_status); ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO); @@ -723,7 +723,7 @@ vio_start(struct ifnet *ifp) if (!(ifp->if_flags & IFF_RUNNING) || ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; again: diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index 75d29eb584e..c7c07193a3f 100644 --- a/sys/dev/pv/if_xnf.c +++ b/sys/dev/pv/if_xnf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xnf.c,v 1.63 2018/01/20 20:03:45 mikeb Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.64 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -315,7 +315,7 @@ xnf_attach(struct device *parent, struct device *self, void *aux) if (sc->sc_caps & XNF_CAP_CSUM6) ifp->if_capabilities |= IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6; - IFQ_SET_MAXLEN(&ifp->if_snd, XNF_TX_DESC - 1); + ifq_set_maxlen(&ifp->if_snd, XNF_TX_DESC - 1); ifmedia_init(&sc->sc_media, IFM_IMASK, xnf_media_change, xnf_media_status); diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index 32e71c3bf05..2aa459ecc5d 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.130 2020/07/10 13:22:21 patrick Exp $ */ +/* $OpenBSD: if_atu.c,v 1.131 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -2226,7 +2226,7 @@ atu_watchdog(struct ifnet *ifp) } } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) atu_start(ifp); splx(s); diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 39a2560e209..71a5f2f8898 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.109 2018/10/02 19:49:10 stsp Exp $ */ +/* $OpenBSD: if_aue.c,v 1.110 2020/07/10 13:26:40 patrick Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1114,7 +1114,7 @@ aue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->aue_mbuf); c->aue_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) aue_start(ifp); splx(s); @@ -1163,7 +1163,7 @@ aue_tick_task(void *xsc) DPRINTFN(2,("%s: %s: got link\n", sc->aue_dev.dv_xname,__func__)); sc->aue_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) aue_start(ifp); } @@ -1488,7 +1488,7 @@ aue_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->aue_xfer, NULL, NULL, NULL, &stat); aue_txeof(c->aue_xfer, c, stat); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) aue_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 5746952f326..589500fdc21 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.140 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_axe.c,v 1.141 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -1123,7 +1123,7 @@ axe_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->axe_mbuf); c->axe_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) axe_start(ifp); splx(s); @@ -1446,7 +1446,7 @@ axe_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->axe_xfer, NULL, NULL, NULL, &stat); axe_txeof(c->axe_xfer, c, stat); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) axe_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c index c19e87fe5ff..7cad3ef7efb 100644 --- a/sys/dev/usb/if_axen.c +++ b/sys/dev/usb/if_axen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axen.c,v 1.28 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_axen.c,v 1.29 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2013 Yojiro UO <yuo@openbsd.org> @@ -1083,7 +1083,7 @@ axen_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->axen_mbuf); c->axen_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) axen_start(ifp); splx(s); @@ -1399,7 +1399,7 @@ axen_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->axen_xfer, NULL, NULL, NULL, &stat); axen_txeof(c->axen_xfer, c, stat); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) axen_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index 6bb73bbfaca..9f4a104075a 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.77 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.78 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -812,7 +812,7 @@ cdce_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) if (err) ifp->if_oerrors++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) cdce_start(ifp); splx(s); diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 804b1ecef45..82a35598f38 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.78 2018/10/02 19:49:10 stsp Exp $ */ +/* $OpenBSD: if_cue.c,v 1.79 2020/07/10 13:26:40 patrick Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -773,7 +773,7 @@ cue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->cue_mbuf); c->cue_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) cue_start(ifp); splx(s); @@ -1100,7 +1100,7 @@ cue_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->cue_xfer, NULL, NULL, NULL, &stat); cue_txeof(c->cue_xfer, c, stat); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) cue_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 3306aad26b0..0471eb8b9d6 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.90 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_kue.c,v 1.91 2020/07/10 13:26:40 patrick Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -788,7 +788,7 @@ kue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->kue_mbuf); c->kue_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) kue_start(ifp); splx(s); @@ -1073,7 +1073,7 @@ kue_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->kue_xfer, NULL, NULL, NULL, &stat); kue_txeof(c->kue_xfer, c, stat); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) kue_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c index 033e47fa648..c84e10e2452 100644 --- a/sys/dev/usb/if_mos.c +++ b/sys/dev/usb/if_mos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mos.c,v 1.41 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_mos.c,v 1.42 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net> @@ -1012,7 +1012,7 @@ mos_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->mos_mbuf); c->mos_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) mos_start(ifp); splx(s); @@ -1067,7 +1067,7 @@ mos_tick_task(void *xsc) DPRINTF(("%s: %s: got link\n", sc->mos_dev.dv_xname, __func__)); sc->mos_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) mos_start(ifp); } @@ -1306,7 +1306,7 @@ mos_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->mos_xfer, NULL, NULL, NULL, &stat); mos_txeof(c->mos_xfer, c, stat); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mos_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_mue.c b/sys/dev/usb/if_mue.c index 599dccce10c..0ba5571649c 100644 --- a/sys/dev/usb/if_mue.c +++ b/sys/dev/usb/if_mue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mue.c,v 1.8 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_mue.c,v 1.9 2020/07/10 13:26:40 patrick Exp $ */ /* * Copyright (c) 2018 Kevin Lo <kevlo@openbsd.org> @@ -1169,7 +1169,7 @@ mue_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->mue_mbuf); c->mue_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) mue_start(ifp); splx(s); @@ -1282,7 +1282,7 @@ mue_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->mue_xfer, NULL, NULL, NULL, &stat); mue_txeof(c->mue_xfer, c, stat); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mue_start(ifp); splx(s); } diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index ab628ad84f2..f81da3b7023 100644 --- a/sys/dev/usb/if_smsc.c +++ b/sys/dev/usb/if_smsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_smsc.c,v 1.35 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_smsc.c,v 1.36 2020/07/10 13:26:40 patrick Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ /*- * Copyright (c) 2012 @@ -1298,7 +1298,7 @@ smsc_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->sc_mbuf); c->sc_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) smsc_start(ifp); splx(s); diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 85623a64bc9..04fa3843b85 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.82 2020/02/22 14:01:34 jasper Exp $ */ +/* $OpenBSD: if_udav.c,v 1.83 2020/07/10 13:26:41 patrick Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -1028,7 +1028,7 @@ udav_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->udav_mbuf); c->udav_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) udav_start(ifp); splx(s); @@ -1194,7 +1194,7 @@ udav_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->udav_xfer, NULL, NULL, NULL, &stat); udav_txeof(c->udav_xfer, c, stat); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) udav_start(ifp); splx(s); } @@ -1394,7 +1394,7 @@ udav_tick_task(void *xsc) DPRINTF(("%s: %s: got link\n", sc->sc_dev.dv_xname, __func__)); sc->sc_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) udav_start(ifp); } diff --git a/sys/dev/usb/if_ugl.c b/sys/dev/usb/if_ugl.c index 6ad47cc3f52..2d13eb66152 100644 --- a/sys/dev/usb/if_ugl.c +++ b/sys/dev/usb/if_ugl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ugl.c,v 1.24 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_ugl.c,v 1.25 2020/07/10 13:26:41 patrick Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2013 SASANO Takayoshi <uaa@uaa.org.uk> @@ -528,7 +528,7 @@ ugl_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->ugl_mbuf); c->ugl_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) ugl_start(ifp); splx(s); diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index 09d4f37cb4e..698a754d6b7 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_umb.c,v 1.34 2020/05/04 14:41:03 gerhard Exp $ */ +/* $OpenBSD: if_umb.c,v 1.35 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2016 genua mbH @@ -2143,7 +2143,7 @@ umb_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) usbd_clear_endpoint_stall_async(sc->sc_tx_pipe); } } - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) umb_start(ifp); splx(s); diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 55041eea950..4f02533dfae 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.76 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_upl.c,v 1.77 2020/07/10 13:26:41 patrick Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -510,7 +510,7 @@ upl_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->upl_mbuf); c->upl_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) upl_start(ifp); splx(s); @@ -795,7 +795,7 @@ upl_watchdog(struct ifnet *ifp) upl_stop(sc); upl_init(sc); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) upl_start(ifp); } diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c index 6fe92c2bf43..5fb20d9c741 100644 --- a/sys/dev/usb/if_ure.c +++ b/sys/dev/usb/if_ure.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ure.c,v 1.15 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_ure.c,v 1.16 2020/07/10 13:26:41 patrick Exp $ */ /*- * Copyright (c) 2015, 2016, 2019 Kevin Lo <kevlo@openbsd.org> * All rights reserved. @@ -1824,7 +1824,7 @@ ure_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->uc_mbuf); c->uc_mbuf = NULL; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) ure_start(ifp); splx(s); diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 26e7d618148..411258587e6 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.86 2020/02/22 14:01:34 jasper Exp $ */ +/* $OpenBSD: if_url.c,v 1.87 2020/07/10 13:26:41 patrick Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -887,7 +887,7 @@ url_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) m_freem(c->url_mbuf); c->url_mbuf = NULL; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) url_start(ifp); splx(s); @@ -1054,7 +1054,7 @@ url_watchdog(struct ifnet *ifp) usbd_get_xfer_status(c->url_xfer, NULL, NULL, NULL, &stat); url_txeof(c->url_xfer, c, stat); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) url_start(ifp); splx(s); } @@ -1238,7 +1238,7 @@ url_tick_task(void *xsc) DPRINTF(("%s: %s: got link\n", sc->sc_dev.dv_xname, __func__)); sc->sc_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) url_start(ifp); } diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c index debbbdb64b7..de7038fc9b7 100644 --- a/sys/dev/usb/if_urndis.c +++ b/sys/dev/usb/if_urndis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urndis.c,v 1.70 2020/06/09 07:43:39 gerhard Exp $ */ +/* $OpenBSD: if_urndis.c,v 1.71 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2010 Jonathan Armani <armani@openbsd.org> @@ -1312,7 +1312,7 @@ urndis_txeof(struct usbd_xfer *xfer, if (err) ifp->if_oerrors++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) urndis_start(ifp); splx(s); diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c index b0f1b65756c..b477bc1ff2f 100644 --- a/sys/dev/usb/if_wi_usb.c +++ b/sys/dev/usb/if_wi_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_usb.c,v 1.71 2019/11/27 11:16:59 mpi Exp $ */ +/* $OpenBSD: if_wi_usb.c,v 1.72 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -1138,7 +1138,7 @@ wi_usb_txeof_frm(struct usbd_xfer *xfer, void *priv, wi_usb_tx_unlock(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) wi_start_usb(ifp); splx(s); diff --git a/sys/net/if_aggr.c b/sys/net/if_aggr.c index 5b45c3dcfe7..1707230cd96 100644 --- a/sys/net/if_aggr.c +++ b/sys/net/if_aggr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aggr.c,v 1.31 2020/06/17 06:45:22 dlg Exp $ */ +/* $OpenBSD: if_aggr.c,v 1.32 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2019 The University of Queensland @@ -560,7 +560,7 @@ aggr_clone_create(struct if_clone *ifc, int unit) ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; ifp->if_xflags = IFXF_CLONED | IFXF_MPSAFE; ifp->if_link_state = LINK_STATE_DOWN; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ether_fakeaddr(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_bpe.c b/sys/net/if_bpe.c index 13224499bb1..9ce5df4a430 100644 --- a/sys/net/if_bpe.c +++ b/sys/net/if_bpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bpe.c,v 1.11 2020/06/24 22:03:43 cheloha Exp $ */ +/* $OpenBSD: if_bpe.c,v 1.12 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2018 David Gwynne <dlg@openbsd.org> * @@ -190,7 +190,7 @@ bpe_clone_create(struct if_clone *ifc, int unit) ifp->if_start = bpe_start; ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ether_fakeaddr(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c index e43f8c223b9..ab0d7558fb4 100644 --- a/sys/net/if_etherip.c +++ b/sys/net/if_etherip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_etherip.c,v 1.45 2019/04/23 10:53:45 dlg Exp $ */ +/* $OpenBSD: if_etherip.c,v 1.46 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2015 Kazuya GODA <goda@openbsd.org> * @@ -150,7 +150,7 @@ etherip_clone_create(struct if_clone *ifc, int unit) ifp->if_start = etherip_start; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_capabilities = IFCAP_VLAN_MTU; ether_fakeaddr(ifp); diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 333b1ccb469..95859d24897 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.129 2020/06/17 06:45:22 dlg Exp $ */ +/* $OpenBSD: if_gif.c,v 1.130 2020/07/10 13:26:41 patrick Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -170,7 +170,7 @@ gif_clone_create(struct if_clone *ifc, int unit) ifp->if_output = gif_output; ifp->if_rtrequest = p2p_rtrequest; ifp->if_type = IFT_GIF; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_softc = sc; if_attach(ifp); diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 0b3c3525d8e..7fae30f1efa 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.157 2020/06/17 06:45:22 dlg Exp $ */ +/* $OpenBSD: if_gre.c,v 1.158 2020/07/10 13:26:41 patrick Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -715,7 +715,7 @@ egre_clone_create(struct if_clone *ifc, int unit) ifp->if_ioctl = egre_ioctl; ifp->if_start = egre_start; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ether_fakeaddr(ifp); @@ -777,7 +777,7 @@ nvgre_clone_create(struct if_clone *ifc, int unit) ifp->if_ioctl = nvgre_ioctl; ifp->if_start = nvgre_start; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ether_fakeaddr(ifp); @@ -849,7 +849,7 @@ eoip_clone_create(struct if_clone *ifc, int unit) ifp->if_ioctl = eoip_ioctl; ifp->if_start = eoip_start; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ether_fakeaddr(ifp); diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index 33f9cf48c74..09d0db3d2ed 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.95 2020/01/24 05:14:51 jsg Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.96 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -112,7 +112,7 @@ mpe_clone_create(struct if_clone *ifc, int unit) ifp->if_start = mpe_start; ifp->if_type = IFT_MPLS; ifp->if_hdrlen = MPE_HDRLEN; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); sc->sc_dead = 0; diff --git a/sys/net/if_mpip.c b/sys/net/if_mpip.c index 9d243b56385..e4022f8ab5a 100644 --- a/sys/net/if_mpip.c +++ b/sys/net/if_mpip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpip.c,v 1.10 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_mpip.c,v 1.11 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -117,7 +117,7 @@ mpip_clone_create(struct if_clone *ifc, int unit) ifp->if_rtrequest = p2p_rtrequest; ifp->if_mtu = 1500; ifp->if_hardmtu = 65535; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); if_attach(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c index af764ac05eb..526898d822b 100644 --- a/sys/net/if_mpw.c +++ b/sys/net/if_mpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpw.c,v 1.57 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_mpw.c,v 1.58 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -111,7 +111,7 @@ mpw_clone_create(struct if_clone *ifc, int unit) ifp->if_output = mpw_output; ifp->if_start = mpw_start; ifp->if_hardmtu = ETHER_MAX_HARDMTU_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ether_fakeaddr(ifp); sc->sc_dead = 0; diff --git a/sys/net/if_pair.c b/sys/net/if_pair.c index a8c69c3f6f7..62bfc5ac22b 100644 --- a/sys/net/if_pair.c +++ b/sys/net/if_pair.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pair.c,v 1.14 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_pair.c,v 1.15 2020/07/10 13:26:41 patrick Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -118,7 +118,7 @@ pair_clone_create(struct if_clone *ifc, int unit) ifp->if_ioctl = pairioctl; ifp->if_start = pairstart; ifp->if_xflags = IFXF_CLONED; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hardmtu = ETHER_MAX_HARDMTU_LEN; ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index 3d9c46f9f1e..e36f628935d 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.87 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.88 2020/07/10 13:26:42 patrick Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -147,7 +147,7 @@ pflog_clone_create(struct if_clone *ifc, int unit) ifp->if_start = pflogstart; ifp->if_xflags = IFXF_CLONED; ifp->if_type = IFT_PFLOG; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hdrlen = PFLOG_HDRLEN; if_attach(ifp); if_alloc_sadl(ifp); diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c index 1d482865013..2a8b3b560d2 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.91 2020/06/24 22:03:42 cheloha Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.92 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2011 Florian Obser <florian@narrans.de> @@ -248,7 +248,7 @@ pflow_clone_create(struct if_clone *ifc, int unit) ifp->if_start = NULL; ifp->if_xflags = IFXF_CLONED; ifp->if_type = IFT_PFLOW; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hdrlen = PFLOW_HDRLEN; ifp->if_flags = IFF_UP; ifp->if_flags &= ~IFF_RUNNING; /* not running, need receiver */ diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 1e3d10c36b5..e11c44be1ec 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.273 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.274 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -341,7 +341,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit) ifp->if_output = pfsyncoutput; ifp->if_start = pfsyncstart; ifp->if_type = IFT_PFSYNC; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hdrlen = sizeof(struct pfsync_header); ifp->if_mtu = ETHERMTU; ifp->if_xflags = IFXF_CLONED; diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 9e2f9924de9..62907235aed 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.115 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.116 2020/07/10 13:26:42 patrick Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -220,7 +220,7 @@ ppp_clone_create(struct if_clone *ifc, int unit) sc->sc_if.if_output = pppoutput; sc->sc_if.if_start = ppp_ifstart; sc->sc_if.if_rtrequest = p2p_rtrequest; - IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&sc->sc_if.if_snd, IFQ_MAXLEN); mq_init(&sc->sc_inq, IFQ_MAXLEN, IPL_NET); ppp_pkt_list_init(&sc->sc_rawq, IFQ_MAXLEN); if_attach(&sc->sc_if); @@ -992,7 +992,7 @@ pppintr(void) LIST_FOREACH(sc, &ppp_softc_list, sc_list) { if (!(sc->sc_flags & SC_TBUSY) && - (!IFQ_IS_EMPTY(&sc->sc_if.if_snd))) { + (!ifq_empty(&sc->sc_if.if_snd))) { s = splnet(); sc->sc_flags |= SC_TBUSY; splx(s); diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index 21fe335104d..7a2176b445c 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.68 2019/06/16 00:10:37 kn Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.69 2020/07/10 13:26:42 patrick Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -212,7 +212,7 @@ pppoe_clone_create(struct if_clone *ifc, int unit) sc->sc_sppp.pp_if.if_rtrequest = p2p_rtrequest; sc->sc_sppp.pp_tls = pppoe_tls; sc->sc_sppp.pp_tlf = pppoe_tlf; - IFQ_SET_MAXLEN(&sc->sc_sppp.pp_if.if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&sc->sc_sppp.pp_if.if_snd, IFQ_MAXLEN); /* changed to real address later */ memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 558b0f47b1a..644c3a4fb68 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.94 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.95 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -683,7 +683,7 @@ pppx_add_session(struct pppx_dev *pxd, struct pipex_session_req *req) ifp->if_ioctl = pppx_if_ioctl; ifp->if_rtrequest = p2p_rtrequest; ifp->if_type = IFT_PPP; - IFQ_SET_MAXLEN(&ifp->if_snd, 1); + ifq_set_maxlen(&ifp->if_snd, 1); ifp->if_softc = pxi; /* ifp->if_rdomain = req->pr_rdomain; */ @@ -1089,7 +1089,7 @@ pppacopen(dev_t dev, int flags, int mode, struct proc *p) ifp->if_start = pppac_start; ifp->if_ioctl = pppac_ioctl; /* XXXSMP: be sure pppac_start() called under NET_LOCK() */ - IFQ_SET_MAXLEN(&ifp->if_snd, 1); + ifq_set_maxlen(&ifp->if_snd, 1); if_counters_alloc(ifp); if_attach(ifp); diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 474b99e289d..684cefd3d88 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.183 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.184 2020/07/10 13:26:42 patrick Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -702,7 +702,7 @@ sppp_attach(struct ifnet *ifp) sp->pp_if.if_type = IFT_PPP; sp->pp_if.if_output = sppp_output; - IFQ_SET_MAXLEN(&sp->pp_if.if_snd, 50); + ifq_set_maxlen(&sp->pp_if.if_snd, 50); mq_init(&sp->pp_cpq, 50, IPL_NET); sp->pp_loopcnt = 0; sp->pp_alivecnt = 0; @@ -782,7 +782,7 @@ sppp_isempty(struct ifnet *ifp) int empty, s; s = splnet(); - empty = mq_empty(&sp->pp_cpq) && IFQ_IS_EMPTY(&sp->pp_if.if_snd); + empty = mq_empty(&sp->pp_cpq) && ifq_empty(&sp->pp_if.if_snd); splx(s); return (empty); } diff --git a/sys/net/if_tpmr.c b/sys/net/if_tpmr.c index 6a1c7dfc72d..86e828b9073 100644 --- a/sys/net/if_tpmr.c +++ b/sys/net/if_tpmr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tpmr.c,v 1.10 2020/04/12 06:56:37 dlg Exp $ */ +/* $OpenBSD: if_tpmr.c,v 1.11 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2019 The University of Queensland @@ -171,7 +171,7 @@ tpmr_clone_create(struct if_clone *ifc, int unit) ifp->if_flags = IFF_POINTOPOINT; ifp->if_xflags = IFXF_CLONED | IFXF_MPSAFE; ifp->if_link_state = LINK_STATE_DOWN; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); if_counters_alloc(ifp); if_attach(ifp); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 8109032506d..e94bcb0d31a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.223 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_tun.c,v 1.224 2020/07/10 13:26:42 patrick Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -235,7 +235,7 @@ tun_create(struct if_clone *ifc, int unit, int flags) ifp->if_start = tun_start; ifp->if_hardmtu = TUNMRU; ifp->if_link_state = LINK_STATE_DOWN; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); if_counters_alloc(ifp); diff --git a/sys/net/if_var.h b/sys/net/if_var.h index be67f03d312..f95ce9912a8 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.108 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: if_var.h,v 1.109 2020/07/10 13:26:42 patrick Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -281,13 +281,6 @@ struct ifg_list { #define IFNET_SLOWTIMO 1 /* granularity is 1 second */ -/* - * IFQ compat on ifq API - */ - -#define IFQ_IS_EMPTY(ifq) ifq_empty(ifq) -#define IFQ_SET_MAXLEN(ifq, len) ifq_set_maxlen(ifq, len) - #define IF_TXMIT_MIN 1 #define IF_TXMIT_DEFAULT 16 diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c index 4d39918ddf3..6c6ab35c625 100644 --- a/sys/net/if_vether.c +++ b/sys/net/if_vether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vether.c,v 1.31 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_vether.c,v 1.32 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2009 Theo de Raadt @@ -84,7 +84,7 @@ vether_clone_create(struct if_clone *ifc, int unit) ifp->if_softc = sc; ifp->if_ioctl = vetherioctl; ifp->if_start = vetherstart; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hardmtu = ETHER_MAX_HARDMTU_LEN; ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index e682d2761ab..f590f858c88 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.78 2020/07/10 13:22:22 patrick Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.79 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -151,7 +151,7 @@ vxlan_clone_create(struct if_clone *ifc, int unit) ifp->if_softc = sc; ifp->if_ioctl = vxlanioctl; ifp->if_start = vxlanstart; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hardmtu = ETHER_MAX_HARDMTU_LEN; ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/net/if_wg.c b/sys/net/if_wg.c index a1b4d409deb..3b16b7d9ad8 100644 --- a/sys/net/if_wg.c +++ b/sys/net/if_wg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wg.c,v 1.8 2020/07/04 06:06:16 procter Exp $ */ +/* $OpenBSD: if_wg.c,v 1.9 2020/07/10 13:26:42 patrick Exp $ */ /* * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. @@ -2652,7 +2652,7 @@ wg_clone_create(struct if_clone *ifc, int unit) ifp->if_output = wg_output; ifp->if_type = IFT_WIREGUARD; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); if_attach(ifp); if_alloc_sadl(ifp); |