X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=926b5c767a37377c3a47e641654c18ca03afecbd;hb=752538617f43672a0a9eeb93432929032cca05d3;hp=3bd9c0b06702cb85f4f84bc7d166fe8628323b66;hpb=585b2e3c08cb87badfe702eb29300634c761a17b;p=csit.git diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index 3bd9c0b067..926b5c767a 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -257,20 +257,6 @@ class VppConfigGenerator: path = [u"dpdk", f"dev {device}"] self.add_config_item(self._nodeconfig, u"", path) - def add_dpdk_dev_parameter(self, device, parameter, value): - """Add parameter for DPDK device. - - :param device: PCI device (format xxxx:xx:xx.x). - :param parameter: Parameter name. - :param value: Parameter value. - :type device: str - :type parameter: str - :type value: str - """ - if pci_dev_check(device): - path = [u"dpdk", f"dev {device}", parameter] - self.add_config_item(self._nodeconfig, value, path) - def add_dpdk_cryptodev(self, count): """Add DPDK Crypto PCI device configuration. @@ -447,10 +433,32 @@ class VppConfigGenerator: path = [u"ip6", u"heap-size"] self.add_config_item(self._nodeconfig, value, path) - def add_spd_flow_cache_ipv4_outbound(self): - """Add SPD flow cache for IP4 outbound traffic""" + def add_ipsec_spd_flow_cache_ipv4_outbound(self, value): + """Add IPsec spd flow cache for IP4 outbound. + + :param value: "on" to enable spd flow cache. + :type value: str + """ path = [u"ipsec", u"ipv4-outbound-spd-flow-cache"] - self.add_config_item(self._nodeconfig, "on", path) + self.add_config_item(self._nodeconfig, value, path) + + def add_ipsec_spd_fast_path_ipv4_outbound(self, value): + """Add IPsec spd fast path for IP4 outbound. + + :param value: "on" to enable spd fast path. + :type value: str + """ + path = [u"ipsec", u"ipv4-outbound-spd-fast-path"] + self.add_config_item(self._nodeconfig, value, path) + + def add_ipsec_spd_fast_path_num_buckets(self, value): + """Add num buckets for IPsec spd fast path. + + :param value: Number of buckets. + :type value: int + """ + path = [u"ipsec", u"spd-fast-path-num-buckets"] + self.add_config_item(self._nodeconfig, value, path) def add_statseg_size(self, value): """Add Stats Heap Size configuration. @@ -556,6 +564,11 @@ class VppConfigGenerator: path = [u"session", u"enable"] self.add_config_item(self._nodeconfig, u"", path) + def add_session_app_socket_api(self): + """Use session app socket api.""" + path = [u"session", u"use-app-socket-api"] + self.add_config_item(self._nodeconfig, u"", path) + def add_session_event_queues_memfd_segment(self): """Add session event queue memfd segment.""" path = [u"session", u"evt_qs_memfd_seg"]