Skip to content

Commit

Permalink
[submodule update] SAI submodule update (#1023)
Browse files Browse the repository at this point in the history
* SAI submodule update

- d0f3333 Tunnel Scoped TC MAP and Remarking (#1413) (#1451)
- 62364a3 Add two more API as RPC for warmboot testing (#1421) (#1437)
- 426fad1 Make saithriftv compatible with thrift 0.14.1 (#1433)

Signed-off-by: bingwang <bingwang@microsoft.com>
  • Loading branch information
bingwang-ms authored Mar 31, 2022
1 parent e3af0df commit 473c990
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/sai_redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,15 @@ PRIVATE extern std::shared_ptr<sairedis::SaiInterface> redis_sai;
redis_bulk_remove_ ## ot, \
redis_bulk_set_ ## ot, \
redis_bulk_get_ ## ot,

// BULK get/set DECLARE

#define REDIS_BULK_GET_SET(OT,ot) \
REDIS_BULK_GET(OT,ot); \
REDIS_BULK_SET(OT,ot);

// BULK get/set API

#define REDIS_BULK_GET_SET_API(ot) \
redis_bulk_get_ ## ot, \
redis_bulk_set_ ## ot,
2 changes: 2 additions & 0 deletions lib/sai_redis_tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ REDIS_GENERIC_QUAD(TUNNEL,tunnel);
REDIS_GENERIC_QUAD(TUNNEL_TERM_TABLE_ENTRY,tunnel_term_table_entry);
REDIS_GENERIC_QUAD(TUNNEL_MAP_ENTRY,tunnel_map_entry);
REDIS_GENERIC_STATS(TUNNEL,tunnel);
REDIS_BULK_GET_SET(TUNNEL,tunnels);

const sai_tunnel_api_t redis_tunnel_api = {

Expand All @@ -13,4 +14,5 @@ const sai_tunnel_api_t redis_tunnel_api = {
REDIS_GENERIC_STATS_API(tunnel)
REDIS_GENERIC_QUAD_API(tunnel_term_table_entry)
REDIS_GENERIC_QUAD_API(tunnel_map_entry)
REDIS_BULK_GET_SET_API(tunnels)
};
7 changes: 7 additions & 0 deletions unittest/lib/test_sai_redis_tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ TEST(libsairedis, tunnel)
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tunnel_map_entry(0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tunnel_map_entry_attribute(0,0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tunnel_map_entry_attribute(0,0,0));

uint32_t attr_count = 0;
sai_status_t status = 0;
sai_attribute_t *p_attr = nullptr;
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tunnels_attribute(0,&id,&attr_count,&p_attr,SAI_BULK_OP_ERROR_MODE_IGNORE_ERROR,&status));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tunnels_attribute(0,&id,0,SAI_BULK_OP_ERROR_MODE_IGNORE_ERROR,&status));
}

7 changes: 7 additions & 0 deletions unittest/vslib/test_sai_vs_tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ TEST(libsaivs, tunnel)
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_tunnel_map_entry(0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tunnel_map_entry_attribute(0,0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tunnel_map_entry_attribute(0,0,0));

uint32_t attr_count = 0;
sai_status_t status = 0;
sai_attribute_t *p_attr = nullptr;
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_tunnels_attribute(0,&id,&attr_count,&p_attr,SAI_BULK_OP_ERROR_MODE_IGNORE_ERROR,&status));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_tunnels_attribute(0,&id,0,SAI_BULK_OP_ERROR_MODE_IGNORE_ERROR,&status));
}

11 changes: 11 additions & 0 deletions vslib/sai_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,14 @@ PRIVATE extern std::shared_ptr<sairedis::SaiInterface> vs_sai;
vs_bulk_set_ ## ot, \
vs_bulk_get_ ## ot,

// BULK get/set DECLARE for vs

#define VS_BULK_GET_SET(OT,ot) \
VS_BULK_GET(OT,ot); \
VS_BULK_SET(OT,ot);

// BULK get/set API for vs

#define VS_BULK_GET_SET_API(ot) \
vs_bulk_get_ ## ot, \
vs_bulk_set_ ## ot,
2 changes: 2 additions & 0 deletions vslib/sai_vs_tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ VS_GENERIC_QUAD(TUNNEL,tunnel);
VS_GENERIC_QUAD(TUNNEL_TERM_TABLE_ENTRY,tunnel_term_table_entry);
VS_GENERIC_QUAD(TUNNEL_MAP_ENTRY,tunnel_map_entry);
VS_GENERIC_STATS(TUNNEL,tunnel);
VS_BULK_GET_SET(TUNNEL,tunnels);

const sai_tunnel_api_t vs_tunnel_api = {

Expand All @@ -13,4 +14,5 @@ const sai_tunnel_api_t vs_tunnel_api = {
VS_GENERIC_STATS_API(tunnel)
VS_GENERIC_QUAD_API(tunnel_term_table_entry)
VS_GENERIC_QUAD_API(tunnel_map_entry)
VS_BULK_GET_SET_API(tunnels)
};

0 comments on commit 473c990

Please sign in to comment.