summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2011-07-06 02:42:29 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2011-07-06 02:42:29 +0000
commit1a89f467197b52dbc105d9fb9b7aef6a030434a1 (patch)
tree00cefeb8bef85227278c728f72202394a4fd7923 /sys/net
parent194261cc022557c08e3f9e352f90ff1810814094 (diff)
cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhm
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c4
-rw-r--r--sys/net/if_pflog.c4
-rw-r--r--sys/net/if_pflow.c4
-rw-r--r--sys/net/if_pfsync.c4
-rw-r--r--sys/net/if_ppp.c8
-rw-r--r--sys/net/if_pppoe.c6
-rw-r--r--sys/net/if_sl.c4
-rw-r--r--sys/net/if_spppsubr.c7
8 files changed, 20 insertions, 21 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 6c3b90020a1..edf45b23e00 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.236 2011/07/05 00:58:27 henning Exp $ */
+/* $OpenBSD: if.c,v 1.237 2011/07/06 02:42:28 henning Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -279,7 +279,7 @@ if_attachsetup(struct ifnet *ifp)
ifindex2ifnet[if_index] = ifp;
if (ifp->if_snd.ifq_maxlen == 0)
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
#ifdef ALTQ
ifp->if_snd.altq_type = 0;
ifp->if_snd.altq_disc = NULL;
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c
index bcc4790da4f..d1b87013227 100644
--- a/sys/net/if_pflog.c
+++ b/sys/net/if_pflog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflog.c,v 1.36 2011/07/05 22:28:44 bluhm Exp $ */
+/* $OpenBSD: if_pflog.c,v 1.37 2011/07/06 02:42:28 henning Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -128,7 +128,7 @@ pflog_clone_create(struct if_clone *ifc, int unit)
ifp->if_output = pflogoutput;
ifp->if_start = pflogstart;
ifp->if_type = IFT_PFLOG;
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
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 2b506ad0a97..604816ef1d3 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.15 2011/04/05 18:01:21 henning Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.16 2011/07/06 02:42:28 henning Exp $ */
/*
* Copyright (c) 2008 Henning Brauer <henning@openbsd.org>
@@ -132,7 +132,7 @@ pflow_clone_create(struct if_clone *ifc, int unit)
ifp->if_output = pflowoutput;
ifp->if_start = pflowstart;
ifp->if_type = IFT_PFLOW;
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
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 2adc8f47206..4b45a22c364 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.164 2011/07/04 20:40:58 dhill Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.165 2011/07/06 02:42:28 henning Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -317,7 +317,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit)
ifp->if_output = pfsyncoutput;
ifp->if_start = pfsyncstart;
ifp->if_type = IFT_PFSYNC;
- ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
ifp->if_hdrlen = sizeof(struct pfsync_header);
ifp->if_mtu = 1500; /* XXX */
ifp->if_hardmtu = MCLBYTES; /* XXX */
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 3f94efe822d..c2888bb34c4 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ppp.c,v 1.60 2011/07/05 19:59:18 henning Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.61 2011/07/06 02:42:28 henning Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
@@ -251,9 +251,9 @@ ppp_clone_create(ifc, unit)
sc->sc_if.if_start = ppp_ifstart;
#endif
IFQ_SET_MAXLEN(&sc->sc_if.if_snd, ifqmaxlen);
- sc->sc_inq.ifq_maxlen = ifqmaxlen;
- sc->sc_fastq.ifq_maxlen = ifqmaxlen;
- sc->sc_rawq.ifq_maxlen = ifqmaxlen;
+ IFQ_SET_MAXLEN(&sc->sc_inq, ifqmaxlen);
+ IFQ_SET_MAXLEN(&sc->sc_fastq, ifqmaxlen);
+ IFQ_SET_MAXLEN(&sc->sc_rawq, ifqmaxlen);
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_pppoe.c b/sys/net/if_pppoe.c
index e386495c435..a84c0682c7f 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.32 2011/07/05 20:00:14 henning Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.33 2011/07/06 02:42:28 henning Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -205,8 +205,8 @@ pppoeattach(int count)
LIST_INIT(&pppoe_softc_list);
if_clone_attach(&pppoe_cloner);
- pppoediscinq.ifq_maxlen = IFQ_MAXLEN;
- pppoeinq.ifq_maxlen = IFQ_MAXLEN;
+ IFQ_SET_MAXLEN(&pppoediscinq, IFQ_MAXLEN);
+ IFQ_SET_MAXLEN(&pppoeinq, IFQ_MAXLEN);
}
/* Create a new interface. */
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 1b6a63899e8..7b481188cb2 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.43 2011/01/06 11:52:41 claudio Exp $ */
+/* $OpenBSD: if_sl.c,v 1.44 2011/07/06 02:42:28 henning Exp $ */
/* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */
/*
@@ -221,7 +221,7 @@ sl_clone_create(ifc, unit)
sc->sc_if.if_ioctl = slioctl;
sc->sc_if.if_output = sloutput;
IFQ_SET_MAXLEN(&sc->sc_if.if_snd, 50);
- sc->sc_fastq.ifq_maxlen = 32;
+ IFQ_SET_MAXLEN(&sc->sc_fastq, 32);
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_spppsubr.c b/sys/net/if_spppsubr.c
index 57cb5c8c45c..837c0ada7d0 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.90 2011/07/05 21:11:36 guenther Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.91 2011/07/06 02:42:28 henning Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -933,8 +933,8 @@ 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);
- sp->pp_fastq.ifq_maxlen = 50;
- sp->pp_cpq.ifq_maxlen = 50;
+ IFQ_SET_MAXLEN(&sp->pp_fastq, 50);
+ IFQ_SET_MAXLEN(&sp->pp_cpq, 50);
sp->pp_loopcnt = 0;
sp->pp_alivecnt = 0;
sp->pp_last_activity = 0;
@@ -945,7 +945,6 @@ sppp_attach(struct ifnet *ifp)
sp->pp_up = lcp.Up;
sp->pp_down = lcp.Down;
-
for (i = 0; i < IDX_COUNT; i++)
timeout_set(&sp->ch[i], (cps[i])->TO, (void *)sp);
timeout_set(&sp->pap_my_to_ch, sppp_pap_my_TO, (void *)sp);