diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:26:43 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:26:43 +0000 |
commit | 7c591251f4b453772c5304abafc8b31add427963 (patch) | |
tree | c3c81adfd569e3d58b2cd875be6a5bd88d1b8bfb /sys/dev/pci | |
parent | 75620858502cb86710140bab76d93d2cfc2277d4 (diff) |
Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.
ok dlg@ tobhe@
Diffstat (limited to 'sys/dev/pci')
40 files changed, 118 insertions, 118 deletions
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; |