ipsec: add fast path python tests

This patch introduces set of python tests for fast path, based on
flow cache tests. There was a bug in calculating of policy mask when
adding to fast path, which has been fixed. Memory size for bihash
tables for both ip4 and ip6 outbound fast path policies
has been increased.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Ibeee904ae7179f5dafbd45bb44282436f0b80821
This commit is contained in:
Fan Zhang
2022-05-25 20:03:40 +00:00
committed by Piotr Bronowski
parent 422544363c
commit ab0bf0c0cb
2 changed files with 782 additions and 0 deletions

View File

@ -1888,6 +1888,15 @@ class IPSecIPv4Fwd(VppTestCase):
policy_type,
remove=False,
all_ips=False,
ip_range=False,
local_ip_start=ip_address("0.0.0.0"),
local_ip_stop=ip_address("255.255.255.255"),
remote_ip_start=ip_address("0.0.0.0"),
remote_ip_stop=ip_address("255.255.255.255"),
remote_port_start=0,
remote_port_stop=65535,
local_port_start=0,
local_port_stop=65535,
):
spd = VppIpsecSpd(self, spd_id)
@ -1896,6 +1905,13 @@ class IPSecIPv4Fwd(VppTestCase):
src_range_high = ip_address("255.255.255.255")
dst_range_low = ip_address("0.0.0.0")
dst_range_high = ip_address("255.255.255.255")
elif ip_range:
src_range_low = local_ip_start
src_range_high = local_ip_stop
dst_range_low = remote_ip_start
dst_range_high = remote_ip_stop
else:
src_range_low = src_if.remote_ip4
src_range_high = src_if.remote_ip4
@ -1914,6 +1930,10 @@ class IPSecIPv4Fwd(VppTestCase):
priority=priority,
policy=self.get_policy(policy_type),
is_outbound=is_out,
remote_port_start=remote_port_start,
remote_port_stop=remote_port_stop,
local_port_start=local_port_start,
local_port_stop=local_port_stop,
)
if remove is False:

File diff suppressed because it is too large Load Diff