aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2022-02-08 10:45:46 +0100
committerVratko Polak <vrpolak@cisco.com>2022-02-08 13:17:43 +0100
commit31854f0cc48f0dde63b1ba82b467528181873435 (patch)
tree7b6467f8fb29e1dc6f94c80ce0c1770ca3b331a2 /resources/libraries/python
parente7197f5428b5eb836a6fa636ff4ec9f14a65deca (diff)
feat(autogen): generate gso suites for all nics
Previously, only x710 was generated, but ICX has xxv710 instead. Nic drivers (tap or vhost) remain hardcoded. Change-Id: I0ed3abb60258d74622995a8910f67ae4500ace56 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/autogen/Regenerator.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py
index adbdbd9086..3011b06897 100644
--- a/resources/libraries/python/autogen/Regenerator.py
+++ b/resources/libraries/python/autogen/Regenerator.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -522,20 +522,21 @@ def write_iperf3_files(in_filename, in_prolog, kwargs_list):
"""
_, suite_id, suite_tag = get_iface_and_suite_ids(in_filename)
testcase = Testcase.iperf3(suite_id)
- out_filename = replace_defensively(
- in_filename, u"10ge2p1x710",
- Constants.NIC_NAME_TO_CODE[u"Intel-X710"], 1,
- u"File name should contain NIC code once.", in_filename
- )
- out_prolog = replace_defensively(
- in_prolog, u"Intel-X710", u"Intel-X710", 2,
- u"NIC name should appear twice (tag and variable).",
- in_filename
- )
- check_suite_tag(suite_tag, out_prolog)
- with open(out_filename, u"wt") as file_out:
- file_out.write(out_prolog)
- add_iperf3_testcases(testcase, file_out, kwargs_list)
+ for nic_name in Constants.NIC_NAME_TO_CODE:
+ out_filename = replace_defensively(
+ in_filename, u"10ge2p1x710",
+ Constants.NIC_NAME_TO_CODE[nic_name], 1,
+ u"File name should contain NIC code once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ in_prolog, u"Intel-X710", nic_name, 2,
+ u"NIC name should appear twice (tag and variable).",
+ in_filename
+ )
+ check_suite_tag(suite_tag, out_prolog)
+ with open(out_filename, u"wt") as file_out:
+ file_out.write(out_prolog)
+ add_iperf3_testcases(testcase, file_out, kwargs_list)
def write_trex_files(in_filename, in_prolog, kwargs_list):