aboutsummaryrefslogtreecommitdiff
path: root/sys/net/altq/altq_subr.c
diff options
context:
space:
mode:
authorPatrick Kelsey <pkelsey@FreeBSD.org>2019-02-11 05:17:31 +0000
committerPatrick Kelsey <pkelsey@FreeBSD.org>2019-02-11 05:17:31 +0000
commit8f2ac656906a7d498bd6784a09ceeed9f953e2ff (patch)
tree8a08d0989a34b08be16c5324462c0ec5d9820638 /sys/net/altq/altq_subr.c
parent6286a6438e32951be6d5f05291332e14ecefd5c2 (diff)
downloadsrc-8f2ac656906a7d498bd6784a09ceeed9f953e2ff.tar.gz
src-8f2ac656906a7d498bd6784a09ceeed9f953e2ff.zip
Reduce the time it takes the kernel to install a new PF config containing a large number of queues
In general, the time savings come from separating the active and inactive queues lists into separate interface and non-interface queue lists, and changing the rule and queue tag management from list-based to hash-bashed. In HFSC, a linear scan of the class table during each queue destroy was also eliminated. There are now two new tunables to control the hash size used for each tag set (default for each is 128): net.pf.queue_tag_hashsize net.pf.rule_tag_hashsize Reviewed by: kp MFC after: 1 week Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D19131
Notes
Notes: svn path=/head/; revision=343995
Diffstat (limited to 'sys/net/altq/altq_subr.c')
-rw-r--r--sys/net/altq/altq_subr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index 4e840a5b2e32..e49a925f5e83 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -520,7 +520,7 @@ altq_pfdetach(struct pf_altq *a)
* malloc with WAITOK, also it is not yet clear which lock to use.
*/
int
-altq_add(struct pf_altq *a)
+altq_add(struct ifnet *ifp, struct pf_altq *a)
{
int error = 0;
@@ -535,27 +535,27 @@ altq_add(struct pf_altq *a)
switch (a->scheduler) {
#ifdef ALTQ_CBQ
case ALTQT_CBQ:
- error = cbq_add_altq(a);
+ error = cbq_add_altq(ifp, a);
break;
#endif
#ifdef ALTQ_PRIQ
case ALTQT_PRIQ:
- error = priq_add_altq(a);
+ error = priq_add_altq(ifp, a);
break;
#endif
#ifdef ALTQ_HFSC
case ALTQT_HFSC:
- error = hfsc_add_altq(a);
+ error = hfsc_add_altq(ifp, a);
break;
#endif
#ifdef ALTQ_FAIRQ
case ALTQT_FAIRQ:
- error = fairq_add_altq(a);
+ error = fairq_add_altq(ifp, a);
break;
#endif
#ifdef ALTQ_CODEL
case ALTQT_CODEL:
- error = codel_add_altq(a);
+ error = codel_add_altq(ifp, a);
break;
#endif
default: