Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2019 23:33:16 +0000 (UTC)
From:      Patrick Kelsey <pkelsey@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r344029 - stable/12/sys/netpfil/pf
Message-ID:  <201902112333.x1BNXGSS095842@repo.freebsd.org>

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



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