diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-10-17 08:43:36 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-10-17 08:43:36 +0000 |
commit | 39fabf35216b41e26fde1267b94c91b0684dcba2 (patch) | |
tree | 4f38d7d737c137e9efdcf90a5f79c72f0a1a1ff4 /sys/altq/altq_hfsc.c | |
parent | 232a2a344188b9fbf9d6c7825619aa59ddafa7e5 (diff) |
make pf use one mbuf tag instead of 6 distinct ones. use a little struct
in the data part for the data from the previously distinct tags.
look up the tag early and carry a pointer to it around.
makes the code easier and saves some tag lookups and thus helps performance,
as proven by tests run by Schberle Dniel <Schoeberle.Daniel@aamtech.hu>
Initially hacked up somewhere over the atlantic ocean in an A330
early testing reyk and moritz, "put it in" theo
Diffstat (limited to 'sys/altq/altq_hfsc.c')
-rw-r--r-- | sys/altq/altq_hfsc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c index e78965cf9b2..fc58f4af129 100644 --- a/sys/altq/altq_hfsc.c +++ b/sys/altq/altq_hfsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_hfsc.c,v 1.21 2004/01/14 08:42:23 kjc Exp $ */ +/* $OpenBSD: altq_hfsc.c,v 1.22 2005/10/17 08:43:35 henning Exp $ */ /* $KAME: altq_hfsc.c,v 1.17 2002/11/29 07:48:33 kjc Exp $ */ /* @@ -618,7 +618,7 @@ hfsc_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr) { struct hfsc_if *hif = (struct hfsc_if *)ifq->altq_disc; struct hfsc_class *cl; - struct m_tag *t; + struct pf_mtag *t; int len; /* grab class set by classifier */ @@ -629,9 +629,9 @@ hfsc_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr) m_freem(m); return (ENOBUFS); } - t = m_tag_find(m, PACKET_TAG_PF_QID, NULL); + t = pf_find_mtag(m); if (t == NULL || - (cl = clh_to_clp(hif, ((struct altq_tag *)(t+1))->qid)) == NULL || + (cl = clh_to_clp(hif, t->qid)) == NULL || is_a_parent_class(cl)) { cl = hif->hif_defaultclass; if (cl == NULL) { |