> I am running OVS 2.5v built on linux Kernel 4.3, my scenario is a 3 hops
> architecture(PUSH-SWAP-POP), but with MPLS flows I am getting an end-to -end
> throughput of 845Kb/s over a 1Gb/s NIC, while with normal IP flows I get
> 860Mb/s. I would appreciate if any one can share with me his or her experience
> with MPLS implementation in OVS as well. Looking forward to read from you 
> guys.

Yes, I noticed this too. I was only getting about 1Mbps on a 10Gbps link when
doing something like this:
http://sureshmishra1174.blogspot.co.uk/2015/04/running-mpls-with-open-vswitch-on.html
I think it's a Linux problem. I did some tests with two bridges on the same
host - Ubuntu 16.04 and OVS 250. With a OVS patch and MPLS encap/decap I see
about the same as the NORMAL flow ~21Gbps. But replace the patch with a VETH
pair and the speed drops to 1.8Mpbs. The VETH and the NORMAL flows gives
~20Gbps. See attached.

== OVS-PATCH ==

ovs-vsctl --if-exists del-br br0
ovs-vsctl --may-exist add-br br0
ovs-vsctl --may-exist add-port br0 patch01 -- set Interface patch01 type=patch 
options:peer=patch10

ip netns del ns0 || true
ip netns add ns0
ip link set dev br0 netns ns0
ip netns exec ns0 ip link set br0 up
ip netns exec ns0 ip address add 10.0.0.11/24 dev br0

ovs-vsctl --if-exists del-br br1
ovs-vsctl --may-exist add-br br1
ovs-vsctl --may-exist add-port br1 patch10 -- set Interface patch10 type=patch 
options:peer=patch01

ip netns del ns1 || true
ip netns add ns1
ip link set dev br1 netns ns1
ip netns exec ns1 ip link set br1 up
ip netns exec ns1 ip address add 10.0.0.22/24 dev br1

ovs-ofctl del-flows br0
ovs-ofctl add-flow br0 
in_port=LOCAL,ip,action=push_mpls:0x8847,set_mpls_label:30,output:1             
           
ovs-ofctl add-flow br0 
in_port=1,mpls,mpls_label=30,action=pop_mpls:0x0800,output:LOCAL
ovs-ofctl add-flow br0 
in_port=LOCAL,arp,action=push_mpls:0x8847,set_mpls_label:40,output:1            
            
ovs-ofctl add-flow br0 
in_port=1,mpls,mpls_label=40,action=pop_mpls:0x0806,output:LOCAL

ovs-ofctl del-flows br1
ovs-ofctl add-flow br1 
in_port=LOCAL,ip,action=push_mpls:0x8847,set_mpls_label:30,output:1             
           
ovs-ofctl add-flow br1 
in_port=1,mpls,mpls_label=30,action=pop_mpls:0x0800,output:LOCAL
ovs-ofctl add-flow br1 
in_port=LOCAL,arp,action=push_mpls:0x8847,set_mpls_label:40,output:1            
            
ovs-ofctl add-flow br1 
in_port=1,mpls,mpls_label=40,action=pop_mpls:0x0806,output:LOCAL


root@u1604:~# ip netns exec ns1 iperf -c 10.0.0.11              
------------------------------------------------------------
Client connecting to 10.0.0.11, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.22 port 36736 connected with 10.0.0.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  24.6 GBytes  21.1 Gbits/sec


==== With veth ====

ip link del veth01 || true
ip link add veth01 type veth peer name veth10

ovs-vsctl --if-exists del-br br0
ovs-vsctl --may-exist add-br br0
ovs-vsctl --may-exist add-port br0 veth01
ip link set dev veth01 up
# allow for mpls overhead
ip link set dev veth01 mtu 1600

ip netns del ns0 || true
ip netns add ns0
ip link set dev br0 netns ns0
ip netns exec ns0 ip link set br0 mtu 1500
ip netns exec ns0 ip link set br0 up
ip netns exec ns0 ip address add 10.0.0.11/24 dev br0

ovs-vsctl --if-exists del-br br1
ovs-vsctl --may-exist add-br br1
ovs-vsctl --may-exist add-port br1 veth10
ip link set dev veth10 up
# allow for mpls overhead
ip link set dev veth10 mtu 1600

ip netns del ns1 || true
ip netns add ns1
ip link set dev br1 netns ns1
ip netns exec ns1 ip link set br1 mtu 1500
ip netns exec ns1 ip link set br1 up
ip netns exec ns1 ip address add 10.0.0.22/24 dev br1

ovs-ofctl del-flows br0
ovs-ofctl add-flow br0 
in_port=LOCAL,ip,action=push_mpls:0x8847,set_mpls_label:30,output:1             
           
ovs-ofctl add-flow br0 
in_port=1,mpls,mpls_label=30,action=pop_mpls:0x0800,output:LOCAL
ovs-ofctl add-flow br0 
in_port=LOCAL,arp,action=push_mpls:0x8847,set_mpls_label:40,output:1            
            
ovs-ofctl add-flow br0 
in_port=1,mpls,mpls_label=40,action=pop_mpls:0x0806,output:LOCAL

ovs-ofctl del-flows br1
ovs-ofctl add-flow br1 
in_port=LOCAL,ip,action=push_mpls:0x8847,set_mpls_label:30,output:1             
           
ovs-ofctl add-flow br1 
in_port=1,mpls,mpls_label=30,action=pop_mpls:0x0800,output:LOCAL
ovs-ofctl add-flow br1 
in_port=LOCAL,arp,action=push_mpls:0x8847,set_mpls_label:40,output:1            
            
ovs-ofctl add-flow br1 
in_port=1,mpls,mpls_label=40,action=pop_mpls:0x0806,output:LOCAL

# veth and mpls encap/decap
root@u1604:~# ip netns exec ns1 iperf -c 10.0.0.11
------------------------------------------------------------
Client connecting to 10.0.0.11, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.22 port 36742 connected with 10.0.0.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-11.0 sec  2.38 MBytes  1.81 Mbits/sec


# veth and NORMAL action
root@u1604:~# ip netns exec ns1 iperf -c 10.0.0.11
------------------------------------------------------------
Client connecting to 10.0.0.11, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.22 port 36738 connected with 10.0.0.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  22.9 GBytes  19.7 Gbits/sec
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to