summaryrefslogtreecommitdiffstats
path: root/vsperf
diff options
context:
space:
mode:
authorRobert Wojciechowicz <robertx.wojciechowicz@intel.com>2015-12-09 10:07:38 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-01-21 09:41:05 +0000
commit9a054248197bdaed71b32e9d9c0ac621bf89c1cd (patch)
treec186250f91e658845cd8f3a985517c33a9ba0220 /vsperf
parent7caf7a6be0fae6b341181b3e6286372e2e93b4b8 (diff)
Add testpmd as vswitch class
The purpose of using testpmd instead of OVS is to get the baseline of the DUT when performing hardware offloading operations. There are supported different checksum calculation and txq flags settings. Change-Id: I93c9b45dcb31eaa1f610b7e061f3dd5936b0e6ec JIRA: VSPERF-193 Signed-off-by: Robert Wojciechowicz <robertx.wojciechowicz@intel.com> Reviewed-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'vsperf')
-rwxr-xr-xvsperf39
1 files changed, 34 insertions, 5 deletions
diff --git a/vsperf b/vsperf
index 53699104..50f0996a 100755
--- a/vsperf
+++ b/vsperf
@@ -121,6 +121,8 @@ def parse_arguments():
help='list all system metrics loggers and exit')
parser.add_argument('--list-vswitches', action='store_true',
help='list all system vswitches and exit')
+ parser.add_argument('--list-fwdapps', action='store_true',
+ help='list all system forwarding applications and exit')
parser.add_argument('--list-vnfs', action='store_true',
help='list all system vnfs and exit')
parser.add_argument('--list-settings', action='store_true',
@@ -140,6 +142,7 @@ def parse_arguments():
help='debug level')
group.add_argument('--trafficgen', help='traffic generator to use')
group.add_argument('--vswitch', help='vswitch implementation to use')
+ group.add_argument('--fwdapp', help='packet forwarding application to use')
group.add_argument('--vnf', help='vnf to use')
group.add_argument('--duration', help='traffic transmit duration')
group.add_argument('--sysmetrics', help='system metrics logger to use')
@@ -301,6 +304,7 @@ def main():
# than both a settings file and environment variables
settings.load_from_dict(args)
+ vswitch_none = False
# set dpdk and ovs paths accorfing to VNF and VSWITCH
if settings.getValue('VSWITCH').endswith('Vanilla'):
# settings paths for Vanilla
@@ -318,6 +322,8 @@ def main():
# default - set to VHOST USER but can be changed during enhancement
settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER')))
settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER')))
+ if 'none' == settings.getValue('VSWITCH').strip().lower():
+ vswitch_none = True
configure_logging(settings.getValue('VERBOSITY'))
logger = logging.getLogger()
@@ -337,11 +343,25 @@ def main():
# configure vswitch
if args['vswitch']:
- vswitches = Loader().get_vswitches()
- if args['vswitch'] not in vswitches:
- logging.error('There are no vswitches matching \'%s\' found in'
- ' \'%s\'. Exiting...', args['vswitch'],
- settings.getValue('VSWITCH_DIR'))
+ vswitch_none = 'none' == args['vswitch'].strip().lower()
+ if vswitch_none:
+ settings.setValue('VSWITCH', 'none')
+ else:
+ vswitches = Loader().get_vswitches()
+ if args['vswitch'] not in vswitches:
+ logging.error('There are no vswitches matching \'%s\' found in'
+ ' \'%s\'. Exiting...', args['vswitch'],
+ settings.getValue('VSWITCH_DIR'))
+ sys.exit(1)
+
+ if args['fwdapp']:
+ settings.setValue('PKTFWD', args['fwdapp'])
+ fwdapps = Loader().get_pktfwds()
+ if args['fwdapp'] not in fwdapps:
+ logging.error('There are no forwarding application'
+ ' matching \'%s\' found in'
+ ' \'%s\'. Exiting...', args['fwdapp'],
+ settings.getValue('PKTFWD_DIR'))
sys.exit(1)
if args['vnf']:
@@ -404,6 +424,10 @@ def main():
print(Loader().get_vswitches_printable())
exit()
+ if args['list_fwdapps']:
+ print(Loader().get_pktfwds_printable())
+ exit()
+
if args['list_vnfs']:
print(Loader().get_vnfs_printable())
exit()
@@ -441,6 +465,11 @@ def main():
suite = unittest.TestSuite()
for test in selected_tests:
try:
+ if vswitch_none:
+ if test.deployment.lower() != 'p2p':
+ logging.error('\'none\' vswitch option supported only'
+ ' for p2p deployment.')
+ sys.exit(1)
test.run()
suite.addTest(MockTestCase('', True, test.name))
#pylint: disable=broad-except