X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=9a117626ea16f021fe8e9804cfd36e1523ef2ad0;hb=9b28d46b56183770b8b354467f469c7fe5d7f19d;hp=dc1529033ba321d8a24017345bdf521736711203;hpb=d65da6a72887238eae5dd3b7eb4e53055ef516c3;p=csit.git diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index dc1529033b..9a117626ea 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: @@ -58,8 +58,6 @@ class VppConfigGenerator: self._vpp_config = u"" # VPP Service name self._vpp_service_name = u"vpp" - # VPP Logfile location - self._vpp_logfile = u"/tmp/vpe.log" # VPP Startup config location self._vpp_startup_conf = u"/etc/vpp/startup.conf" @@ -133,15 +131,13 @@ class VppConfigGenerator: if level >= 0: self._vpp_config += f"{level * indent}}}\n" - def add_unix_log(self, value=None): + def add_unix_log(self, value="/var/log/vpp/vpp.log"): """Add UNIX log configuration. :param value: Log file. :type value: str """ path = [u"unix", u"log"] - if value is None: - value = self._vpp_logfile self.add_config_item(self._nodeconfig, value, path) def add_unix_cli_listen(self, value=u"/run/vpp/cli.sock"): @@ -433,10 +429,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_inbound(self, value): + """Add IPsec spd flow cache for IP4 inbound. + + :param value: "on" to enable spd flow cache. + :type value: str + """ + path = [u"ipsec", u"ipv4-inbound-spd-flow-cache"] + self.add_config_item(self._nodeconfig, value, path) + + 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_inbound(self, value): + """Add IPsec spd fast path for IP4 inbound. + + :param value: "on" to enable spd fast path. + :type value: str + """ + path = [u"ipsec", u"ipv4-inbound-spd-fast-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. @@ -560,6 +578,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"]