Bug 155736 - [pf] [altq] borrow from parent queue does not work with cbq
Summary: [pf] [altq] borrow from parent queue does not work with cbq
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-20 23:40 UTC by mwisnicki+freebsd
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mwisnicki+freebsd 2011-03-20 23:40:01 UTC
I have queues like this:

altq on $lan_if cbq bandwidth 100Mb queue { qLocal, qExt }
queue qLocal bandwidth 0b cbq(default borrow)
queue qExt bandwidth 10Mb cbq { qExtFast, qExtSlow }
queue  qExtFast priority 7 bandwidth 80% cbq(borrow)
queue  qExtSlow priority 1 bandwidth 20% cbq(borrow red)

pass on $lan_if from <slow> to $internet queue qExtSlow
pass on $lan_if from $internet to <slow> queue qExtSlow
pass on $lan_if from !<slow> to $internet queue qExtFast

Lan is 100Mbps and Wan is 10Mbps. Above rules are supposed to slow down traffic coming from internet to <slow> hosts.

Unfortunately it seems that borrowing does not work when parent queue (qExt) does not also borrow. But it should according to man and PF FAQ.
pfctl -sq -v shows 0 packets in qExt. If I reduce eg. qExtFast to 10% it goes down as if there was no borrow.

Googling reveals many similar posts dating back to FreeBSD-6, possibly bug is there since ALTQ introduction.
Comment 1 mwisnicki+freebsd 2011-03-21 01:00:06 UTC
HFSC can be used as a workaround since it can express everything that
is possible with CBQ:

altq on $lan_if hfsc bandwidth 100Mb queue { qLocal, qExt }
queue qLocal bandwidth 90Mb hfsc(default)
queue qExt bandwidth 10Mb hfsc(upperlimit 10Mb) { qExtFast, qExtSlow }
queue  qExtFast priority 7 bandwidth 80%
queue  qExtSlow priority 1 bandwidth 20% hfsc(red)
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-03-21 01:28:56 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-pf

Over to maintainer(s).
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:55 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped