how to limit total (in+out) user speed to 256kb/s using pcq?

I want to give user a 256 kbit/sec speed, but 256 must be a total of download and upload speed. Is it possible?

up :frowning:

Are nobody tried to implement this or what?

it’s not possible due to nature of PCQ: you cannot dynamically change PCQ classifier per packet (in/out), you can only set it statically for the whole queue

The easiest method (easy being relative) I can think of is making a simple queue for each user. Simple Queues let you specify total bandwidth as an option.

I moved from simple queues, and don’t want to go back. I thought it’s possible with queue tree too.
This is bad.. I haven’t so much speed that I may divide between my users…

This feature (combined in+out limitation) would be nice in future ROS versions.

Thanks anyway.

Thinking about the question a little more I realized you could do it without simple queues, but again not with PCQ. If you make a regular queue in the tree for each user, apply the tree to Global-out, then you can just put both upload and download packets into the same queue. I forgot I have accidentally done this a time or two by mis-marking packets during a queue tree setup. This would still require a single queue for each user, though.

Yeah, I thought about that way. A problem is in correct bandwidth control. default queues can’t do equal bandwidth limiting between users.