diff options
author | 2013-03-26 13:19:25 +0000 | |
---|---|---|
committer | 2013-03-26 13:19:25 +0000 | |
commit | dabd68ec8baf6a97d5368a86ec32750b3a57490b (patch) | |
tree | e79ac75a1196c343915675f0326ad651d2f047d7 /sys/net | |
parent | Fix compiler warnings, missing #include. From Thomas Adam. (diff) | |
download | wireguard-openbsd-dabd68ec8baf6a97d5368a86ec32750b3a57490b.tar.xz wireguard-openbsd-dabd68ec8baf6a97d5368a86ec32750b3a57490b.zip |
Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.
ok beck@, mikeb@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 6 | ||||
-rw-r--r-- | sys/net/if.h | 3 | ||||
-rw-r--r-- | sys/net/if_bridge.c | 4 | ||||
-rw-r--r-- | sys/net/if_gif.c | 4 | ||||
-rw-r--r-- | sys/net/if_mpe.c | 4 | ||||
-rw-r--r-- | sys/net/if_pflog.c | 4 | ||||
-rw-r--r-- | sys/net/if_pflow.c | 4 | ||||
-rw-r--r-- | sys/net/if_pfsync.c | 4 | ||||
-rw-r--r-- | sys/net/if_ppp.c | 10 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 | ||||
-rw-r--r-- | sys/net/if_vether.c | 4 |
11 files changed, 24 insertions, 27 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 6d6f5cc70fb..19ea4bfb961 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.252 2013/03/20 10:34:12 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.253 2013/03/26 13:19:25 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -137,8 +137,6 @@ void if_attachsetup(struct ifnet *); void if_attachdomain1(struct ifnet *); void if_attach_common(struct ifnet *); -int ifqmaxlen = IFQ_MAXLEN; - void if_detach_queues(struct ifnet *, struct ifqueue *); void if_detached_start(struct ifnet *); int if_detached_ioctl(struct ifnet *, u_long, caddr_t); @@ -280,7 +278,7 @@ if_attachsetup(struct ifnet *ifp) ifindex2ifnet[if_index] = ifp; if (ifp->if_snd.ifq_maxlen == 0) - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); #ifdef ALTQ ifp->if_snd.altq_type = 0; ifp->if_snd.altq_disc = NULL; diff --git a/sys/net/if.h b/sys/net/if.h index f496059d9d9..a6302312bf4 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.140 2013/03/20 10:34:12 mpi Exp $ */ +/* $OpenBSD: if.h,v 1.141 2013/03/26 13:19:25 mpi Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -796,7 +796,6 @@ do { \ #define IF_WIRED_DEFAULT_PRIORITY 0 #define IF_WIRELESS_DEFAULT_PRIORITY 4 -extern int ifqmaxlen; extern struct ifnet_head ifnet; extern struct ifnet *lo0ifp; diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index decc0ed545b..04751e17f38 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.206 2013/03/15 20:45:34 tedu Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.207 2013/03/26 13:19:25 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -219,7 +219,7 @@ bridge_clone_create(struct if_clone *ifc, int unit) ifp->if_start = bridge_start; ifp->if_type = IFT_BRIDGE; ifp->if_hdrlen = ETHER_HDR_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 709cadb0a89..36f33a2c462 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.59 2013/01/17 00:48:04 henning Exp $ */ +/* $OpenBSD: if_gif.c,v 1.60 2013/03/26 13:19:25 mpi Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -105,7 +105,7 @@ gif_clone_create(struct if_clone *ifc, int unit) sc->gif_if.if_start = gif_start; sc->gif_if.if_output = gif_output; sc->gif_if.if_type = IFT_GIF; - IFQ_SET_MAXLEN(&sc->gif_if.if_snd, ifqmaxlen); + IFQ_SET_MAXLEN(&sc->gif_if.if_snd, IFQ_MAXLEN); IFQ_SET_READY(&sc->gif_if.if_snd); sc->gif_if.if_softc = sc; if_attach(&sc->gif_if); diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index 8018fb93f3e..fd8bdb5c334 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.27 2012/04/14 09:39:47 yasuoka Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.28 2013/03/26 13:19:25 mpi Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -105,7 +105,7 @@ mpe_clone_create(struct if_clone *ifc, int unit) ifp->if_start = mpestart; ifp->if_type = IFT_MPLS; ifp->if_hdrlen = MPE_HDRLEN; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); if_alloc_sadl(ifp); diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index 41832bb6463..5070fa5c4e6 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.52 2012/11/06 12:32:41 henning Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.53 2013/03/26 13:19:25 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -156,7 +156,7 @@ pflog_clone_create(struct if_clone *ifc, int unit) ifp->if_output = pflogoutput; ifp->if_start = pflogstart; ifp->if_type = IFT_PFLOG; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + 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 cf137f4ce4a..ef70b10bc87 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.24 2013/02/05 11:58:39 florian Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.25 2013/03/26 13:19:25 mpi Exp $ */ /* * Copyright (c) 2011 Florian Obser <florian@narrans.de> @@ -231,7 +231,7 @@ pflow_clone_create(struct if_clone *ifc, int unit) ifp->if_output = pflowoutput; ifp->if_start = pflowstart; ifp->if_type = IFT_PFLOW; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + 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 c9ae79f4f49..ded05e0602c 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.195 2012/10/30 12:09:05 florian Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.196 2013/03/26 13:19:26 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -326,7 +326,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, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ifp->if_hdrlen = sizeof(struct pfsync_header); ifp->if_mtu = ETHERMTU; timeout_set(&sc->sc_tmo, pfsync_timeout, sc); diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 2e3a5a7329c..a6200c136cf 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.67 2012/11/29 22:56:08 yasuoka Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.68 2013/03/26 13:19:26 mpi Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -244,10 +244,10 @@ ppp_clone_create(struct if_clone *ifc, int unit) sc->sc_if.if_ioctl = pppsioctl; sc->sc_if.if_output = pppoutput; sc->sc_if.if_start = ppp_ifstart; - IFQ_SET_MAXLEN(&sc->sc_if.if_snd, ifqmaxlen); - IFQ_SET_MAXLEN(&sc->sc_inq, ifqmaxlen); - IFQ_SET_MAXLEN(&sc->sc_fastq, ifqmaxlen); - IFQ_SET_MAXLEN(&sc->sc_rawq, ifqmaxlen); + IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->sc_inq, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->sc_fastq, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&sc->sc_rawq, IFQ_MAXLEN); IFQ_SET_READY(&sc->sc_if.if_snd); if_attach(&sc->sc_if); if_alloc_sadl(&sc->sc_if); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 63a4df98f9c..55d2e07f9ca 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.112 2011/07/09 00:47:18 henning Exp $ */ +/* $OpenBSD: if_tun.c,v 1.113 2013/03/26 13:19:26 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -186,7 +186,7 @@ tun_create(struct if_clone *ifc, int unit, int flags) ifp->if_start = tunstart; ifp->if_hardmtu = TUNMRU; ifp->if_link_state = LINK_STATE_DOWN; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); IFQ_SET_READY(&ifp->if_snd); if ((flags & TUN_LAYER2) == 0) { diff --git a/sys/net/if_vether.c b/sys/net/if_vether.c index 0442b76b64e..4c7604c9f9a 100644 --- a/sys/net/if_vether.c +++ b/sys/net/if_vether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vether.c,v 1.16 2011/07/22 15:59:40 deraadt Exp $ */ +/* $OpenBSD: if_vether.c,v 1.17 2013/03/26 13:19:26 mpi Exp $ */ /* * Copyright (c) 2009 Theo de Raadt @@ -86,7 +86,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, ifqmaxlen); + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = IFCAP_VLAN_MTU; |