Closed kcudnik closed 1 year ago
Please address merge conflicts. How can I know what new features/fixes come w/ new SAI?
Please address merge conflicts. How can I know what new features/fixes come w/ new SAI?
it adds this commit in SAI: https://github.com/opencomputeproject/SAI/commit/ad12e9eac34996501691d7a159391e25d4353c46
and VendorSai.cpp starts using generated metadata API structure and generic functions to execute common tasks, take a look at file changes
@kcudnik ,https://github.com/sonic-net/sonic-buildimage/pull/16168 The submodule update PR always failed on braodcom/barefoot/mellanox build. Please check.
for mellanox and broadcom the same error happens:
VendorSai.cpp: In constructor 'syncd::VendorSai::VendorSai()':
VendorSai.cpp:44:10: error: request for member 'dbg_generate_dump' in 'sai_bulk_object_get_stats', which is of non-class type 'sai_status_t(sai_object_id_t, sai_object_type_t, uint32_t, const sai_object_key_t*, uint32_t, const sai_stat_id_t*, sai_stats_mode_t, sai_status_t*, uint64_t*)' {aka 'int(long unsigned int, _sai_object_type_t, unsigned int, const _sai_object_key_t*, unsigned int, const unsigned int*, _sai_stats_mode_t, int*, long unsigned int*)'}
44 | .dbg_generate_dump = nullptr,
| ^~~~~~~~~~~~~~~~~
which build is for barefoot ?
btw. i found the issue, fixe is here: https://github.com/sonic-net/sonic-sairedis/pull/1278
already merged, please update sairedis submodule on https://github.com/sonic-net/sonic-buildimage/pull/16168 to help integrate the fix
@liushilongbuaa this is the issue:
checking whether CXX supports -Wno-cast-function-type... yes
checking for sai_query_api_version... no
configure: error: "SAI library libsai.so does not have sai_query_api_version API which is required"
tail -v -n \+0 config.log
==> config.log <==
This file contains any messages produced by compilers while
libsai which is build with that image does not implement sai_query_api_version, in this PR i enabled required field for that sai library method saiversion.h header was introduced in in version v1.9.0 in this commit 0b929737 which was on Feb 2022, that SAI library used in that build should already implement that API, lets contact marverll to update library with that api, it's 5min change, implementation looks like this: https://github.com/sonic-net/sonic-sairedis/blob/master/vslib/sai_vs_interfacequery.cpp#L208
sai_status_t sai_query_api_version(
_Out_ sai_api_version_t *version)
{
*version = SAI_API_VERSION;
return SAI_STATUS_SUCCESS;
}
@lguohan fyi
Also update VendorSai class to use latest generic api from SAI metadata.
Since latest SAI uses version v1.12 on master branch, force require sai_query_api_version to be present at all SAI libs