Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2019 20:26:10 +0000 (UTC)
From:      Patrick Kelsey <pkelsey@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343534 - head/sys/netpfil/pf
Message-ID:  <201901282026.x0SKQA34012081@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901282026.x0SKQA34012081>