summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_altq.c
AgeCommit message (Collapse)Author
2005-02-28use the linkshar keyword when gtalking about the link sharing serviceHenning Brauer
curve, inspired by PR4127
2004-05-20bzero() ifr before use, From: Andrey Matveev <andrushock@korovino.net>Henning Brauer
2004-04-26do more careful altq bandwidth checking.Kenjiro Cho
- fix a bug in HFSC that does not take the newly added queue into account when computing the bandwidth for admission control. - warn when the sum of the child bandwidth exceeds parent's bandwidth for both CBQ and HFSC. - allow to explicitly specify 0bps to bandwidth. HFSC can have only the real-time sc, and it means a blackhole queue for CBQ. problem reports by "Alexey E. Suslikov" <cruel@texnika.com.ua> ok henning@
2004-03-14#include fixes, from Max Laier, ok beck@ henning@Daniel Hartmeier
2004-02-19now that qids are managed entirely in the kernel, the qid related codeKenjiro Cho
is no longer needed in pfctl. ok, henning@
2004-02-10KNFDaniel Hartmeier
2004-02-10KNFHenning Brauer
2004-01-14eliminate the predefined special qids so that qids become simpleKenjiro Cho
identifiers without embedded meanings. this also allows us to make the semantics of the qid assignment in line with the tag assignment in the next step. ok, henning@
2003-10-21don't use NULL as (int)0. henning okJun-ichiro itojun Hagino
2003-08-22pf spelling policeDavid Krause
ok dhartmei@ jmc@
2003-08-20catch invalid CBQ priorities earlier, including a better error messageHenning Brauer
prodded by mpech@
2003-06-20some cleanings recommended by lint; dhartmei okTheo de Raadt
2003-06-06simplify license. pfctl_altq.c with kenjiro's permission of course.Henning Brauer
2003-05-08Close sockets (otherwise the file handle limit can be reached when manyDaniel Hartmeier
queues are defined). Reported by Fernando Braga. ok henning@
2003-04-15pass down the unparsed queue opts (struct node_queue_opt) toHenning Brauer
print_altq/print_hfsc -> print_hfsc_opts and extract struct node_hfsc_sc there for each service curve and pass those down to print_hfsc_sc. now bandwidth specifications in the service curves are printed correct in the case of a queue belonging to more than one interface/parent queue, the parent queues having different bandwidths and the bandwith on teh service curve beeing specified in percent.
2003-04-15make print_hfsc_sc() take an extra struct node_hfsc_sc parameter and printHenning Brauer
relative bandwidth specification if that ws given instead of the calculated absolute ones. to be used soon.
2003-04-15don't include the unit "ms" when printing the service curve; parser wantsHenning Brauer
raw number
2003-04-15factor out service curve printing to it's own function, print_hfsc_sc().Henning Brauer
2003-04-14if linkshare service curve m2 == bandwidth, but d given, we do need to printHenning Brauer
linkshare as it is not exactly the default case then
2003-04-14only print hfsc linkshare when it differs from the defaultHenning Brauer
2003-04-14do not add a realtime service curve to the root queue asKenjiro Cho
the realtime service is not hierarchically distributed. ok henning@
2003-04-14let print_altq and print_queue take a struct node_queue_bw parameter insteadHenning Brauer
of dintinct bw_percent
2003-04-13concistency in the print-funtions, here: HFSC uppercurve and bracketsHenning Brauer
2003-04-13use pa->ifbandwidth instead of rate as reference bandwidth for the root queueHenning Brauer
2003-04-13process HFSC options for the linkshare, realtime and upperlimit service curvesHenning Brauer
2003-04-13break out bandwidth specification processing code to its own function, willHenning Brauer
be used in more places soonish
2003-04-13pass down the struct node_queue_opts from the altqif/queuespec yacc targetsHenning Brauer
to expand_altq/expand_queue -> eval_pfaltq/eval_pfqueue and further down to the new eval_queue_opts() instead of evaluating them directly in the yacc grammar. this will be needed to process the hfsc options which can contain relative bandwidth specifications, and we can't break them down to an absolute one earlier.
2003-04-13move the structs node_queue_bw and node_queue_opt to pfctl_parser.h.Henning Brauer
let eval_pfqueue() and eval_pfaltq() take a pointer to a struct node_queue_bw instead of two distince bw_absolute and bw_percent parameters.
2003-04-12make the first queue id we assign 2 instead of 1, 1 is the default queue forHenning Brauer
HFSC
2003-04-12in check_commit_hfsc, don't check wether the default queue is a leaf queueHenning Brauer
when we have no default queue. avoids null pointer deref.
2003-04-12correctly make up the root queue in eval_pfqueue_hfscHenning Brauer
2003-04-12make print_*_opts() int instead of void where the return value indicatesHenning Brauer
wether it printed something or not, and use that to decide wether to print the scheduler name in the altq on .. case instead of checking flags again, which would be a horrible mess for hfsc with its tons of opts (checking flags is not enough there)
2003-04-12fix print_hfsc_opts to only print "hfsc( " and " )" when there are opts toHenning Brauer
print, so it behaves like the print_*_opts for the other schedulers
2003-04-12assign queue IDs for HFSC simimar to what we do for PRIQ and CBQHenning Brauer
2003-04-11qname_to_qid and qname_to_pfaltq can be private functions now; nothingHenning Brauer
outside pfctl_altq.c uses them any more, nor should.
2003-04-11kill dead code.Henning Brauer
qid_to_qname is not used anywhere. moreover, I cannot think of any legitimate use; misuse is easy tho.
2003-04-05allow queue specs to be limited to certain interfaces.Henning Brauer
altq on { $if0 $if1 $if2 $if3 } priq bandwidth 10Mb queue { one two } queue one priority 1 priq(default) queue two on $if0 priority 15 queue two on ! $if0 priority 0 ok dhartmei@
2003-04-03use a simple linear queue ID assignment algorithm for PRIQ like we do forHenning Brauer
cbq already. together with the previous change that means it is now possible to have differently named priq queues on different interfaces with the same priorities and packets end up in the right queues. ok dhartmei@ kjc@
2003-04-03explicitly include <sys/limits.h> for INT_MAX.Kenjiro Cho
2003-03-28assign qid early for priq tooHenning Brauer
2003-03-11do the queue ID assignment for cbq already in userland. ensure that queuesHenning Brauer
with different names always have different queue IDs, even if they live on different interfaces (that was the goal here). fixes regress pfaltq4 ok cedric@ dhartmei@
2003-03-10check for multiple same named queues on one interface.Henning Brauer
before this was rejected at load time with a rather useless error message, now a nice error message points out the actual error. inspired by an error report from Damien Miller ok dhartmei@ pb@ (monsterdiff complete)
2003-03-10rework error handling in eval_pfqueue().Henning Brauer
instead of using errx, print the error message and return. This is consistent with what we do everywhere in pfctl. ok dhartmei@ pb@ (as part of a monsterdiff)
2003-03-08when complaining about a queue's abndwidth beeing to small (below theHenning Brauer
resolution we can handle), don't say it must be >6KB, the value actually depends on quite some factors, including interface MTU. Instead, calculate the real minimum value and show that. mpech@ did a good job in bugging me to fix that ;-) ok pb@ dhartmei@ cedric@
2003-03-06fix queue assignment on filter rules which are not bound to an interface.Henning Brauer
when looking up the queue IDs using qname_to_qid, we do not need to limit the matching on the interface in question, as it is guaranteed that same named queues on different interfaces habe the same queue id. moreover, we must not limit the matches to the interface if we do not have an interface given on the filter rule to match on ;-) found after problems reported by Andre Nathan <andre at v2r dot com dot br> ok dhartmei@ pb@ cedric@
2003-03-03rate2str() overhaul:Henning Brauer
-do not print 100.00Kb but 100Kb, but still 1.50Mb. requested by theo. hint by dhartmei lead to a easier algorithm than initially had -while beeing there, use a much nicer, shorter algorithm for determining and printing the unit. a little further easification thanks to a hint by markus@ ok dhartmei@ cedric@
2003-03-02when printing queues at load time that have bandwidth specified in percent,Henning Brauer
print the bandwidth in percent instead of the calculated absolute value. if a queue belongs to more than one interface and they have different bandwidth the calculated absolute is of course different per interface. previously the first calculated absolute value was shown; what of course is incorrect on the second interface. note that only the print was wrong, the correct values were passed to the kernel. ok theo daniel
2003-03-02remove the control keyword for cbq queues.Henning Brauer
the control class was a legacy of the original CBQ design by LBL/Sun to support RSVP. the control class is not used in openbsd, in the sense that we don't automatically set filters for ICMP/IGMP/RSVP for the control class. ok dhartmei@ kjc@ deraadt@
2003-03-02add a guarantee that two same named queues on different interfaces have theHenning Brauer
same queue id. in the usual case this was already true, but not guaranteed. ok dhartmei@ kjc@
2003-02-25extend copyright to 2003Henning Brauer