svn commit: r343534 - head/sys/netpfil/pf
Patrick Kelsey
pkelsey at FreeBSD.org
Mon Jan 28 20:26:11 UTC 2019
Author: pkelsey
Date: Mon Jan 28 20:26:09 2019
New Revision: 343534
URL: https://svnweb.freebsd.org/changeset/base/343534
Log:
Don't re-evaluate ALTQ kernel configuration due to events on non-ALTQ interfaces
Re-evaluating the ALTQ kernel configuration can be expensive,
particularly when there are a large number (hundreds or thousands) of
queues, and is wholly unnecessary in response to events on interfaces
that do not support ALTQ as such interfaces cannot be part of an ALTQ
configuration.
Reviewed by: kp
MFC after: 1 week
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D18918
Modified:
head/sys/netpfil/pf/pf_ioctl.c
Modified: head/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- head/sys/netpfil/pf/pf_ioctl.c Mon Jan 28 20:22:17 2019 (r343533)
+++ head/sys/netpfil/pf/pf_ioctl.c Mon Jan 28 20:26:09 2019 (r343534)
@@ -683,6 +683,14 @@ pf_altq_ifnet_event(struct ifnet *ifp, int remove)
u_int32_t ticket;
int error = 0;
+ /*
+ * No need to re-evaluate the configuration for events on interfaces
+ * that do not support ALTQ, as it's not possible for such
+ * interfaces to be part of the configuration.
+ */
+ if (!ALTQ_IS_READY(&ifp->if_snd))
+ return;
+
/* Interrupt userland queue modifications */
if (V_altqs_inactive_open)
pf_rollback_altq(V_ticket_altqs_inactive);
More information about the svn-src-all
mailing list