From f64277566c62145f2a20f18fd36b4f5a1c1ba8d6 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Wed, 16 Nov 2022 08:57:13 -0800 Subject: [PATCH] Change ACL list match to prefix list for IPs (#269) The SAI API change opencomputeproject/SAI#1630 Signed-off-by: Marian Pritsak --- dash-pipeline/SAI/sai_api_gen.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dash-pipeline/SAI/sai_api_gen.py b/dash-pipeline/SAI/sai_api_gen.py index 062592963..9764a8184 100755 --- a/dash-pipeline/SAI/sai_api_gen.py +++ b/dash-pipeline/SAI/sai_api_gen.py @@ -68,13 +68,13 @@ def get_sai_list_type(key_size, key_header, key_field): elif key_size <= 16: return 'sai_u16_list_t', "u16list" elif key_size == 32 and ('addr' in key_field or 'ip' in key_header): - return 'sai_ip_address_list_t', "ipaddrlist" + return 'sai_ip_prefix_list_t', "ipprefixlist" elif key_size <= 32: return 'sai_u32_list_t', "u32list" - elif key_size <= 64: - ValueError(f'sai_u64_list_t is not supported') - return 'sai_u64_list_t', "no mapping" - raise ValueError(f'key_size={key_size} is not supported') + elif key_size == 128 and ('addr' in key_field or 'ip' in key_header): + return 'sai_ip_prefix_list_t', "ipprefixlist" + else: + raise ValueError(f'key_size={key_size} is not supported') def get_sai_range_list_type(key_size, key_header, key_field): if key_size <= 8: