-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix serialize/deseralize functions in SAI meta (#1807)
This PR is fixing several issues we saw in serialize/deserialize: 1 Fix several not implemented deserialize functions. sai_deserialize_enum_list() sai_deserialize_attr_id() sai_deserialize_attribute() By doing this, the serialize/deserialize functions are complete. 2 Mark several attributes as aclfiled for SAI_OBJECT_TYPE_UDF_MATCH. The corresponding attribute values are in type of sai_acl_field_data_t. SAI_UDF_MATCH_ATTR_L2_TYPE ~ SAI_UDF_MATCH_ATTR_GRE_TYPE SAI_UDF_MATCH_ATTR_L4_DST_PORT_TYPE By doing this, serialize/deserialize for the above attributes works as expected. 3 Add sai_metadata_get_attr_metadata_by_attr_id_name_ext which can support the case of attribute id name is in deserialized buffer and terminated by characters listed in function sai_serialize_is_char_allowed(). By doing this, sai_deserialize_attr_id() and sai_deserialize_attribute() can get the attribute metadata by the deserialized buffer. 4 Return SAI_SERIALIZE_ERROR in case of the data type is not find for the attribute value. By doing this, the user can know that serialize/deserialize is failed and do proper response Signed-off-by: Juntao Gao <[email protected]>
- Loading branch information
Showing
7 changed files
with
447 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.