diff options
author | Vratko Polak <vrpolak@cisco.com> | 2022-02-08 10:45:46 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2022-02-09 05:10:10 +0000 |
commit | 99ba92addab71a3e5d1330e2e395ee8b1c52b179 (patch) | |
tree | 9170fcf005aa2204173f32ba081c9b229ea4c765 /resources | |
parent | 6833f64aa863a258d3fe5862ad730ab02e152fa6 (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>
(cherry picked from commit 31854f0cc48f0dde63b1ba82b467528181873435)
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/autogen/Regenerator.py | 31 |
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): |