From 97e6de93dc4de1b7724d659c213b5c09a25287d8 Mon Sep 17 00:00:00 2001 From: Pierrick Louin Date: Fri, 2 Aug 2019 15:16:33 +0200 Subject: NFVBENCH-146 Add cache_size option Change-Id: I99c1242198e40bd75cfd013c829d0d24dbafb5d9 Signed-off-by: fmenguy --- nfvbench/nfvbench.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'nfvbench/nfvbench.py') diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 4a2a285..050017e 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -87,7 +87,8 @@ class NFVBench(object): try: # recalc the running config based on the base config and options for this run self._update_config(opts) - + if self.config.cache_size < 0: + self.config.cache_size = self.config.flow_count # check that an empty openrc file (no OpenStack) is only allowed # with EXT chain if not self.config.openrc_file and self.config.service_chain != ChainType.EXT: @@ -433,6 +434,11 @@ def _parse_opts_from_cli(): metavar='', help='Port to port or port to switch to port L2 loopback with VLAN id') + parser.add_argument('--cache-size', dest='cache_size', + action='store', + default='0', + help='Specify the FE cache size (default: 0, flow-count if < 0)') + opts, unknown_opts = parser.parse_known_args() return opts, unknown_opts -- cgit 1.2.3-korg