From 8bb290f6ae41fb0256f9fe96749ca7827bd49df8 Mon Sep 17 00:00:00 2001 From: mikeb Date: Wed, 28 Jun 2017 19:27:42 +0000 Subject: [PATCH] Tighten up FQ-CoDel vs HFSC checks PFQS_FLOWQUEUE is about to become a flag that HFSC classes may specify as well; thus a better way of telling FQ-CoDel and HFSC apart needs to be found. At the moment its derived from the queue specification. Discussed with and OK henning@ at d2k17 as a part of a larger diff. --- sys/net/pf_ioctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index a5cc75fb0f6..05e7f7e70bd 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.315 2017/06/05 22:18:28 sashan Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.316 2017/06/28 19:27:42 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -602,7 +602,7 @@ pf_create_queues(void) qif = malloc(sizeof(*qif), M_TEMP, M_WAITOK); qif->ifp = ifp; - if (q->flags & PFQS_FLOWQUEUE) { + if ((q->flags & PFQS_FLOWQUEUE) && !(q->flags & PFQS_DEFAULT)) { qif->ifqops = ifq_fqcodel_ops; qif->pfqops = pfq_fqcodel_ops; } else { @@ -1092,7 +1092,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) break; } bcopy(qs, &pq->queue, sizeof(pq->queue)); - if (qs->flags & PFQS_FLOWQUEUE) + if ((qs->flags & PFQS_FLOWQUEUE) && qs->parent_qid == 0 && + !(qs->flags & PFQS_DEFAULT)) error = pfq_fqcodel_ops->pfq_qstats(qs, pq->buf, &nbytes); else -- 2.20.1