and another step for reproducing the phenomenon is like that:
1. add port tap333 with ingress policing
ovs-vsctl add-port br0 tap333 -- set interface tap333 type=internal -- set
interface tap333 ingress_policing_rate=100
2. receive some packet from tap333
ifconfig tap333 up
ifconfig tap333 192.168.1.3/24
ping 192.168.1.1
(now use command "tc -s qdisc show dev tap333 ingress", we have some rx
packets)
4. add port tap444
ovs-vsctl add-port br0 tap444 -- set interface tap444 type=internal
(after this step, statistics cleared to 0 on tap333
which means tc qdisc rule have removed then added again
I think it is not a good idea to affect another port when adding a new port)
At 2015-08-21 19:33:21, "ychen" <ychen103...@163.com> wrote:
I did some tests for internal ports, and found the following problems:
1. ovs ingress policing has not effect for internal port if this port is not in
the default namespace
2. set interface mtu can not really change port's mtu
3. ingress policing statistics cleared after change port's mtu and add another
port to ovs bridge
here is the testing steps:
step 1: add namespace ns111
ip netns add ns111
step 2: create internal port tap111 and tap222
ovs-vsctl add-port br0 tap111 -- set interface tap111 type=internal
ovs-vsctl add-port br0 tap222 -- set interface tap222 type=internal
step 3: add port tap111 to namespace ns111
ip link set tap111 netns ns111
ip netns exec ns111 ip link set dev tap111 up
ip netns exec ns111 ifconfig tap111 192.168.1.1/24
step 4: set ingress policing for tap111
ovs-vsctl set interface tap111 ingress_policing_rate=1000
(no error happend, but when use command "tc qdisc show dev tap111
ingress",
there is no qdisc rule attached on interface tap111)
step 5: set ingress policing for port tap222
ifconfig tap222 up(now the mtu is 1500 for this port)
ifconfig tap222 192.l68.1.2/24
ovs-vsctl set interface tap222 ingress_policing_rate=1000
ping 192.168.1.1 -c 1000
(use command "tc -s qdisc show dev tap222", now rx packets is greater
than 1000)
step 6: change mtu for port tap222
ovs-vsctl set interface tap222=1400
(use command ifconfig tap222, but the mtu is still 1500)
step 7: change mtu with ifconfig
ifconfig tap222 mtu 1400
(now mtu changed to 1400)
step 8: add port tap333
ovs-vsctl add-port br0 tap333 -- set interface tap333 type=internal
(now the statistics of qdisc for tap222 is cleared to 0
if we set breakpoint in function netdev_linux_set_policing,
we can see tc_add_del_ingress_qdisc(netdev_, false) is called)
夏日畅销榜大牌美妆只要1元
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss