QOS/Queue Tree setup - multiple VLANS

Hi, have the following setup below on a CCR1009:

Combo1 - WAN - 100Mbps/100Mbps internet connection
ETH3 - LAN - 10.0.1.0/24
ETH3/VLAN2 - VOIP - 10.0.2.0/24
ETH3/VLAN10 - Department1 - 10.0.10.0/24
ETH3/VLAN20 - Department2 - 10.0.20.0/24
ETH3/VLAN30 - Department3 - 10.0.30.0/24
ETH3/VLAN40 - Department4 - 10.0.40.0/24

I need to implement some top line bandwidth management to prioritize the VOIP services and share the remaining bandwidth as equally as possible between the other users/vlans. Ideally Id like everyone to have access to all the available bandwidth if free but enforce some guaranteed limits if fighting for bandwidth. I also don’t want to restrict/limit LAN-LAN traffic.

So far this is just theory and research from the wiki and forums. In my research it looks like mangling connections/packets and utilizing the Queue Tree will be the best approach as it will allow more flexibility and control if I need to apply more granular QOS rules.

Where I’m getting stuck and need some help is in understanding what interface(s) I should apply my connection/packet marking on to capture all internet downloads/uploads and the subsequent queue tree setup in terms of the interfaces and parent/child queues.

So currently as I see it I would need to:
Apply connection marking and packet marking on in-interface Combo1, forward chain - this would mark all Internet downloads (“total downloads”).
Apply connection marking and packet marking on in-interface Ether3, prerouting chain. This would mark all internet uploads (“total uploads”).

Question: Would this mark packets/connections on the various VLANs associated with Ether3? If not then I’m not sure where I would need to mark connections/packets to establish the total “internet uploads” that I would need to construct my queue tree hierarchy. I would mark the upload/download packets for the various VLANs individually to exercise further shaping and prioritization but design wise would I not need to control the total uploads?

Many thanks in advance!

I have not tested this in a VLANed scenario, but with your config I would think the below should work:

Mark connections in prerouting chain without specifying any in / out interfaces, this will mark connections in both directions
Then mark packets based on connection marks, again, don’t specify in / out interfaces
Create parent @ in Q Tree, using the outgoing interface as interface, i.e. for upload, specify the WAN interface
Then create child Q’s for each vlan and use parent Q and packet marks as per above

Study my example here. Not perfect, but will help you understand.