From 8f2ac656906a7d498bd6784a09ceeed9f953e2ff Mon Sep 17 00:00:00 2001 From: Patrick Kelsey Date: Mon, 11 Feb 2019 05:17:31 +0000 Subject: 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 --- sys/net/altq/altq_cbq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/net/altq/altq_cbq.c') diff --git a/sys/net/altq/altq_cbq.c b/sys/net/altq/altq_cbq.c index aa646848dc32..fd05955bb966 100644 --- a/sys/net/altq/altq_cbq.c +++ b/sys/net/altq/altq_cbq.c @@ -223,12 +223,11 @@ cbq_pfattach(struct pf_altq *a) } int -cbq_add_altq(struct pf_altq *a) +cbq_add_altq(struct ifnet *ifp, struct pf_altq *a) { cbq_state_t *cbqp; - struct ifnet *ifp; - if ((ifp = ifunit(a->ifname)) == NULL) + if (ifp == NULL) return (EINVAL); if (!ALTQ_IS_READY(&ifp->if_snd)) return (ENODEV); -- cgit v1.2.3