From 9c29623017654abfb5da9296a6ab4b403c798ecf Mon Sep 17 00:00:00 2001 From: Itai Baz Date: Mon, 27 Feb 2023 16:27:20 -0800 Subject: [PATCH 1/3] Add sai_query_attribute_enum_values_capability_ext Signed-off-by: Itai Baz --- inc/saiobject.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/inc/saiobject.h b/inc/saiobject.h index 8ee253aac..d1309e3c6 100644 --- a/inc/saiobject.h +++ b/inc/saiobject.h @@ -271,6 +271,28 @@ sai_status_t sai_query_attribute_enum_values_capability( _In_ sai_attr_id_t attr_id, _Inout_ sai_s32_list_t *enum_values_capability); +/** + * @brief Query an enum attribute (enum or enum list) list of implemented enum values given additional input attribute values + * + * Used to query capabilities in case the queried attribute capability is dependent on other attribute values + * + * @param[in] switch_id SAI Switch object id + * @param[in] object_type SAI object type + * @param[in] attr_id SAI attribute ID + * @param[in] additional_attr_count Number of additional attribute values + * @param[in] additional_attr_list List of attribute values + * @param[inout] enum_values_capability List of implemented enum values + * + * @return #SAI_STATUS_SUCCESS on success, #SAI_STATUS_BUFFER_OVERFLOW if list size insufficient, failure status code on error + */ +sai_status_t sai_query_attribute_enum_values_capability_ext( + _In_ sai_object_id_t switch_id, + _In_ sai_object_type_t object_type, + _In_ sai_attr_id_t attr_id, + _In_ uint32_t additional_attr_count, + _In_ const sai_attribute_t* additional_attr_list, + _Inout_ sai_s32_list_t* enum_values_capability); + /** * @brief Query statistics capability for statistics bound at object level * From 63ee766c7bddf2346e9438e54c6dea524c4bdc6f Mon Sep 17 00:00:00 2001 From: Itai Baz Date: Mon, 27 Feb 2023 16:48:18 -0800 Subject: [PATCH 2/3] fix spaces Signed-off-by: Itai Baz --- inc/saiobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/saiobject.h b/inc/saiobject.h index d1309e3c6..6fe673ff4 100644 --- a/inc/saiobject.h +++ b/inc/saiobject.h @@ -290,8 +290,8 @@ sai_status_t sai_query_attribute_enum_values_capability_ext( _In_ sai_object_type_t object_type, _In_ sai_attr_id_t attr_id, _In_ uint32_t additional_attr_count, - _In_ const sai_attribute_t* additional_attr_list, - _Inout_ sai_s32_list_t* enum_values_capability); + _In_ const sai_attribute_t *additional_attr_list, + _Inout_ sai_s32_list_t *enum_values_capability); /** * @brief Query statistics capability for statistics bound at object level From 6eaf7daf863b44e768d97da3390ea0c7367fc5e9 Mon Sep 17 00:00:00 2001 From: Itai Baz Date: Mon, 27 Feb 2023 18:07:58 -0800 Subject: [PATCH 3/3] fix style check Signed-off-by: Itai Baz --- meta/style.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/style.pm b/meta/style.pm index c97752b4f..665d4297a 100644 --- a/meta/style.pm +++ b/meta/style.pm @@ -950,7 +950,7 @@ sub CheckHeadersStyle { my $param = $1; - my $pattern = '^(attr_count|object_count|number_of_counters|count|u32|device_addr|start_reg_addr|number_of_registers|reg_val)$'; + my $pattern = '^(attr_count|object_count|number_of_counters|count|u32|device_addr|start_reg_addr|number_of_registers|reg_val|additional_attr_count)$'; if (not $param =~ /$pattern/) {