diff options
author | 2025-02-14 13:20:02 +0100 | |
---|---|---|
committer | 2025-02-17 08:34:46 +0000 | |
commit | 10e9ea0af978882da73800c948b9141d37c8fde3 (patch) | |
tree | 5fb3169731c83b6b1deca47eceee81a6ae76a41c /resources | |
parent | d9754d4e05d7977dc7e32d0f602892e4b8613929 (diff) |
feat(core): Infra model condition
Signed-off-by: Peter Mikus <peter.mikus@icloud.com>
Change-Id: I7a367a152d46bb7a165428dbfc931d7063f3757a
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/VppConfigGenerator.py | 28 | ||||
-rw-r--r-- | resources/libraries/python/topology.py | 4 |
2 files changed, 18 insertions, 14 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index 849a32982a..7021d7fb77 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -827,20 +827,24 @@ class VppInitConfig: vpp_config.add_unix_cli_listen() vpp_config.add_unix_cli_no_pager() vpp_config.add_socksvr(socket=Constants.SOCKSVR_PATH) - vpp_config.add_main_heap_size("2G") - vpp_config.add_main_heap_page_size(huge_size) - vpp_config.add_default_hugepage_size(huge_size) - vpp_config.add_statseg_size("2G") - vpp_config.add_statseg_page_size(huge_size) vpp_config.add_statseg_per_node_counters("on") vpp_config.add_plugin("disable", "default") - vpp_config.add_plugin("enable", "dpdk_plugin.so") - vpp_config.add_dpdk_dev( - *[node["interfaces"][interface].get("pci_address") \ - for interface in node["interfaces"]] - ) - vpp_config.add_ip6_hash_buckets(2000000) - vpp_config.add_ip6_heap_size("4G") + vpp_config.add_buffers_per_numa(107520) + if Topology.get_node_model_bool(node, "Marvel-Octeon"): + vpp_config.add_plugin("enable", "dev_octeon_plugin.so") + else: + vpp_config.add_main_heap_size("2G") + vpp_config.add_main_heap_page_size(huge_size) + vpp_config.add_default_hugepage_size(huge_size) + vpp_config.add_statseg_size("2G") + vpp_config.add_statseg_page_size(huge_size) + vpp_config.add_ip6_hash_buckets(2000000) + vpp_config.add_ip6_heap_size("4G") + vpp_config.add_plugin("enable", "dpdk_plugin.so") + vpp_config.add_dpdk_dev( + *[node["interfaces"][interface].get("pci_address") \ + for interface in node["interfaces"]] + ) vpp_config.apply_config() @staticmethod diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 5a3dc2ae6f..aacc277ecb 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -995,7 +995,7 @@ class Topology: return "x86_64" @staticmethod - def get_node_model(node): + def get_node_model_bool(node, model=""): """Get node model (vendor/type). :param node: Node to get model (vendor/type) from. @@ -1004,7 +1004,7 @@ class Topology: :rtype: str """ try: - return node["model"] + return bool(model.lower() in node["model"].lower()) except KeyError: return None |