diff --git a/SAI b/SAI index 96143eef4..c7a49cce5 160000 --- a/SAI +++ b/SAI @@ -1 +1 @@ -Subproject commit 96143eef4a662b720038a10e68d7d702370dc20a +Subproject commit c7a49cce5646bd6793e36b4cc3418dac4ae81ac9 diff --git a/lib/sai_redis_tam.cpp b/lib/sai_redis_tam.cpp index aa21ced94..9698af33d 100644 --- a/lib/sai_redis_tam.cpp +++ b/lib/sai_redis_tam.cpp @@ -23,6 +23,7 @@ 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); +REDIS_GENERIC_QUAD(TAM_COUNTER_SUBSCRIPTION,tam_counter_subscription); const sai_tam_api_t redis_tam_api = { @@ -37,4 +38,5 @@ const sai_tam_api_t redis_tam_api = { REDIS_GENERIC_QUAD_API(tam_collector) REDIS_GENERIC_QUAD_API(tam_event_action) REDIS_GENERIC_QUAD_API(tam_event) + REDIS_GENERIC_QUAD_API(tam_counter_subscription) }; diff --git a/syncd/ServiceMethodTable.cpp b/syncd/ServiceMethodTable.cpp index 38fb9b7c2..f954bbce2 100644 --- a/syncd/ServiceMethodTable.cpp +++ b/syncd/ServiceMethodTable.cpp @@ -2,6 +2,7 @@ #include "swss/logger.h" +#include #include using namespace syncd; diff --git a/syncd/SwitchNotifications.cpp b/syncd/SwitchNotifications.cpp index 1c470a989..5aa120364 100644 --- a/syncd/SwitchNotifications.cpp +++ b/syncd/SwitchNotifications.cpp @@ -1,6 +1,7 @@ #include "SwitchNotifications.h" #include "swss/logger.h" +#include using namespace syncd; diff --git a/unittest/lib/test_sai_redis_tam.cpp b/unittest/lib/test_sai_redis_tam.cpp index 8a8b974bb..f7899b053 100644 --- a/unittest/lib/test_sai_redis_tam.cpp +++ b/unittest/lib/test_sai_redis_tam.cpp @@ -70,6 +70,11 @@ TEST(libsairedis, tam) EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tam_event(0)); EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tam_event_attribute(0,0)); EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tam_event_attribute(0,0,0)); + + EXPECT_NE(SAI_STATUS_SUCCESS, api->create_tam_counter_subscription(&id,0,0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tam_counter_subscription(0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tam_counter_subscription_attribute(0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tam_counter_subscription_attribute(0,0,0)); } TEST(libsairedis, sai_tam_telemetry_get_data) diff --git a/unittest/vslib/test_sai_vs_tam.cpp b/unittest/vslib/test_sai_vs_tam.cpp index b67b068b9..f879977f7 100644 --- a/unittest/vslib/test_sai_vs_tam.cpp +++ b/unittest/vslib/test_sai_vs_tam.cpp @@ -70,6 +70,11 @@ TEST(libsaivs, tam) EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tam_event(0)); EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tam_event_attribute(0,0)); EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tam_event_attribute(0,0,0)); + + EXPECT_NE(SAI_STATUS_SUCCESS, api->create_tam_counter_subscription(&id,0,0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tam_counter_subscription(0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tam_counter_subscription_attribute(0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tam_counter_subscription_attribute(0,0,0)); } TEST(libsairedis, sai_tam_telemetry_get_data) diff --git a/vslib/sai_vs_tam.cpp b/vslib/sai_vs_tam.cpp index 3376cda91..a1abba1ff 100644 --- a/vslib/sai_vs_tam.cpp +++ b/vslib/sai_vs_tam.cpp @@ -23,6 +23,7 @@ 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); +VS_GENERIC_QUAD(TAM_COUNTER_SUBSCRIPTION,tam_counter_subscription); const sai_tam_api_t vs_tam_api = { @@ -37,5 +38,6 @@ const sai_tam_api_t vs_tam_api = { VS_GENERIC_QUAD_API(tam_collector) VS_GENERIC_QUAD_API(tam_event_action) VS_GENERIC_QUAD_API(tam_event) + VS_GENERIC_QUAD_API(tam_counter_subscription) };