From: mikeb Date: Wed, 28 Jun 2017 19:30:24 +0000 (+0000) Subject: Introduce a simple mechanism to select the appropriate queue manager X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b6b33aa1566126627e768bfe28e1351ad0a796fa;p=openbsd Introduce a simple mechanism to select the appropriate queue manager Discussed with and OK henning@ at d2k17 as a part of a larger diff. --- diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 05e7f7e70bd..70fed2c609f 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.316 2017/06/28 19:27:42 mikeb Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.317 2017/06/28 19:30:24 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -694,6 +694,14 @@ pf_commit_queues(void) return (0); } +const struct pfq_ops * +pf_queue_manager(struct pf_queuespec *q) +{ + if (q->flags & PFQS_FLOWQUEUE) + return pfq_fqcodel_ops; + return (/* pfq_default_ops */ NULL); +} + #define PF_MD5_UPD(st, elm) \ MD5Update(ctx, (u_int8_t *) &(st)->elm, sizeof((st)->elm)) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 4ab474dbcad..5adcff5042e 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.459 2017/06/28 18:31:03 mikeb Exp $ */ +/* $OpenBSD: pfvar.h,v 1.460 2017/06/28 19:30:24 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1822,6 +1822,9 @@ void pf_tag_packet(struct mbuf *, int, int); int pf_addr_compare(struct pf_addr *, struct pf_addr *, sa_family_t); +const struct pfq_ops + *pf_queue_manager(struct pf_queuespec *); + extern struct pf_status pf_status; extern struct pool pf_frent_pl, pf_frag_pl;