From 5f5cd2c2e1ea4bcc17d15c41f9d091ff721137b0 Mon Sep 17 00:00:00 2001 From: mikeb Date: Wed, 28 Jun 2017 18:31:03 +0000 Subject: [PATCH] Extend pf queueing ops to include queue manager hooks Discussed with and OK henning@ at d2k17 as a part of a larger diff. --- sys/net/pfvar.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index d19f6f769ac..4ab474dbcad 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.458 2017/06/26 18:33:24 bluhm Exp $ */ +/* $OpenBSD: pfvar.h,v 1.459 2017/06/28 18:31:03 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -47,6 +47,7 @@ struct ip; struct ip6_hdr; +struct mbuf_list; #define PF_TCPS_PROXY_SRC ((TCP_NSTATES)+0) #define PF_TCPS_PROXY_DST ((TCP_NSTATES)+1) @@ -1365,10 +1366,16 @@ struct hfsc_opts { }; struct pfq_ops { - void *(*pfq_alloc)(struct ifnet *); - int (*pfq_addqueue)(void *, struct pf_queuespec *); - void (*pfq_free)(void *); - int (*pfq_qstats)(struct pf_queuespec *, void *, int *); + void * (*pfq_alloc)(struct ifnet *); + int (*pfq_addqueue)(void *, struct pf_queuespec *); + void (*pfq_free)(void *); + int (*pfq_qstats)(struct pf_queuespec *, void *, int *); + /* Queue manager ops */ + unsigned int (*pfq_qlength)(void *); + struct mbuf * (*pfq_enqueue)(void *, struct mbuf *); + struct mbuf * (*pfq_deq_begin)(void *, void **, struct mbuf_list *); + void (*pfq_deq_commit)(void *, struct mbuf *, void *); + void (*pfq_purge)(void *, struct mbuf_list *); }; struct pf_tagname { -- 2.20.1