Bug 1413837

Summary: [neutron][ovs-dpdk]How to config Host DPDK Port and Instance Port in ONE ovs-dpdk-bridge
Product: Red Hat OpenStack Reporter: VIKRANT <vaggarwa>
Component: openvswitch-dpdkAssignee: Assaf Muller <amuller>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: aconole, beagles, fbaudin, fherrman, fleitner, ihrachys, nyechiel, vaggarwa
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-05 14:05:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description VIKRANT 2017-01-17 05:53:27 UTC
Description of problem:

In default installation with director.

a) The host DPDK Port "dpdk0" is linked in br-link0 ovs-dpdk-bridge.
    Bridge "br-link0"
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk

b) And the Instance Port "vhuxxx" is linked in br-int ovs-dpdk-bridge.
    Bridge br-int
        Port "vhucd4dc1ed-12"
            tag: 2
            Interface "vhucd4dc1ed-12"
                type: dpdkvhostuser

c) This two bridge is connected by patch peer.
    Bridge "br-link0"
        Port "phy-br-link0"
            Interface "phy-br-link0"
                type: patch
                options: {peer="int-br-link0"}
    Bridge br-int
        Port "int-br-link0"
            Interface "int-br-link0"
                type: patch
                options: {peer="phy-br-link0"}


Cu. wants to have ONE bridge because of performance. Having two bridges in packet path is degrading the performance. 

Tried to deploy the setup using only bridge by changing the mapping of dpdk0 from br-link0 to br-int. Deployment went successful and we are able to spawn the instances successfully. 

~~~
network-environment.yaml:
  NeutronBridgeMappings: 'dpdk0:br-int'
~~~

here was the mapping after deployment. 

~~~
    Bridge br-int
        Port int-br-int
            Interface int-br-int
                type: patch
                options: {peer=phy-br-int}
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk
        Port phy-br-int
            Interface phy-br-int
                type: patch
                options: {peer=int-br-int}
~~~

But still packet is using through the patch peer.

~~~
Scenario 1 :  One package send from VM eth0 to gateway outside.
1. eth0 -> Port "vhuc8429804-62" with tag: 1 ===> Package (with VLAN 1 in br-int).
2. Package -> Port int-br-int options: {peer=phy-br-int} -> Port phy-br-int (in_port=5,dl_vlan=1 actions=mod_vlan_vid:112,NORMAL) ===> Package (with VLAN 112 in br-int)
3. Package -> Port "dpdk0" ===> Package (with VLAN 112 in outside switch)

Scenario 2 : One package send from outside to VM eth0.
1. Package -> Port "dpdk0" ===> Package (with VLAN 112 in br-int)
2. Package -> Port phy-br-int  options: {peer=int-br-int} -> Port int-br-int (in_port=4,dl_vlan=112 actions=mod_vlan_vid:1,NORMAL) ===> Package (with VLAN 1 in br-int)
3. Package -> Port "vhuc8429804-62" with tag: 1 ===> eth0

The instance connectivity working fine. But every package need to chansfer through the patch peer (int-br-int <-> phy-br-int). This is also cause bad dpdk performance just link two bridges.
~~~

Version-Release number of selected component (if applicable):
RHEL7.3+OSP10+OVS(2.5.0)+DPDK(2.2)+Director

How reproducible:
Everytime

Steps to Reproduce:
1.
2.
3.

Actual results:
dpdk packet has to traverse two OVS bridges. 

Expected results:
dpdk packet has to traverse from only one OVS bridges.

Additional info:

Comment 9 Ihar Hrachyshka 2017-05-22 13:37:05 UTC
Hi Brent, would you mind looking at whether ther request makes sense? Thanks.

Comment 10 Assaf Muller 2017-06-05 14:05:12 UTC
Going through an OVS patch port to a second bridge doesn't impact the kernel data path, it's just user space makeup. From OSP's perspective it's simpler to define a second bridge and to set up the DPDK host port with an ifcfg file on that second bridge.