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

[submodule] Update SAI to latest master #1431

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Oct 10, 2024

To latest SAI v1.15.0

@kcudnik kcudnik marked this pull request as draft October 10, 2024 15:04
@kcudnik
Copy link
Collaborator Author

kcudnik commented Oct 10, 2024

there is problem with swss becasue of backward compatibility issues:

g++ -DHAVE_CONFIG_H -I. -I../..  -g -DNDEBUG  -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls  -I /usr/include/sai -I ../../orchagent/flex_counter -I ../../orchagent/debug_counter -I ../../lib -I../../cfgmgr -I../../orchagent -I../../orchagent/p4orch/tests -I../../orchagent/dash -I../../warmrestart -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o tests-warmrestarthelper_ut.o `test -f 'warmrestarthelper_ut.cpp' || echo './'`warmrestarthelper_ut.cpp
switchorch_ut.cpp: In member function 'virtual void switchorch_test::SwitchOrchTest_SwitchOrchTestHandleEvent_Test::TestBody()':
switchorch_ut.cpp:295:83: error: missing initializer for member '_sai_switch_health_data_t::data' [-Werror=missing-field-initializers]
  295 |         sai_switch_health_data_t data = {.data_type = SAI_HEALTH_DATA_TYPE_GENERAL};
      |                                                                                   ^

because some fields in structs appear, current swss won't let it compile because initializers are missing
similar will be for SER data and port_oper_status notification with port_error_status field :(

because swss gets SAI headers from sairedis, then when pointer from v1.14 to v1.15 is updated, new firlds show up and they are captured by gcc compiler

so there are 2 ways to solve this
we update swss repo to disable this warning globally (not reccomended)
we disable this warning on swss on places where is used (also tidious to search all places)

and this will happen again when we another time will break backward compatibility

@kcudnik
Copy link
Collaborator Author

kcudnik commented Oct 10, 2024

attempt to fix tests on swss: sonic-net/sonic-swss#3321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant