Refer to this patch(Apply QoS policy on network:router_gateway :https://review.openstack.org/#/c/425218/),I apply qos policy to router gateway port.
Execution command:
ovs-vsctl list interface qg-xxxx
I find that the ingress rate limit of qg port has been configured successfully,but I found this rate limit didn't work by using iperf test.By view the openvswitch log,i find error:
-----------------------------------------------------------------------------------
2017-11-16T01:22:55.598Z|00115|netdev_linux|INFO|ioctl(SIOCGIFHWADDR) on qg-d0c7278b-d2 device failed: No such device
2017-11-16T01:22:55.604Z|00116|netdev_linux|WARN|ioctl(SIOCGIFINDEX) on qg-d0c7278b-d2 device failed: No such device
2017-11-16T01:22:55.604Z|00117|netdev_linux|WARN|qg-d0c7278b-d2: removing policing failed: No such device
----------------------------------------------------------------------------------
I think openvswitch don't support police rate of namespace qg port, so neutron don't support Router gateway rate limit.
So I checked it on my devstack and it looks like in default config L3 agent is using "internal" ovs ports. Problem is that traffic shaping on "internal" ports don't work properly.
When I changed option "ovs_use_veth" to True then ingress bw limit worked as expected.
I will continue checking that.