feat(autogen): generate gso suites for all nics 40/35240/1
authorVratko Polak <vrpolak@cisco.com>
Tue, 8 Feb 2022 09:45:46 +0000 (10:45 +0100)
committerTibor Frank <tifrank@cisco.com>
Wed, 9 Feb 2022 05:10:10 +0000 (05:10 +0000)
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)

resources/libraries/python/autogen/Regenerator.py

index adbdbd9..3011b06 100644 (file)
@@ -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):