diff options
author | Yulong Pei <yulong.pei@intel.com> | 2023-03-28 04:35:47 +0000 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2023-04-03 14:26:41 +0000 |
commit | 3a8e7ca967bdb63f2497ff5654fbf94de4c465a2 (patch) | |
tree | 01ea679dfb4d383b43c0228b31181d5bd20abbff | |
parent | 327f93c093a163f60af19e34f20c0cba7d17e0a0 (diff) |
Enable IPsec policy fast path inbound
This will greatly improve the performance of IPsec policy cases
Signed-off-by: xinfeng zhao <xinfengx.zhao@intel.com>
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Ib42b5650791be7fcc8649873eaf12616aeba5aec
5 files changed, 30 insertions, 6 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index 926b5c767a..f155bcf2a7 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -433,6 +433,15 @@ class VppConfigGenerator: path = [u"ip6", u"heap-size"] self.add_config_item(self._nodeconfig, value, path) + 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. @@ -442,6 +451,15 @@ class VppConfigGenerator: path = [u"ipsec", u"ipv4-outbound-spd-flow-cache"] 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. diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot index d03f662994..ee506e1d40 100644 --- a/resources/libraries/robot/crypto/ipsec.robot +++ b/resources/libraries/robot/crypto/ipsec.robot @@ -252,9 +252,10 @@ | | | Run Keyword | ${dut}.Add IPsec SPD Flow cache IPv4 Outbound | on | | END -| Enable IPsec SPD Fast Path IPv4 Outbound +| Enable IPsec SPD Fast Path IPv4 Inbound and Outbound | | [Documentation] -| | ... | Enable IPsec SPD fast path IPv4 outbound in VPP configuration file. +| | ... | Enable IPsec SPD fast path IPv4 Inbound and outbound in VPP +| | ... | configuration file. | | | | ... | *Arguments:* | | ... | - value - The number buckets for spd fast path. Type: int @@ -262,7 +263,9 @@ | | [Arguments] | ${value} | | | | FOR | ${dut} | IN | @{duts} -| | | Run Keyword | ${dut}.Add IPsec SPD Flow cache IPv4 Outbound | off +| | | Run Keyword | ${dut}.Add IPsec SPD Flow Cache IPv4 Outbound | off +| | | Run Keyword | ${dut}.Add IPsec SPD Flow Cache IPv4 Inbound | off | | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Outbound | on +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Inbound | on | | | Run Keyword | ${dut}.Add IPsec SPD Fast Path Num Buckets | ${value} | | END diff --git a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlhwasync-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlhwasync-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot index ac920e187b..8018972b52 100644 --- a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlhwasync-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot +++ b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlhwasync-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot @@ -111,7 +111,8 @@ | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} -| | And Enable IPsec SPD Fast Path IPv4 Outbound | ${${n_tunnels}*10} +| | And Enable IPsec SPD Fast Path IPv4 Inbound And Outbound +| | ... | ${${n_tunnels}*10} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface diff --git a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot index 1b0ce789ed..3ce2a25f6e 100644 --- a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot +++ b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec10000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot @@ -115,7 +115,8 @@ | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} -| | And Enable IPsec SPD Fast Path IPv4 Outbound | ${${n_tunnels}*10} +| | And Enable IPsec SPD Fast Path IPv4 Inbound And Outbound +| | ... | ${${n_tunnels}*10} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface diff --git a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec40000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec40000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot index 07f69e8bfe..7e238dbcc7 100644 --- a/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec40000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot +++ b/tests/vpp/perf/crypto/10ge2p1x710-ethip4ipsec40000tnlsw-ip4base-policy-fastpath-aes256gcm-ndrpdr.robot @@ -115,7 +115,8 @@ | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} -| | And Enable IPsec SPD Fast Path IPv4 Outbound | ${${n_tunnels}*10} +| | And Enable IPsec SPD Fast Path IPv4 Inbound And Outbound +| | ... | ${${n_tunnels}*10} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface |