Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataplane telemetry support in SONiC #328

Merged
merged 67 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
aa5bf64
initial barefoot checkin october 2017
Nov 3, 2017
c48a7a2
Merge branch 'master' of https://github.com/Azure/sonic-sairedis into…
Nov 3, 2017
29ab3de
Revert "Merge branch 'master' of https://github.com/Azure/sonic-saire…
Nov 3, 2017
e0366e0
missed integration diffs
Nov 4, 2017
30c8f89
Merge remote-tracking branch 'azure/master' into bf-master
Nov 13, 2017
67d998b
Merge remote-tracking branch 'azure/master' into bf-master
Nov 18, 2017
17ef711
Merge remote-tracking branch 'azure/master' into bf-master
Nov 21, 2017
1b39bc2
Added new attr type support to sairedis. Also, some fixes for compila…
Nov 28, 2017
0204303
Merge branch 'rel_6_0' into rel_6_0_telemetry
Nov 28, 2017
23a5d39
Changes to add new DTel api support in sairedis
Nov 29, 2017
8138854
Add new file to generate Dtel specific SAI stub API
Dec 7, 2017
be10c3f
Missed adding a file in the last commit
Dec 7, 2017
77a33ca
Merge pull request #1 from barefootnetworks/rel_6_0_telemetry
shruthi9 Dec 7, 2017
ce80282
Merge remote-tracking branch 'azure/master' into bf-master
Dec 11, 2017
b31892b
Fix ref point for SAI
Dec 15, 2017
1c1d862
Updated SAI repo to point to dtel_exp
Dec 21, 2017
488287d
Changes to handle new additions to DTel experimental SAI. Not compile…
Dec 22, 2017
05048cf
handle platform specific lins in different directory (@runtime)
Jan 5, 2018
450ed3b
force order of library path to look for platform dir before lib dir
Jan 5, 2018
eb81f24
Merge branch 'telemetry_cfgdb' into rel_7_0_telemetry
Jan 10, 2018
5c3c19d
Merge branch 'telemetry_exp_sai' into rel_7_0_telemetry
Jan 10, 2018
c97ca98
Change SAI branch refpoint
Jan 10, 2018
f32489b
Update SAI submodule refpoint
Jan 11, 2018
2da73f8
enable fast-boot for barefoot platforms
Jan 11, 2018
2467bc6
Update ref point for SAI
Jan 16, 2018
679f7ee
Merge branch 'rel_7_0' into rel_7_0_telemetry
Jan 17, 2018
216f745
SONiC changes due to DTel experimental SAI changes
Jan 4, 2018
d6b0ca3
allow Makefile to build for other platforms - restore it original for…
Jan 18, 2018
909a50e
Merge branch 'rel_7_0' into rel_7_0_telemetry
Jan 19, 2018
adfdb86
allow clean build
Jan 19, 2018
b995cd1
Merge branch 'rel_7_0' into rel_7_0_telemetry
Jan 21, 2018
043ac32
Revert "allow clean build"
Jan 22, 2018
8d6d487
Revert "allow Makefile to build for other platforms - restore it orig…
Jan 22, 2018
097422d
Merge branch 'rel_7_0' into rel_7_0_telemetry
Jan 22, 2018
b0c7c23
Merge branch 'rel_7_0_telemetry' of https://github.com/barefootnetwor…
Jan 22, 2018
fb55ef7
makefile cleanup towards upstream
Jan 23, 2018
bff6e2c
Merge branch '201712' into bf-master
Mar 14, 2018
c591e38
Support for platforms based on Barefoot Networks' device (#304)
Mar 14, 2018
226dc4d
search for exact string - newer onie versions match multiple lines
Apr 13, 2018
bac744c
Merge branch 'master' into sonicSaiv1.3
mkbalani May 14, 2018
b68ee14
Will need to revert this
mkbalani May 31, 2018
4b6df45
Merge branch 'bf-master' into sonicSaiv1.3
mkbalani Jun 1, 2018
0ad8951
Merge pull request #2 from barefootnetworks/sonicSaiv1.3
mkbalani Jun 1, 2018
986dad6
Merge remote-tracking branch 'origin/rel_7_0_telemetry' into dtel_mas…
Jun 1, 2018
39975ba
SONiC sairedis changes needed to work with SAIv1.3
Jun 5, 2018
158d5c8
Merge pull request #3 from barefootnetworks/dtel_master_merge
shruthi9 Jun 7, 2018
d1be87a
Fix SAI path in gitmodules and add a comment
Jun 8, 2018
e2c7d9b
Remove sai thrift build hack
mkbalani Jun 13, 2018
7418cb0
Merge pull request #4 from barefootnetworks/fixSaiHack
mkbalani Jun 13, 2018
6849eb3
enable fast-boot for barefoot platforms
Jan 11, 2018
1cf8724
enable fast-boot for barefoot platforms
Jan 11, 2018
8be553e
Add missing sai rpc hdr file path for bfn
mkbalani Jun 22, 2018
8f44c34
Merge branch 'bf-master' of https://github.com/barefootnetworks/sonic…
mkbalani Jun 22, 2018
4b98411
Update SAI ref points
Jun 26, 2018
73c9611
Multi p4 profile support for bfn sde (#5)
mkbalani Jul 6, 2018
3623488
Merge remote-tracking branch 'azure/master' into azure-merge
Jul 9, 2018
96adf56
Remove code duplicated in merge
mkbalani Jul 10, 2018
5de2c9a
Merge pull request #7 from barefootnetworks/azure-merge
shruthi9 Jul 10, 2018
c19b02a
Keep fn in same order as azure master (#8)
mkbalani Jul 10, 2018
befaed1
Address review comment
Jul 11, 2018
82760ff
Link just bfn sai lib and shorten linking command by removing other l…
mkbalani Jul 11, 2018
14902a5
Convert tabs to spaces
Jul 11, 2018
5d914e5
Fix alignment
mkbalani Jul 12, 2018
3c70742
Merge branch 'bf-master' of https://github.com/barefootnetworks/sonic…
mkbalani Jul 12, 2018
fc15c56
Address upstream comment
mkbalani Jul 12, 2018
14cbaef
Address review comments
Jul 12, 2018
7b11204
Merge branch 'bf-master' of github.com:barefootnetworks/sonic-sairedi…
Jul 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ AC_PROG_CXX
AC_PROG_LIBTOOL
AC_HEADER_STDC

AM_CONDITIONAL(sonic_asic_platform_barefoot, test x$CONFIGURED_PLATFORM = xbarefoot)

AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging],
[case "${enableval}" in
Expand Down
1 change: 1 addition & 0 deletions lib/inc/sai_redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ 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;
extern const sai_wred_api_t redis_wred_api;
extern const sai_dtel_api_t redis_dtel_api;

#define UNREFERENCED_PARAMETER(X)

Expand Down
1 change: 1 addition & 0 deletions lib/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ libsairedis_la_SOURCES = \
sai_redis_fdb.cpp \
sai_redis_hash.cpp \
sai_redis_hostintf.cpp \
sai_redis_dtel.cpp \
sai_redis_interfacequery.cpp \
sai_redis_lag.cpp \
sai_redis_mirror.cpp \
Expand Down
16 changes: 16 additions & 0 deletions lib/src/sai_redis_dtel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "sai_redis.h"

REDIS_GENERIC_QUAD(DTEL,dtel);
REDIS_GENERIC_QUAD(DTEL_QUEUE_REPORT,dtel_queue_report);
REDIS_GENERIC_QUAD(DTEL_INT_SESSION,dtel_int_session);
REDIS_GENERIC_QUAD(DTEL_REPORT_SESSION,dtel_report_session);
REDIS_GENERIC_QUAD(DTEL_EVENT,dtel_event);

const sai_dtel_api_t redis_dtel_api = {

REDIS_GENERIC_QUAD_API(dtel)
REDIS_GENERIC_QUAD_API(dtel_queue_report)
REDIS_GENERIC_QUAD_API(dtel_int_session)
REDIS_GENERIC_QUAD_API(dtel_report_session)
REDIS_GENERIC_QUAD_API(dtel_event)
};
1 change: 1 addition & 0 deletions lib/src/sai_redis_interfacequery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ sai_status_t sai_api_query(
API_CASE(VIRTUAL_ROUTER,virtual_router);
API_CASE(VLAN,vlan);
API_CASE(WRED,wred);
API_CASE(DTEL,dtel);

default:
SWSS_LOG_ERROR("Invalid API type %d", sai_api_id);
Expand Down
1 change: 0 additions & 1 deletion lib/src/sai_redis_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ sai_status_t redis_clear_port_pool_stats(
return SAI_STATUS_NOT_IMPLEMENTED;
}


REDIS_GENERIC_QUAD(PORT,port);
REDIS_GENERIC_QUAD(PORT_POOL,port_pool);

Expand Down
22 changes: 22 additions & 0 deletions meta/sai_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,7 @@ sai_status_t meta_generic_validation_create(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -1305,6 +1306,9 @@ sai_status_t meta_generic_validation_create(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
VALIDATION_LIST(md, value.aclresource);
break;
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
VALIDATION_LIST(md, value.ipaddrlist);
break;

case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:

Expand Down Expand Up @@ -1910,6 +1914,7 @@ sai_status_t meta_generic_validation_set(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -1983,6 +1988,9 @@ sai_status_t meta_generic_validation_set(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
VALIDATION_LIST(md, value.aclresource);
break;
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
VALIDATION_LIST(md, value.ipaddrlist);
break;

case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:

Expand Down Expand Up @@ -2308,6 +2316,7 @@ sai_status_t meta_generic_validation_get(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -2353,6 +2362,9 @@ sai_status_t meta_generic_validation_get(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
VALIDATION_LIST(md, value.aclresource);
break;
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
VALIDATION_LIST(md, value.ipaddrlist);
break;

case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_INT32_RANGE:
Expand Down Expand Up @@ -2647,6 +2659,7 @@ void meta_generic_validation_post_create(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -2682,6 +2695,7 @@ void meta_generic_validation_post_create(
case SAI_ATTR_VALUE_TYPE_UINT32_LIST:
case SAI_ATTR_VALUE_TYPE_INT32_LIST:
case SAI_ATTR_VALUE_TYPE_QOS_MAP_LIST:
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_INT32_RANGE:
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
Expand Down Expand Up @@ -2783,6 +2797,7 @@ void meta_generic_validation_post_remove(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -2817,6 +2832,7 @@ void meta_generic_validation_post_remove(
case SAI_ATTR_VALUE_TYPE_UINT32_LIST:
case SAI_ATTR_VALUE_TYPE_INT32_LIST:
case SAI_ATTR_VALUE_TYPE_QOS_MAP_LIST:
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_INT32_RANGE:
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
Expand Down Expand Up @@ -3012,6 +3028,7 @@ void meta_generic_validation_post_set(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -3068,6 +3085,7 @@ void meta_generic_validation_post_set(
case SAI_ATTR_VALUE_TYPE_UINT32_LIST:
case SAI_ATTR_VALUE_TYPE_INT32_LIST:
case SAI_ATTR_VALUE_TYPE_QOS_MAP_LIST:
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_INT32_RANGE:
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
Expand Down Expand Up @@ -3319,6 +3337,7 @@ void meta_generic_validation_post_get(

// ACL ACTION

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -3367,6 +3386,9 @@ void meta_generic_validation_post_get(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
VALIDATION_LIST_GET(md, value.aclresource);
break;
case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
VALIDATION_LIST_GET(md, value.ipaddrlist);
break;

case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:

Expand Down
46 changes: 46 additions & 0 deletions meta/saiserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ sai_status_t transfer_attribute(
RETURN_ON_ERROR(transfer_list(src_attr.value.aclresource, dst_attr.value.aclresource, countOnly));
break;

case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
RETURN_ON_ERROR(transfer_list(src_attr.value.ipaddrlist, dst_attr.value.ipaddrlist, countOnly));
break;

/* ACL FIELD DATA */

Expand Down Expand Up @@ -323,6 +326,11 @@ sai_status_t transfer_attribute(

/* ACL ACTION DATA */

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
transfer_primitive(src_attr.value.aclaction.enable, dst_attr.value.aclaction.enable);
transfer_primitive(src_attr.value.aclaction.parameter.booldata, dst_attr.value.aclaction.parameter.booldata);
break;

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
transfer_primitive(src_attr.value.aclaction.enable, dst_attr.value.aclaction.enable);
transfer_primitive(src_attr.value.aclaction.parameter.u8, dst_attr.value.aclaction.parameter.u8);
Expand Down Expand Up @@ -904,6 +912,15 @@ std::string sai_serialize_list(

}

std::string sai_serialize_ip_address_list(
_In_ const sai_ip_address_list_t& list,
_In_ bool countOnly)
{
SWSS_LOG_ENTER();

return sai_serialize_list(list, countOnly, [&](sai_ip_address_t item) { return sai_serialize_ip_address(item);} );
}

std::string sai_serialize_enum_list(
_In_ const sai_s32_list_t& list,
_In_ const sai_enum_metadata_t* meta,
Expand Down Expand Up @@ -1065,6 +1082,9 @@ std::string sai_serialize_acl_action(

switch (meta.attrvaluetype)
{
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
return sai_serialize_bool(action.parameter.booldata);

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
return sai_serialize_number(action.parameter.u8);

Expand Down Expand Up @@ -1269,6 +1289,9 @@ std::string sai_serialize_attr_value(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
return sai_serialize_acl_resource_list(attr.value.aclresource, countOnly);

case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
return sai_serialize_ip_address_list(attr.value.ipaddrlist, countOnly);

// ACL FIELD DATA

case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_BOOL:
Expand All @@ -1288,6 +1311,7 @@ std::string sai_serialize_attr_value(

// ACL ACTION DATA

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -1982,6 +2006,16 @@ void sai_deserialize_ip_address(
SWSS_LOG_THROW("invalid ip address %s", s.c_str());
}

void sai_deserialize_ip_address_list(
_In_ const std::string& s,
_Out_ sai_ip_address_list_t& list,
_In_ bool countOnly)
{
SWSS_LOG_ENTER();

sai_deserialize_list(s, list, countOnly, [&](const std::string sitem, sai_ip_address_t& item) { sai_deserialize_ip_address(sitem, item);} );
}

template <typename T>
void sai_deserialize_range(
_In_ const std::string& s,
Expand Down Expand Up @@ -2113,6 +2147,9 @@ void sai_deserialize_acl_action(

switch (meta.attrvaluetype)
{
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
return sai_deserialize_bool(s, action.parameter.booldata);

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
return sai_deserialize_number(s, action.parameter.u8);

Expand Down Expand Up @@ -2247,6 +2284,9 @@ void sai_deserialize_attr_value(
case SAI_ATTR_VALUE_TYPE_ACL_RESOURCE_LIST:
return sai_deserialize_acl_resource_list(s, attr.value.aclresource, countOnly);

case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
return sai_deserialize_ip_address_list(s, attr.value.ipaddrlist, countOnly);

// ACL FIELD DATA

case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_BOOL:
Expand All @@ -2266,6 +2306,7 @@ void sai_deserialize_attr_value(

// ACL ACTION DATA

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down Expand Up @@ -2688,6 +2729,10 @@ void sai_deserialize_free_attribute_value(
sai_free_list(attr.value.aclresource);
break;

case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
sai_free_list(attr.value.ipaddrlist);
break;

/* ACL FIELD DATA */

case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_BOOL:
Expand All @@ -2713,6 +2758,7 @@ void sai_deserialize_free_attribute_value(

/* ACL ACTION DATA */

case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_BOOL:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_INT8:
case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_UINT16:
Expand Down
4 changes: 4 additions & 0 deletions saidiscovery/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ endif
if SAIVS
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
else
if sonic_asic_platform_barefoot
SAILIB=-L/opt/bfn/install/lib -lswitchsai -lswitchapi -lbf_switchd_lib -ltofinopdfixed_thrift -ldriver -lbfutils -lbfsys -lbfutils -L/opt/bfn/install/lib/tofinopd/switch -lpd -lpdcli -lpdthrift
else
Copy link
Contributor

@lguohan lguohan Jul 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove library other than the sai package.

SAILIB=-lsai
endif
endif

saidiscovery_SOURCES = saidiscovery.cpp

Expand Down
4 changes: 4 additions & 0 deletions saiplayer/saiplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ void match_list_lengths(
CHECK_LIST(value.qosmap);
break;

case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST:
CHECK_LIST(value.ipaddrlist);
break;

case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_OBJECT_LIST:
CHECK_LIST(value.aclfield.data.objlist);
break;
Expand Down
6 changes: 6 additions & 0 deletions saisdkdump/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ else
DBGFLAGS = -g
endif


if SAIVS
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
else
if sonic_asic_platform_barefoot
AM_LDFLAGS = -Wl,-unresolved-symbols=ignore-in-shared-libs
SAILIB=-L/opt/bfn/install/lib -lswitchsai
else
SAILIB=-lsai
endif
endif

saisdkdump_SOURCES = saisdkdump.cpp
saisdkdump_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) $(SAIFLAGS)
Expand Down
6 changes: 6 additions & 0 deletions syncd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ endif
if SAIVS
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
else
if sonic_asic_platform_barefoot
AM_CPPFLAGS += -I/opt/bfn/install/include
AM_LDFLAGS = -Wl,-unresolved-symbols=ignore-in-shared-libs
SAILIB=-L/opt/bfn/install/lib -lswitchsai
else
SAILIB=-lsai
endif
endif

syncd_SOURCES = \
main.cpp \
Expand Down
Loading