aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-03-28 13:31:03 +0200
committerPeter Mikus <pmikus@cisco.com>2018-03-30 04:04:10 +0000
commit01e72f9dce0ef3eeb10ca9097836f7d34e40fa0d (patch)
treefe03556490a82ae012c9994f820bb4f811d9fb03 /resources/libraries
parentac3860dbb6e25b68d96ceadc2e887d81b7ea5603 (diff)
Change the default plugin behavior in perf tests
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>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/ContainerUtils.py3
-rw-r--r--resources/libraries/python/VppConfigGenerator.py8
-rw-r--r--resources/libraries/robot/performance/performance_setup.robot18
-rw-r--r--resources/libraries/robot/shared/default.robot3
4 files changed, 18 insertions, 14 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py
index aafc3eb180..da3d7057dc 100644
--- a/resources/libraries/python/ContainerUtils.py
+++ b/resources/libraries/python/ContainerUtils.py
@@ -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}'
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 819224f485..4476cfa3ee 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -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):
diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot
index 7699fb1719..e66a98b19c 100644
--- a/resources/libraries/robot/performance/performance_setup.robot
+++ b/resources/libraries/robot/performance/performance_setup.robot
@@ -388,24 +388,24 @@
| 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]
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 200bb3b20f..ccc54b0720 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -124,7 +124,8 @@
| | | 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"