svn commit: r344029 - stable/12/sys/netpfil/pf

Patrick Kelsey pkelsey at FreeBSD.org
Mon Feb 11 23:33:17 UTC 2019


Author: pkelsey
Date: Mon Feb 11 23:33:16 2019
New Revision: 344029
URL: https://svnweb.freebsd.org/changeset/base/344029

Log:
  MFC r343534:
  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
  Sponsored by:	RG Nets
  Differential Revision:	https://reviews.freebsd.org/D18918

Modified:
  stable/12/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/12/sys/netpfil/pf/pf_ioctl.c	Mon Feb 11 23:30:30 2019	(r344028)
+++ stable/12/sys/netpfil/pf/pf_ioctl.c	Mon Feb 11 23:33:16 2019	(r344029)
@@ -821,6 +821,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-stable mailing list