X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=b5f36c69a0c7506fe0d0cfe70b132f65e319802a;hp=fa8290d9746a70a070781ef4ccd48e07bcf19dde;hb=82863d5b8422b1b817d86bd6b1829a06a49feb02;hpb=636c8c711b5f44cd0ef7c4a04a4b3bc0aad6566d diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index fa8290d974..b5f36c69a0 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -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: @@ -318,26 +318,6 @@ class VppConfigGenerator: path = [u"dpdk", cryptodev_config] self.add_config_item(self._nodeconfig, u"", path) - def add_dpdk_eth_bond_dev(self, ethbond_id, mode, xmit_policy, *slaves): - """Add DPDK Eth_bond device configuration. - - :param ethbond_id: Eth_bond device ID. - :param mode: Link bonding mode. - :param xmit_policy: Transmission policy. - :param slaves: PCI device(s) to be bonded (format xxxx:xx:xx.x). - :type ethbond_id: str or int - :type mode: str or int - :type xmit_policy: str - :type slaves: list - """ - slaves_config = u"slave=" + u",slave=".join( - slave if pci_dev_check(slave) else u"" for slave in slaves - ) - ethbond_config = f"vdev eth_bond{ethbond_id}," \ - f"mode={mode}{slaves_config},xmit_policy={xmit_policy}" - path = [u"dpdk", ethbond_config] - self.add_config_item(self._nodeconfig, u"", path) - def add_dpdk_dev_default_rxq(self, value): """Add DPDK dev default rxq configuration. @@ -401,6 +381,22 @@ class VppConfigGenerator: 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.