Skip to content

Commit

Permalink
Update SAI pointer (sonic-net#414)
Browse files Browse the repository at this point in the history
* Update SAI pointer

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add support for BMToR API

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
  • Loading branch information
marian-pritsak authored and lguohan committed Jan 31, 2019
1 parent c0a948d commit 29f1e3c
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SAI
1 change: 1 addition & 0 deletions lib/inc/sai_redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ extern std::mutex g_apimutex;

extern const sai_acl_api_t redis_acl_api;
extern const sai_bfd_api_t redis_bfd_api;
extern const sai_bmtor_api_t redis_bmtor_api;
extern const sai_bridge_api_t redis_bridge_api;
extern const sai_buffer_api_t redis_buffer_api;
extern const sai_dtel_api_t redis_dtel_api;
Expand Down
1 change: 1 addition & 0 deletions lib/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ lib_LTLIBRARIES = libsairedis.la
libsairedis_la_SOURCES = \
sai_redis_acl.cpp \
sai_redis_bfd.cpp \
sai_redis_bmtor.cpp \
sai_redis_bridge.cpp \
sai_redis_buffer.cpp \
sai_redis_dtel.cpp \
Expand Down
98 changes: 98 additions & 0 deletions lib/src/sai_redis_bmtor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#include "sai_redis.h"

sai_status_t redis_get_table_bitmap_classification_entry_stats(
_In_ sai_object_id_t table_bitmap_classification_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_Out_ uint64_t *counters)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t redis_get_table_bitmap_classification_entry_stats_ext(
_In_ sai_object_id_t table_bitmap_classification_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
_Out_ uint64_t *counters)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t redis_clear_table_bitmap_classification_entry_stats(
_In_ sai_object_id_t table_bitmap_classification_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

REDIS_GENERIC_QUAD(TABLE_BITMAP_CLASSIFICATION_ENTRY,table_bitmap_classification_entry);

sai_status_t redis_get_table_bitmap_router_entry_stats(
_In_ sai_object_id_t table_bitmap_router_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_Out_ uint64_t *counters)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t redis_get_table_bitmap_router_entry_stats_ext(
_In_ sai_object_id_t table_bitmap_router_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids,
_In_ sai_stats_mode_t mode,
_Out_ uint64_t *counters)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

sai_status_t redis_clear_table_bitmap_router_entry_stats(
_In_ sai_object_id_t table_bitmap_router_entry_id,
_In_ uint32_t number_of_counters,
_In_ const sai_stat_id_t *counter_ids)
{
MUTEX();

SWSS_LOG_ENTER();

return SAI_STATUS_NOT_IMPLEMENTED;
}

REDIS_GENERIC_QUAD(TABLE_BITMAP_ROUTER_ENTRY,table_bitmap_router_entry);

const sai_bmtor_api_t redis_bmtor_api = {

REDIS_GENERIC_QUAD_API(table_bitmap_classification_entry)

redis_get_table_bitmap_classification_entry_stats,
redis_get_table_bitmap_classification_entry_stats_ext,
redis_clear_table_bitmap_classification_entry_stats,

REDIS_GENERIC_QUAD_API(table_bitmap_router_entry)

redis_get_table_bitmap_router_entry_stats,
redis_get_table_bitmap_router_entry_stats_ext,
redis_clear_table_bitmap_router_entry_stats,
};
1 change: 1 addition & 0 deletions lib/src/sai_redis_interfacequery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ sai_status_t sai_api_query(
{
API_CASE(ACL,acl);
API_CASE(BFD,bfd);
API_CASE(BMTOR,bmtor);
API_CASE(BRIDGE,bridge);
API_CASE(BUFFER,buffer);
API_CASE(DTEL,dtel);
Expand Down

0 comments on commit 29f1e3c

Please sign in to comment.