Change the default plugin behavior in perf tests 33/11433/5
authorPeter Mikus <pmikus@cisco.com>
Wed, 28 Mar 2018 11:31:03 +0000 (13:31 +0200)
committerPeter Mikus <pmikus@cisco.com>
Fri, 30 Mar 2018 04:04:10 +0000 (04:04 +0000)
Currently we are selectively disabling plugins by creating list of
disabled plugins for performance tests. Thanks to the new API in VPP we
can revert the logic to selectivly enable plugins. This is more stable
for future onboarding of new plugins into VPP.

Change-Id: Ibdd56d6097230d095a304bbb6984b565d9428f51
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/python/ContainerUtils.py
resources/libraries/python/VppConfigGenerator.py
resources/libraries/robot/performance/performance_setup.robot
resources/libraries/robot/shared/default.robot
tests/kubernetes/perf/__init__.robot
tests/vpp/perf/__init__.robot

index aafc3eb..da3d705 100644 (file)
@@ -327,7 +327,8 @@ class ContainerEngine(object):
         if cpuset_cpus:
             corelist_workers = ','.join(str(cpu) for cpu in cpuset_cpus)
             vpp_config.add_cpu_corelist_workers(corelist_workers)
-        vpp_config.add_plugin_disable('dpdk_plugin.so')
+        vpp_config.add_plugin('disable', 'default')
+        vpp_config.add_plugin('enable', 'memif_plugin.so')
 
         self.execute('mkdir -p /etc/vpp/')
         self.execute('echo "{c}" | tee {f}'
index 819224f..4476cfa 100644 (file)
@@ -358,14 +358,16 @@ class VppConfigGenerator(object):
         path = ['ip', 'heap-size']
         self.add_config_item(self._nodeconfig, value, path)
 
-    def add_plugin_disable(self, *plugins):
-        """Add plugin disable for specific plugin.
+    def add_plugin(self, state, *plugins):
+        """Add plugin section for specific plugin(s).
 
+        :param state: State of plugin [enable|disable].
         :param plugins: Plugin(s) to disable.
+        :type state: str
         :type plugins: list
         """
         for plugin in plugins:
-            path = ['plugins', 'plugin {0}'.format(plugin), 'disable']
+            path = ['plugins', 'plugin {0}'.format(plugin), state]
             self.add_config_item(self._nodeconfig, ' ', path)
 
     def add_dpdk_no_multi_seg(self):
index 7699fb1..e66a98b 100644 (file)
 
 | Set up performance test suite with MEMIF
 | | [Documentation]
-| | ... | Remove memif_plugin.so from the list of disabled plugins.
+| | ... | Append memif_plugin.so to the list of enabled plugins.
 | | ...
-| | Set Suite Variable | @{plugins_to_disable}
-| | Remove Values From List | ${plugins_to_disable} | memif_plugin.so
+| | Set Suite Variable | @{plugins_to_enable}
+| | Append To List | ${plugins_to_enable} | memif_plugin.so
 
 | Set up performance test suite with NAT
 | | [Documentation]
-| | ... | Remove nat_plugin.so from the list of disabled plugins.
+| | ... | Append nat_plugin.so to the list of enabled plugins.
 | | ...
-| | Set Suite Variable | @{plugins_to_disable}
-| | Remove Values From List | ${plugins_to_disable} | nat_plugin.so
+| | Set Suite Variable | @{plugins_to_enable}
+| | Append To List | ${plugins_to_enable} | nat_plugin.so
 
 | Set up performance test suite with ACL
 | | [Documentation]
-| | ... | Remove acl_plugin.so from the list of disabled plugins.
+| | ... | Append acl_plugin.so to the list of enabled plugins.
 | | ...
-| | Set Suite Variable | @{plugins_to_disable}
-| | Remove Values From List | ${plugins_to_disable} | acl_plugin.so
+| | Set Suite Variable | @{plugins_to_enable}
+| | Append To List | ${plugins_to_enable} | acl_plugin.so
 
 | Set up 3-node performance topology with wrk and DUT's NIC model
 | | [Documentation]
index 200bb3b..ccc54b0 100644 (file)
 | | | Run keyword | ${dut}.Add DPDK Socketmem | "1024,1024"
 | | | Run keyword | ${dut}.Add DPDK No Tx Checksum Offload
 | | | Run keyword | ${dut}.Add Heapsize | "4G"
-| | | Run keyword | ${dut}.Add Plugin Disable | @{plugins_to_disable}
+| | | Run keyword | ${dut}.Add Plugin | disable | default
+| | | Run keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable}
 | | | Run keyword | ${dut}.Add IP6 Hash Buckets | "2000000"
 | | | Run keyword | ${dut}.Add IP6 Heap Size | "4G"
 | | | Run keyword | ${dut}.Add IP Heap Size | "4G"
index 769ef0c..2ae753a 100644 (file)
 | | Set Global Variable | ${perf_pdr_loss_acceptance} | 0.5
 | | Set Global Variable | ${perf_pdr_loss_acceptance_type} | percentage
 | | Set Global Variable | ${pkt_trace} | ${False}
-| | @{plugins_to_disable}= | Create List
-| | ... | acl_plugin.so
-| | ... | cdp_plugin.so
-| | ... | flowprobe_plugin.so
-| | ... | gbp_plugin.so
-| | ... | gtpu_plugin.so
-| | ... | igmp_plugin.so
-| | ... | ila_plugin.so
-| | ... | ioam_plugin.so
-| | ... | ixge_plugin.so
-| | ... | kubeproxy_plugin.so
-| | ... | l2e_plugin.so
-| | ... | lb_plugin.so
-| | ... | memif_plugin.so
-| | ... | nat_plugin.so
-| | ... | pppoe_plugin.so
-| | ... | srv6ad_plugin.so
-| | ... | srv6am_plugin.so
-| | ... | srv6as_plugin.so
-# | | ... | sixrd_plugin.so
-| | ... | stn_plugin.so
-| | ... | tlsmbedtls_plugin.so
-| | ... | tlsopenssl_plugin.so
+| | @{plugins_to_disable}= | Create List | dpdk_plugin.so
 | | Set Global Variable | @{plugins_to_disable}
index 5e47502..b798b1d 100644 (file)
 | | Set Global Variable | ${use_tuned_cfs} | ${False}
 | | Set Global Variable | ${qemu_build} | ${True}
 | | Set Global Variable | ${pkt_trace} | ${False}
-| | @{plugins_to_disable}= | Create List
-| | ... | acl_plugin.so
-| | ... | cdp_plugin.so
-| | ... | flowprobe_plugin.so
-| | ... | gbp_plugin.so
-| | ... | gtpu_plugin.so
-| | ... | igmp_plugin.so
-| | ... | ila_plugin.so
-| | ... | ioam_plugin.so
-| | ... | ixge_plugin.so
-| | ... | kubeproxy_plugin.so
-| | ... | l2e_plugin.so
-| | ... | lb_plugin.so
-| | ... | memif_plugin.so
-| | ... | nat_plugin.so
-| | ... | pppoe_plugin.so
-| | ... | srv6ad_plugin.so
-| | ... | srv6am_plugin.so
-| | ... | srv6as_plugin.so
-# | | ... | sixrd_plugin.so
-| | ... | stn_plugin.so
-| | ... | tlsmbedtls_plugin.so
-| | ... | tlsopenssl_plugin.so
-| | Set Global Variable | @{plugins_to_disable}
+| | @{plugins_to_enable}= | Create List | dpdk_plugin.so
+| | Set Global Variable | @{plugins_to_enable}