From a17e54e753fc7406c0233923f8d76e8bdb869cb6 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Tue, 23 Apr 2019 12:05:42 -0700 Subject: [PATCH] [SAI]: Move SAI pointer to v1.4 (#447) - Remove uburst - Update tam Signed-off-by: Shu0T1an ChenG --- SAI | 2 +- lib/inc/sai_redis.h | 1 - lib/src/Makefile.am | 1 - lib/src/sai_redis_interfacequery.cpp | 1 - lib/src/sai_redis_tam.cpp | 40 +++++++++++++--------------- lib/src/sai_redis_uburst.cpp | 13 --------- vslib/inc/sai_vs.h | 1 - vslib/src/Makefile.am | 1 - vslib/src/sai_vs_interfacequery.cpp | 1 - vslib/src/sai_vs_tam.cpp | 39 +++++++++++++-------------- vslib/src/sai_vs_uburst.cpp | 13 --------- 11 files changed, 37 insertions(+), 76 deletions(-) delete mode 100644 lib/src/sai_redis_uburst.cpp delete mode 100644 vslib/src/sai_vs_uburst.cpp diff --git a/SAI b/SAI index 1d42f1218ad5..bf47bbf003ca 160000 --- a/SAI +++ b/SAI @@ -1 +1 @@ -Subproject commit 1d42f1218ad537e37fac84aadb7f6232472bdd58 +Subproject commit bf47bbf003cadcfca9bc70b17dc3f818df266100 diff --git a/lib/inc/sai_redis.h b/lib/inc/sai_redis.h index 10282c12eef6..678887c12e8d 100644 --- a/lib/inc/sai_redis.h +++ b/lib/inc/sai_redis.h @@ -104,7 +104,6 @@ extern const sai_stp_api_t redis_stp_api; extern const sai_switch_api_t redis_switch_api; extern const sai_tam_api_t redis_tam_api; extern const sai_tunnel_api_t redis_tunnel_api; -extern const sai_uburst_api_t redis_uburst_api; extern const sai_udf_api_t redis_udf_api; extern const sai_virtual_router_api_t redis_virtual_router_api; extern const sai_vlan_api_t redis_vlan_api; diff --git a/lib/src/Makefile.am b/lib/src/Makefile.am index 8d1f4d69585e..da695a12b8c1 100644 --- a/lib/src/Makefile.am +++ b/lib/src/Makefile.am @@ -45,7 +45,6 @@ libsairedis_la_SOURCES = \ sai_redis_switch.cpp \ sai_redis_tam.cpp \ sai_redis_tunnel.cpp \ - sai_redis_uburst.cpp \ sai_redis_udf.cpp \ sai_redis_virtual_router.cpp \ sai_redis_vlan.cpp \ diff --git a/lib/src/sai_redis_interfacequery.cpp b/lib/src/sai_redis_interfacequery.cpp index a8b4eb67bbf2..a42380b0a038 100644 --- a/lib/src/sai_redis_interfacequery.cpp +++ b/lib/src/sai_redis_interfacequery.cpp @@ -247,7 +247,6 @@ sai_status_t sai_api_query( API_CASE(SWITCH,switch); API_CASE(TAM,tam); API_CASE(TUNNEL,tunnel); - API_CASE(UBURST,uburst); API_CASE(UDF,udf); API_CASE(VIRTUAL_ROUTER,virtual_router); API_CASE(VLAN,vlan); diff --git a/lib/src/sai_redis_tam.cpp b/lib/src/sai_redis_tam.cpp index 685e6b3224aa..65521d0be22f 100644 --- a/lib/src/sai_redis_tam.cpp +++ b/lib/src/sai_redis_tam.cpp @@ -1,31 +1,27 @@ #include "sai_redis.h" #include "sai_redis_internal.h" -sai_status_t redis_get_tam_snapshot_stats( - _In_ sai_object_id_t tam_snapshot_id, - _Inout_ uint32_t *number_of_counters, - _Inout_ sai_tam_statistic_t *statistics) -{ - MUTEX(); - SWSS_LOG_ENTER(); - - return SAI_STATUS_NOT_IMPLEMENTED; -} - REDIS_GENERIC_QUAD(TAM,tam); -REDIS_GENERIC_QUAD(TAM_STAT,tam_stat); -REDIS_GENERIC_QUAD(TAM_THRESHOLD,tam_threshold); -REDIS_GENERIC_QUAD(TAM_SNAPSHOT,tam_snapshot); -REDIS_GENERIC_QUAD(TAM_TRANSPORTER,tam_transporter); +REDIS_GENERIC_QUAD(TAM_MATH_FUNC,tam_math_func); +REDIS_GENERIC_QUAD(TAM_REPORT,tam_report); +REDIS_GENERIC_QUAD(TAM_EVENT_THRESHOLD,tam_event_threshold); +REDIS_GENERIC_QUAD(TAM_TEL_TYPE,tam_tel_type); +REDIS_GENERIC_QUAD(TAM_TRANSPORT,tam_transport); +REDIS_GENERIC_QUAD(TAM_TELEMETRY,tam_telemetry); +REDIS_GENERIC_QUAD(TAM_COLLECTOR,tam_collector); +REDIS_GENERIC_QUAD(TAM_EVENT_ACTION,tam_event_action); +REDIS_GENERIC_QUAD(TAM_EVENT,tam_event); const sai_tam_api_t redis_tam_api = { REDIS_GENERIC_QUAD_API(tam) - REDIS_GENERIC_QUAD_API(tam_stat) - REDIS_GENERIC_QUAD_API(tam_threshold) - REDIS_GENERIC_QUAD_API(tam_snapshot) - - redis_get_tam_snapshot_stats, - - REDIS_GENERIC_QUAD_API(tam_transporter) + REDIS_GENERIC_QUAD_API(tam_math_func) + REDIS_GENERIC_QUAD_API(tam_report) + REDIS_GENERIC_QUAD_API(tam_event_threshold) + REDIS_GENERIC_QUAD_API(tam_tel_type) + REDIS_GENERIC_QUAD_API(tam_transport) + REDIS_GENERIC_QUAD_API(tam_telemetry) + REDIS_GENERIC_QUAD_API(tam_collector) + REDIS_GENERIC_QUAD_API(tam_event_action) + REDIS_GENERIC_QUAD_API(tam_event) }; diff --git a/lib/src/sai_redis_uburst.cpp b/lib/src/sai_redis_uburst.cpp deleted file mode 100644 index 580a63cd99cc..000000000000 --- a/lib/src/sai_redis_uburst.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "sai_redis.h" -#include "sai_redis_internal.h" - -REDIS_GENERIC_QUAD(TAM_MICROBURST,tam_microburst); -REDIS_GENERIC_STATS(TAM_MICROBURST,tam_microburst); -REDIS_GENERIC_QUAD(TAM_HISTOGRAM,tam_histogram); - -const sai_uburst_api_t redis_uburst_api = { - - REDIS_GENERIC_QUAD_API(tam_microburst) - REDIS_GENERIC_STATS_API(tam_microburst) - REDIS_GENERIC_QUAD_API(tam_histogram) -}; diff --git a/vslib/inc/sai_vs.h b/vslib/inc/sai_vs.h index 8708e8c02114..ef9578822626 100644 --- a/vslib/inc/sai_vs.h +++ b/vslib/inc/sai_vs.h @@ -141,7 +141,6 @@ extern const sai_stp_api_t vs_stp_api; extern const sai_switch_api_t vs_switch_api; extern const sai_tam_api_t vs_tam_api; extern const sai_tunnel_api_t vs_tunnel_api; -extern const sai_uburst_api_t vs_uburst_api; extern const sai_udf_api_t vs_udf_api; extern const sai_virtual_router_api_t vs_virtual_router_api; extern const sai_vlan_api_t vs_vlan_api; diff --git a/vslib/src/Makefile.am b/vslib/src/Makefile.am index 51ad72d86a1b..f2a14d85ab82 100644 --- a/vslib/src/Makefile.am +++ b/vslib/src/Makefile.am @@ -45,7 +45,6 @@ libsaivs_la_SOURCES = \ sai_vs_switch.cpp \ sai_vs_tam.cpp \ sai_vs_tunnel.cpp \ - sai_vs_uburst.cpp \ sai_vs_udf.cpp \ sai_vs_virtual_router.cpp \ sai_vs_vlan.cpp \ diff --git a/vslib/src/sai_vs_interfacequery.cpp b/vslib/src/sai_vs_interfacequery.cpp index b57cca0bb8be..41f47220c0c3 100644 --- a/vslib/src/sai_vs_interfacequery.cpp +++ b/vslib/src/sai_vs_interfacequery.cpp @@ -910,7 +910,6 @@ sai_status_t sai_api_query( API_CASE(SWITCH,switch); API_CASE(TAM,tam); API_CASE(TUNNEL,tunnel); - API_CASE(UBURST,uburst); API_CASE(UDF,udf); API_CASE(VIRTUAL_ROUTER,virtual_router); API_CASE(VLAN,vlan); diff --git a/vslib/src/sai_vs_tam.cpp b/vslib/src/sai_vs_tam.cpp index 311fc5e1a216..91e115185ef9 100644 --- a/vslib/src/sai_vs_tam.cpp +++ b/vslib/src/sai_vs_tam.cpp @@ -1,31 +1,28 @@ #include "sai_vs.h" #include "sai_vs_internal.h" -sai_status_t vs_get_tam_snapshot_stats( - _In_ sai_object_id_t tam_snapshot_id, - _Inout_ uint32_t *number_of_counters, - _Inout_ sai_tam_statistic_t *statistics) -{ - MUTEX(); - SWSS_LOG_ENTER(); - - return SAI_STATUS_NOT_IMPLEMENTED; -} - VS_GENERIC_QUAD(TAM,tam); -VS_GENERIC_QUAD(TAM_STAT,tam_stat); -VS_GENERIC_QUAD(TAM_THRESHOLD,tam_threshold); -VS_GENERIC_QUAD(TAM_SNAPSHOT,tam_snapshot); -VS_GENERIC_QUAD(TAM_TRANSPORTER,tam_transporter); +VS_GENERIC_QUAD(TAM_MATH_FUNC,tam_math_func); +VS_GENERIC_QUAD(TAM_REPORT,tam_report); +VS_GENERIC_QUAD(TAM_EVENT_THRESHOLD,tam_event_threshold); +VS_GENERIC_QUAD(TAM_TEL_TYPE,tam_tel_type); +VS_GENERIC_QUAD(TAM_TRANSPORT,tam_transport); +VS_GENERIC_QUAD(TAM_TELEMETRY,tam_telemetry); +VS_GENERIC_QUAD(TAM_COLLECTOR,tam_collector); +VS_GENERIC_QUAD(TAM_EVENT_ACTION,tam_event_action); +VS_GENERIC_QUAD(TAM_EVENT,tam_event); const sai_tam_api_t vs_tam_api = { VS_GENERIC_QUAD_API(tam) - VS_GENERIC_QUAD_API(tam_stat) - VS_GENERIC_QUAD_API(tam_threshold) - VS_GENERIC_QUAD_API(tam_snapshot) - - vs_get_tam_snapshot_stats, + VS_GENERIC_QUAD_API(tam_math_func) + VS_GENERIC_QUAD_API(tam_report) + VS_GENERIC_QUAD_API(tam_event_threshold) + VS_GENERIC_QUAD_API(tam_tel_type) + VS_GENERIC_QUAD_API(tam_transport) + VS_GENERIC_QUAD_API(tam_telemetry) + VS_GENERIC_QUAD_API(tam_collector) + VS_GENERIC_QUAD_API(tam_event_action) + VS_GENERIC_QUAD_API(tam_event) - VS_GENERIC_QUAD_API(tam_transporter) }; diff --git a/vslib/src/sai_vs_uburst.cpp b/vslib/src/sai_vs_uburst.cpp deleted file mode 100644 index 3c70634e336d..000000000000 --- a/vslib/src/sai_vs_uburst.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "sai_vs.h" -#include "sai_vs_internal.h" - -VS_GENERIC_QUAD(TAM_MICROBURST,tam_microburst); -VS_GENERIC_STATS(TAM_MICROBURST,tam_microburst); -VS_GENERIC_QUAD(TAM_HISTOGRAM,tam_histogram); - -const sai_uburst_api_t vs_uburst_api = { - - VS_GENERIC_QUAD_API(tam_microburst) - VS_GENERIC_STATS_API(tam_microburst) - VS_GENERIC_QUAD_API(tam_histogram) -};