diff options
author | kn <kn@cvs.openbsd.org> | 2020-08-21 22:59:28 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2020-08-21 22:59:28 +0000 |
commit | 644833183f92f26fdc593a2666334f3747262823 (patch) | |
tree | a3e558ade5afb9c424565bcc503f7c3ca0c4dbcb /sys/net | |
parent | 16caca2618865515f29ef16afe11d119763d3f8b (diff) |
Leave default ifq_maxlen handling to ifq_init()
Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.
Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.
OK mvs
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_aggr.c | 3 | ||||
-rw-r--r-- | sys/net/if_bpe.c | 3 | ||||
-rw-r--r-- | sys/net/if_etherip.c | 3 | ||||
-rw-r--r-- | sys/net/if_gif.c | 3 | ||||
-rw-r--r-- | sys/net/if_gre.c | 5 | ||||
-rw-r--r-- | sys/net/if_mpe.c | 3 | ||||
-rw-r--r-- | sys/net/if_mpip.c | 3 | ||||
-rw-r--r-- | sys/net/if_mpw.c | 3 | ||||
-rw-r--r-- | sys/net/if_pair.c | 3 | ||||
-rw-r--r-- | sys/net/if_pflog.c | 3 | ||||
-rw-r--r-- | sys/net/if_pflow.c | 3 | ||||
-rw-r--r-- | sys/net/if_pfsync.c | 3 | ||||
-rw-r--r-- | sys/net/if_ppp.c | 3 | ||||
-rw-r--r-- | sys/net/if_pppoe.c | 3 | ||||
-rw-r--r-- | sys/net/if_tpmr.c | 3 | ||||
-rw-r--r-- | sys/net/if_tun.c | 3 | ||||
-rw-r--r-- | sys/net/if_vether.c | 3 | ||||
-rw-r--r-- | sys/net/if_vxlan.c | 3 | ||||
-rw-r--r-- | sys/net/if_wg.c | 3 |
19 files changed, 19 insertions, 40 deletions
diff --git a/sys/net/if_aggr.c b/sys/net/if_aggr.c index aaceaf6f737..7f65384e5fe 100644 --- a/sys/net/if_aggr.c +++ b/sys/net/if_aggr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aggr.c,v 1.33 2020/07/22 02:16:01 dlg Exp $ */ +/* $OpenBSD: if_aggr.c,v 1.34 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2019 The University of Queensland @@ -561,7 +561,6 @@ 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); ether_fakeaddr(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_bpe.c b/sys/net/if_bpe.c index 366ffcd03aa..340904815a8 100644 --- a/sys/net/if_bpe.c +++ b/sys/net/if_bpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bpe.c,v 1.13 2020/07/22 08:38:51 dlg Exp $ */ +/* $OpenBSD: if_bpe.c,v 1.14 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2018 David Gwynne <dlg@openbsd.org> * @@ -189,7 +189,6 @@ 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); ether_fakeaddr(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c index ab0d7558fb4..15c26b63509 100644 --- a/sys/net/if_etherip.c +++ b/sys/net/if_etherip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_etherip.c,v 1.46 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_etherip.c,v 1.47 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2015 Kazuya GODA <goda@openbsd.org> * @@ -150,7 +150,6 @@ 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); ifp->if_capabilities = IFCAP_VLAN_MTU; ether_fakeaddr(ifp); diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 95859d24897..371f20b6bea 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.130 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_gif.c,v 1.131 2020/08/21 22:59:27 kn Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -170,7 +170,6 @@ 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); ifp->if_softc = sc; if_attach(ifp); diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 7fae30f1efa..641bd6f14e2 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.158 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_gre.c,v 1.159 2020/08/21 22:59:27 kn Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -715,7 +715,6 @@ 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); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ether_fakeaddr(ifp); @@ -777,7 +776,6 @@ 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); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ether_fakeaddr(ifp); @@ -849,7 +847,6 @@ 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); 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 09d0db3d2ed..514633e7e28 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.96 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.97 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -112,7 +112,6 @@ 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); sc->sc_dead = 0; diff --git a/sys/net/if_mpip.c b/sys/net/if_mpip.c index e4022f8ab5a..baedf2e3c1c 100644 --- a/sys/net/if_mpip.c +++ b/sys/net/if_mpip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpip.c,v 1.11 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_mpip.c,v 1.12 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -117,7 +117,6 @@ 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); if_attach(ifp); if_counters_alloc(ifp); diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c index 526898d822b..43ad0e0f8f9 100644 --- a/sys/net/if_mpw.c +++ b/sys/net/if_mpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpw.c,v 1.58 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_mpw.c,v 1.59 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -111,7 +111,6 @@ 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); ether_fakeaddr(ifp); sc->sc_dead = 0; diff --git a/sys/net/if_pair.c b/sys/net/if_pair.c index 62bfc5ac22b..b3cc258b70b 100644 --- a/sys/net/if_pair.c +++ b/sys/net/if_pair.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pair.c,v 1.15 2020/07/10 13:26:41 patrick Exp $ */ +/* $OpenBSD: if_pair.c,v 1.16 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -118,7 +118,6 @@ 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); 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 869d207d207..7df774277e4 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.89 2020/07/30 03:30:04 dlg Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.90 2020/08/21 22:59:27 kn Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -140,7 +140,6 @@ 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); 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 2a8b3b560d2..02672d0b781 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.92 2020/07/10 13:26:42 patrick Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.93 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2011 Florian Obser <florian@narrans.de> @@ -248,7 +248,6 @@ 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); 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 0b126835a2d..f7b94f596a6 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.276 2020/08/11 23:40:54 kn Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.277 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -341,7 +341,6 @@ pfsync_clone_create(struct if_clone *ifc, int unit) ifp->if_output = pfsyncoutput; ifp->if_qstart = pfsyncstart; ifp->if_type = IFT_PFSYNC; - ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hdrlen = sizeof(struct pfsync_header); ifp->if_mtu = ETHERMTU; ifp->if_xflags = IFXF_CLONED | IFXF_MPSAFE; diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 62907235aed..fb32d9ea9ef 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.116 2020/07/10 13:26:42 patrick Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.117 2020/08/21 22:59:27 kn Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -220,7 +220,6 @@ 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); mq_init(&sc->sc_inq, IFQ_MAXLEN, IPL_NET); ppp_pkt_list_init(&sc->sc_rawq, IFQ_MAXLEN); if_attach(&sc->sc_if); diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index a29326ade72..540793bd6f6 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.71 2020/08/21 01:17:33 kn Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.72 2020/08/21 22:59:27 kn Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -213,7 +213,6 @@ pppoe_clone_create(struct if_clone *ifc, int unit) sc->sc_sppp.pp_if.if_xflags = IFXF_CLONED; 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); /* changed to real address later */ memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); diff --git a/sys/net/if_tpmr.c b/sys/net/if_tpmr.c index f3d298fa65f..e88f56ff113 100644 --- a/sys/net/if_tpmr.c +++ b/sys/net/if_tpmr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tpmr.c,v 1.19 2020/07/29 12:07:58 kn Exp $ */ +/* $OpenBSD: if_tpmr.c,v 1.20 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2019 The University of Queensland @@ -169,7 +169,6 @@ 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); if_counters_alloc(ifp); if_attach(ifp); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 25bd417031d..fe9e375f72f 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.225 2020/07/22 02:16:02 dlg Exp $ */ +/* $OpenBSD: if_tun.c,v 1.226 2020/08/21 22:59:27 kn Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -235,7 +235,6 @@ 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); if_counters_alloc(ifp); diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c index 0364488b299..dad6e26854d 100644 --- a/sys/net/if_vether.c +++ b/sys/net/if_vether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vether.c,v 1.34 2020/08/09 14:33:49 mvs Exp $ */ +/* $OpenBSD: if_vether.c,v 1.35 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2009 Theo de Raadt @@ -84,7 +84,6 @@ vether_clone_create(struct if_clone *ifc, int unit) ifp->if_softc = sc; ifp->if_ioctl = vetherioctl; ifp->if_qstart = vetherqstart; - 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 18cef0682df..1652460c2dd 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.80 2020/07/28 09:52:32 mvs Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.81 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org> @@ -151,7 +151,6 @@ 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); 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 eccd150c3f8..e5a1071ccf1 100644 --- a/sys/net/if_wg.c +++ b/sys/net/if_wg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wg.c,v 1.11 2020/07/13 08:29:34 tb Exp $ */ +/* $OpenBSD: if_wg.c,v 1.12 2020/08/21 22:59:27 kn Exp $ */ /* * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. @@ -2655,7 +2655,6 @@ 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); if_attach(ifp); if_alloc_sadl(ifp); |