[ovs-discuss] questions about namespace, mtu and ingress policing for ovs internal port

ychen ychen103103 at 163.com
Fri Aug 21 11:33:21 UTC 2015

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
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 -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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150821/5b572657/attachment-0002.html>

More information about the discuss mailing list