X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=437386d81d165900c65c6245ffe9d021bbe0f60b;hp=f19294965a90ce0326409540126e0b54017c29bd;hb=9377c956a86e42727039d9dab8879c10c9399f4c;hpb=b9457dab3abab7b16f5766c93de6d4d3ca0d03c2 diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index f19294965a..437386d81d 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -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. @@ -419,13 +399,22 @@ class VppConfigGenerator: path = [u"cpu", u"corelist-workers"] self.add_config_item(self._nodeconfig, value, path) - def add_heapsize(self, value): - """Add Heapsize configuration. + def add_main_heap_size(self, value): + """Add Main Heap Size configuration. + + :param value: Amount of heap. + :type value: str + """ + path = [u"memory", u"main-heap-size"] + self.add_config_item(self._nodeconfig, value, path) + + def add_main_heap_page_size(self, value): + """Add Main Heap Page Size configuration. - :param value: Amount of heapsize. + :param value: Heap page size. :type value: str """ - path = [u"heapsize"] + path = [u"memory", u"main-heap-page-size"] self.add_config_item(self._nodeconfig, value, path) def add_api_trace(self): @@ -451,22 +440,22 @@ class VppConfigGenerator: path = [u"ip6", u"heap-size"] self.add_config_item(self._nodeconfig, value, path) - def add_ip_heap_size(self, value): - """Add IP heap-size configuration. + def add_statseg_size(self, value): + """Add Stats Heap Size configuration. - :param value: IP Heapsize amount. + :param value: Stats heapsize amount. :type value: str """ - path = [u"ip", u"heap-size"] + path = [u"statseg", u"size"] self.add_config_item(self._nodeconfig, value, path) - def add_statseg_size(self, value): - """Add stats segment heap size configuration. + def add_statseg_page_size(self, value): + """Add Stats Heap Page Size configuration. :param value: Stats heapsize amount. :type value: str """ - path = [u"statseg", u"size"] + path = [u"statseg", u"page-size"] self.add_config_item(self._nodeconfig, value, path) def add_statseg_per_node_counters(self, value): @@ -501,12 +490,21 @@ class VppConfigGenerator: self.add_config_item(self._nodeconfig, u"", path) def add_nat(self, value=u"deterministic"): - """Add NAT configuration. + """Add NAT mode configuration. + + :param value: NAT mode. + :type value: str + """ + path = [u"nat", value] + self.add_config_item(self._nodeconfig, u"", path) + + def add_nat_max_translations_per_thread(self, value): + """Add NAT max. translations per thread number configuration. :param value: NAT mode. :type value: str """ - path = [u"nat"] + path = [u"nat", u"max translations per thread"] self.add_config_item(self._nodeconfig, value, path) def add_nsim_poll_main_thread(self):