Skip to content

Commit

Permalink
Add mapping for SAI_ACL_TABLE_ATTR and SAI_ACL_ENTRY_ATTR (sonic-net#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-shirshov authored and Shuotian Cheng committed Oct 21, 2016
1 parent bec9d7c commit e2da47c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions common/saiserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,25 @@ sai_serialization_map_t sai_get_serialization_map()
map[SAI_OBJECT_TYPE_BUFFER_PROFILE][SAI_BUFFER_PROFILE_ATTR_XOFF_TH] = SAI_SERIALIZATION_TYPE_UINT32;
map[SAI_OBJECT_TYPE_BUFFER_PROFILE][SAI_BUFFER_PROFILE_ATTR_XON_TH] = SAI_SERIALIZATION_TYPE_UINT32;

map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_STAGE] = SAI_SERIALIZATION_TYPE_INT32;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_PRIORITY] = SAI_SERIALIZATION_TYPE_UINT32;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_OUT_PORT] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_DST_MAC] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_SRC_IP] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_DST_IP] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_IP_PROTOCOL] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_L4_SRC_PORT] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_L4_DST_PORT] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_ECN] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_DSCP] = SAI_SERIALIZATION_TYPE_BOOL;
map[SAI_OBJECT_TYPE_ACL_TABLE][SAI_ACL_TABLE_ATTR_FIELD_RANGE] = SAI_SERIALIZATION_TYPE_BOOL;

map[SAI_OBJECT_TYPE_ACL_ENTRY][SAI_ACL_ENTRY_ATTR_TABLE_ID] = SAI_SERIALIZATION_TYPE_OBJECT_ID;
map[SAI_OBJECT_TYPE_ACL_ENTRY][SAI_ACL_ENTRY_ATTR_PRIORITY] = SAI_SERIALIZATION_TYPE_UINT32;
map[SAI_OBJECT_TYPE_ACL_ENTRY][SAI_ACL_TABLE_ATTR_FIELD_ECN] = SAI_SERIALIZATION_TYPE_ACL_FIELD_DATA_UINT8;
map[SAI_OBJECT_TYPE_ACL_ENTRY][SAI_ACL_TABLE_ATTR_FIELD_DSCP] = SAI_SERIALIZATION_TYPE_ACL_FIELD_DATA_UINT8;
map[SAI_OBJECT_TYPE_ACL_ENTRY][SAI_ACL_ENTRY_ATTR_ACTION_SET_COLOR] = SAI_SERIALIZATION_TYPE_ACL_ACTION_DATA_INT32;

map[SAI_OBJECT_TYPE_QOS_MAPS][SAI_QOS_MAP_ATTR_TYPE] = SAI_SERIALIZATION_TYPE_INT32;
map[SAI_OBJECT_TYPE_QOS_MAPS][SAI_QOS_MAP_ATTR_MAP_TO_VALUE_LIST] = SAI_SERIALIZATION_TYPE_QOS_MAP_LIST;
Expand Down

0 comments on commit e2da47c

Please sign in to comment.