X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=c1bde497420b329998f15a17087a7f89d674401e;hp=eccada9979c86dce9bd3cf9af6c1d481abb774dc;hb=6e25bb5e8b8bcc2a1f741892508a68aec7d791b9;hpb=69bc73179fe39ea02c9d53c0eb167e1320bcf090 diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index eccada9979..c1bde49742 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -180,6 +180,24 @@ class VppConfigGenerator(object): path = ['api-segment', 'gid'] self.add_config_item(self._nodeconfig, value, path) + def add_api_segment_global_size(self, value): + """Add API-SEGMENT global-size configuration. + + :param value: Global size. + :type value: str + """ + path = ['api-segment', 'global-size'] + self.add_config_item(self._nodeconfig, value, path) + + def add_api_segment_api_size(self, value): + """Add API-SEGMENT api-size configuration. + + :param value: API size. + :type value: str + """ + path = ['api-segment', 'api-size'] + self.add_config_item(self._nodeconfig, value, path) + def add_dpdk_dev(self, *devices): """Add DPDK PCI device configuration. @@ -211,15 +229,19 @@ class VppConfigGenerator(object): self.add_config_item(self._nodeconfig, '', path) self.add_dpdk_uio_driver('igb_uio') - def add_dpdk_sw_cryptodev(self, count): - """Add DPDK Crypto SW device configuration. + def add_dpdk_sw_cryptodev(self, sw_pmd_type, socket_id, count): + """Add DPDK SW Crypto device configuration. - :param count: Number of crypto SW devices to add. + :param sw_pmd_type: Type of SW crypto device PMD to add. + :param socket_id: Socket ID. + :param count: Number of SW crypto devices to add. + :type sw_pmd_type: str + :type socket_id: int :type count: int """ - for i in range(count): - cryptodev_config = 'vdev cryptodev_aesni_mb_pmd,socket_id={0}'.\ - format(str(i)) + for _ in range(count): + cryptodev_config = 'vdev cryptodev_{0}_pmd,socket_id={1}'.\ + format(sw_pmd_type, str(socket_id)) path = ['dpdk', cryptodev_config] self.add_config_item(self._nodeconfig, '', path) @@ -327,6 +349,15 @@ class VppConfigGenerator(object): path = ['ip6', 'heap-size'] self.add_config_item(self._nodeconfig, value, path) + def add_ip_heap_size(self, value): + """Add IP heap-size configuration. + + :param value: IP Heapsize amount. + :type value: str + """ + path = ['ip', 'heap-size'] + self.add_config_item(self._nodeconfig, value, path) + def add_plugin_disable(self, *plugins): """Add plugin disable for specific plugin.