Adding lacp support for ovs dpdk bond

Change-Id: Icd1745d401ec275687a007e6683175a13569f2b4
diff --git a/README.rst b/README.rst
index ed21934..8ba968e 100644
--- a/README.rst
+++ b/README.rst
@@ -1478,6 +1478,60 @@
             enabled: true
             type: dpdk_ovs_bridge
 
+**DPDK OVS LACP Bond with vlan tag**
+
+.. code-block:: yaml
+
+    linux:
+      network:
+        bridge: openvswitch
+        dpdk:
+          enabled: true
+          driver: uio
+        openvswitch:
+          pmd_cpu_mask: "0x6"
+          dpdk_socket_mem: "1024,1024"
+          dpdk_lcore_mask: "0x400"
+          memory_channels: "2"
+        interface:
+          eth3:
+            enabled: true
+            type: eth
+            proto: manual
+            name: ${_param:tenant_first_nic}
+          eth4:
+            enabled: true
+            type: eth
+            proto: manual
+            name: ${_param:tenant_second_nic}
+          dpdk0:
+            name: ${_param:tenant_first_nic}
+            pci: "0000:81:00.0"
+            driver: igb_uio
+            bond: bond1
+            enabled: true
+            type: dpdk_ovs_port
+            n_rxq: 2
+          dpdk1:
+            name: ${_param:tenant_second_nic}
+            pci: "0000:81:00.1"
+            driver: igb_uio
+            bond: bond1
+            enabled: true
+            type: dpdk_ovs_port
+            n_rxq: 2
+          bond1:
+            enabled: true
+            bridge: br-prv
+            type: dpdk_ovs_bond
+            mode: balance-slb
+          br-prv:
+            enabled: true
+            type: dpdk_ovs_bridge
+            tag: ${_param:tenant_vlan}
+            address: ${_param:tenant_address}
+            netmask: ${_param:tenant_network_netmask}
+
 **DPDK OVS bridge for VXLAN**
 
 If VXLAN is used as tenant segmentation then ip address must be set on br-prv
diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
index 4b73f7f..fb2da30 100644
--- a/linux/network/dpdk.sls
+++ b/linux/network/dpdk.sls
@@ -111,7 +111,7 @@
 
 linux_network_dpdk_bond_mode_{{ interface_name }}:
   cmd.run:
-    - name: "ovs-vsctl set port {{ interface_name }} bond_mode={{ interface.mode }}"
+    - name: "ovs-vsctl set port {{ interface_name }} bond_mode={{ interface.mode }}{%- if interface.mode == 'balance-slb' %} lacp=active{%- endif %}"
     - unless: "ovs-appctl bond/show {{ interface_name }} | grep {{ interface.mode }}"
     - require:
         - cmd: linux_network_dpdk_bond_interface_{{ interface_name }}
diff --git a/tests/pillar/network_openvswitch_dpdk.sls b/tests/pillar/network_openvswitch_dpdk.sls
index d4e6785..45a1a76 100644
--- a/tests/pillar/network_openvswitch_dpdk.sls
+++ b/tests/pillar/network_openvswitch_dpdk.sls
@@ -34,14 +34,39 @@
         bond: dpdkbond0
         enabled: true
         type: dpdk_ovs_port
+      dpdk2:
+        name: enp6s0f1
+        pci: "0000:06:00.1"
+        driver: igb_uio
+        bond: dpdkbond1
+        enabled: true
+        type: dpdk_ovs_port
+      dpdk3:
+        name: enp6s0f2
+        pci: "0000:06:00.2"
+        driver: igb_uio
+        bond: dpdkbond1
+        enabled: true
+        type: dpdk_ovs_port
       dpdkbond0:
         enabled: true
         bridge: br-prv
         type: dpdk_ovs_bond
         mode: active-backup
+      dpdkbond1:
+        enabled: true
+        bridge: br-mesh
+        type: dpdk_ovs_bond
+        mode: balance-slb
       br-prv:
         enabled: true
         type: dpdk_ovs_bridge
+      br-mesh:
+        tag: 1302
+        enabled: true
+        type: dpdk_ovs_bridge
+        address: 1.2.3.4
+        netmask: 255.255.255.252
       dummy0:
         enabled: true
         name: dummy0