Skip to content

Commit

Permalink
Enable mirror API (sonic-net#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrivantsiv authored and lguohan committed Dec 5, 2016
1 parent e90bf4f commit a7b6945
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta/sai_meta_mirror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const sai_attr_metadata_t sai_mirror_attr_metadata[] = {
// TODO extra logic will be required to check if vlan exists
},

/*{
{
.objecttype = SAI_OBJECT_TYPE_MIRROR,
.attrid = SAI_MIRROR_SESSION_ATTR_VLAN_CFI,
.attridname = "SAI_MIRROR_SESSION_ATTR_VLAN_CFI",
Expand All @@ -196,7 +196,7 @@ const sai_attr_metadata_t sai_mirror_attr_metadata[] = {
COND_ENUM ( SAI_MIRROR_SESSION_ATTR_TYPE, SAI_MIRROR_TYPE_ENHANCED_REMOTE ),
COND_ENUM ( SAI_MIRROR_SESSION_ATTR_TYPE, SAI_MIRROR_TYPE_REMOTE),
},
},*/
},

// TODO valid only for ERSPAN

Expand Down
4 changes: 4 additions & 0 deletions syncd/syncd_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void initialize_common_api_pointers()
common_create[SAI_OBJECT_TYPE_ACL_ENTRY] = (sai_acl_api) ? sai_acl_api->create_acl_entry : NULL;
common_create[SAI_OBJECT_TYPE_ACL_COUNTER] = (sai_acl_api) ? sai_acl_api->create_acl_counter : NULL;
common_create[SAI_OBJECT_TYPE_HOST_INTERFACE] = (sai_hostif_api) ? sai_hostif_api->create_hostif : NULL;
common_create[SAI_OBJECT_TYPE_MIRROR] = (sai_mirror_api) ? sai_mirror_api->create_mirror_session : NULL;
common_create[SAI_OBJECT_TYPE_TRAP_GROUP] = (sai_hostif_api) ? sai_hostif_api->create_hostif_trap_group : NULL;
common_create[SAI_OBJECT_TYPE_ACL_TABLE_GROUP] = NULL;
common_create[SAI_OBJECT_TYPE_POLICER] = (sai_policer_api) ? sai_policer_api->create_policer : NULL;
Expand Down Expand Up @@ -81,6 +82,7 @@ void initialize_common_api_pointers()
common_remove[SAI_OBJECT_TYPE_ACL_ENTRY] = (sai_acl_api) ? sai_acl_api->delete_acl_entry : NULL;
common_remove[SAI_OBJECT_TYPE_ACL_COUNTER] = (sai_acl_api) ? sai_acl_api->delete_acl_counter : NULL;
common_remove[SAI_OBJECT_TYPE_HOST_INTERFACE] = (sai_hostif_api) ? sai_hostif_api->remove_hostif : NULL;
common_remove[SAI_OBJECT_TYPE_MIRROR] = (sai_mirror_api) ? sai_mirror_api->remove_mirror_session : NULL;
common_remove[SAI_OBJECT_TYPE_TRAP_GROUP] = (sai_hostif_api) ? sai_hostif_api->remove_hostif_trap_group : NULL;
common_remove[SAI_OBJECT_TYPE_ACL_TABLE_GROUP] = NULL;
common_remove[SAI_OBJECT_TYPE_POLICER] = (sai_policer_api) ? sai_policer_api->remove_policer : NULL;
Expand Down Expand Up @@ -115,6 +117,7 @@ void initialize_common_api_pointers()
common_set_attribute[SAI_OBJECT_TYPE_ACL_ENTRY] = (sai_acl_api) ? sai_acl_api->set_acl_entry_attribute : NULL;
common_set_attribute[SAI_OBJECT_TYPE_ACL_COUNTER] = (sai_acl_api) ? sai_acl_api->set_acl_counter_attribute : NULL;
common_set_attribute[SAI_OBJECT_TYPE_HOST_INTERFACE] = (sai_hostif_api) ? sai_hostif_api->set_hostif_attribute : NULL;
common_set_attribute[SAI_OBJECT_TYPE_MIRROR] = (sai_mirror_api) ? sai_mirror_api->set_mirror_session_attribute : NULL;
common_set_attribute[SAI_OBJECT_TYPE_TRAP_GROUP] = (sai_hostif_api) ? sai_hostif_api->set_trap_group_attribute : NULL;
common_set_attribute[SAI_OBJECT_TYPE_ACL_TABLE_GROUP] = NULL;
common_set_attribute[SAI_OBJECT_TYPE_POLICER] = (sai_policer_api) ? sai_policer_api->set_policer_attribute : NULL;
Expand Down Expand Up @@ -149,6 +152,7 @@ void initialize_common_api_pointers()
common_get_attribute[SAI_OBJECT_TYPE_ACL_ENTRY] = (sai_acl_api) ? sai_acl_api->get_acl_entry_attribute : NULL;
common_get_attribute[SAI_OBJECT_TYPE_ACL_COUNTER] = (sai_acl_api) ? sai_acl_api->get_acl_counter_attribute : NULL;
common_get_attribute[SAI_OBJECT_TYPE_HOST_INTERFACE] = (sai_hostif_api) ? sai_hostif_api->get_hostif_attribute : NULL;
common_get_attribute[SAI_OBJECT_TYPE_MIRROR] = (sai_mirror_api) ? sai_mirror_api->get_mirror_session_attribute : NULL;
common_get_attribute[SAI_OBJECT_TYPE_TRAP_GROUP] = (sai_hostif_api) ? sai_hostif_api->get_trap_group_attribute : NULL;
common_get_attribute[SAI_OBJECT_TYPE_ACL_TABLE_GROUP] = NULL;
common_get_attribute[SAI_OBJECT_TYPE_POLICER] = (sai_policer_api) ? sai_policer_api->get_policer_attribute : NULL;
Expand Down

0 comments on commit a7b6945

Please sign in to comment.