SQM mark packets

Hello
I am using sqm with layer cake script..if i want to mark packets via DSCP to fall in specific tin of layer cake with iptables it is better to mark them in mangle PREROUTING or POSTROUTING....SQM and cake when takes affect?

For egress, I believe it does not matter (in that cake should see the dscp marks you set) and for ingress it will also not matter (in that cake will NOT see your iptables set dscps, if you use the sqm default ingress instance via IFB).