Add dpdk max-simd-bitwidth configuration. 09/32409/3
authorxinfeng zhao <xinfengx.zhao@intel.com>
Thu, 20 May 2021 02:59:02 +0000 (10:59 +0800)
committerVratko Polak <vrpolak@cisco.com>
Wed, 26 May 2021 14:22:59 +0000 (14:22 +0000)
Signed-off-by: xinfeng zhao <xinfengx.zhao@intel.com>
Reviewed-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Ie7b9912eacdb60689012936580d3d774f7e470ae

resources/libraries/python/VppConfigGenerator.py
resources/libraries/robot/shared/interfaces.robot

index 437386d..b5f36c6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 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:
 # 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:
@@ -381,6 +381,22 @@ class VppConfigGenerator:
         path = [u"dpdk", u"uio-driver"]
         self.add_config_item(self._nodeconfig, value, path)
 
         path = [u"dpdk", u"uio-driver"]
         self.add_config_item(self._nodeconfig, value, path)
 
+    def add_dpdk_max_simd_bitwidth(self, variant=Constants.GRAPH_NODE_VARIANT):
+        """Add DPDK max-simd-bitwidth configuration.
+
+        :param value: Graph node variant default value.
+        :type value: str
+        """
+        if variant == u"icl":
+            value = 512
+        elif variant in [u"skx", u"hsw"]:
+            value = 256
+        else:
+            return
+
+        path = [u"dpdk", u"max-simd-bitwidth"]
+        self.add_config_item(self._nodeconfig, value, path)
+
     def add_cpu_main_core(self, value):
         """Add CPU main core configuration.
 
     def add_cpu_main_core(self, value):
         """Add CPU main core configuration.
 
index a9b6440..30c0940 100644 (file)
 | | | ... | ${dut}.Add DPDK Dev Default TXD | ${nic_txq_size}
 | | | Run Keyword If | '${crypto_type}' != '${None}'
 | | | ... | ${dut}.Add DPDK Cryptodev | ${thr_count_int}
 | | | ... | ${dut}.Add DPDK Dev Default TXD | ${nic_txq_size}
 | | | Run Keyword If | '${crypto_type}' != '${None}'
 | | | ... | ${dut}.Add DPDK Cryptodev | ${thr_count_int}
+| | | Run Keyword | ${dut}.Add DPDK Max Simd Bitwidth | ${GRAPH_NODE_VARIANT}
 | | END
 | | ${_vlan_strip} | ${value}= | Run Keyword And Ignore Error
 | | ... | Variable Should Exist | ${vlan_strip_off}
 | | END
 | | ${_vlan_strip} | ${value}= | Run Keyword And Ignore Error
 | | ... | Variable Should Exist | ${vlan_strip_off}