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

checkenumlock.sh fails with SAI v1.11 #2018

Open
aparkhomenko-xsight opened this issue May 28, 2024 · 11 comments
Open

checkenumlock.sh fails with SAI v1.11 #2018

aparkhomenko-xsight opened this issue May 28, 2024 · 11 comments

Comments

@aparkhomenko-xsight
Copy link
Contributor

SAI repo on tag v1.11 can't be built anymore
it fails with checkenumlock.sh
./checkenumlock.sh

Cloning into 'temp'...                                                                  
remote: Enumerating objects: 11068, done.                                                      
remote: Counting objects: 100% (65/65), done.                                                 
remote: Compressing objects: 100% (53/53), done.                                             
remote: Total 11068 (delta 30), reused 27 (delta 12), pack-reused 11003                
Receiving objects: 100% (11068/11068), 71.98 MiB | 3.88 MiB/s, done.                              
Resolving deltas: 100% (7823/7823), done.                                                                
Checking for possible enum values shift (current branch vs origin/master) ...                             
ERROR: value of SAI_PORT_BREAKOUT_MODE_TYPE_MAX differ: ../inc//saiport.h:146 vs temp/inc//saiport.h:186 => (3 != 4)
enum SAI_ACL_ACTION_TYPE_CHAIN_REDIRECT only defined in temp/inc//saiacl.h:208                     
enum SAI_ACL_ACTION_TYPE_DISABLE_ARS_FORWARDING only defined in temp/inc//saiacl.h:206            
enum SAI_ACL_ACTION_TYPE_SET_ARS_MONITORING only defined in temp/inc//saiacl.h:202                      
enum SAI_ACL_ACTION_TYPE_SET_ARS_OBJECT only defined in temp/inc//saiacl.h:204

It seems like this commit
767c325
causes it

@kcudnik
Copy link
Collaborator

kcudnik commented May 28, 2024

Each commit is checked before merge to pass build, this what you are referring to should not be possible, unless that was cherry picked somehow

@aparkhomenko-xsight
Copy link
Contributor Author

steps to reproduce

@kcudnik
Copy link
Collaborator

kcudnik commented May 28, 2024

reproduced, as i thought it was cherrypicked the commit, problem is taht we dont have pipeline setup on other branches only master, so only master is checked, I fixed it here #2019

@aparkhomenko-xsight
Copy link
Contributor Author

I also tried to build SONiC 202311 and got the same issue (commit 96143ee)
and finally I found it happens even on previous commit before 767c325

@kcudnik
Copy link
Collaborator

kcudnik commented May 28, 2024

interesting, we have automatic builds setup on sonic branches which would fail build if this is happening, not sure how we build sonic now XD

@k-v1
Copy link

k-v1 commented Jun 2, 2024

not sure how we build sonic now XD

https://github.com/sonic-net/sonic-sairedis/blob/c8cede0f405b6f6ee65fca48a8c5e4261e93fb04/meta/Makefile.am#L10-L11

make saimetadata.c
doxygen Doxyfile 2>&1 | perl -npe '$e=1 if /warning/i; END{exit $e}'
touch xml
perl -I. parse.pl
Processing capability file sample.cap
Skipping cap file sample.cap
Running Aspell
Words to check: 3248
Processing sai_8h.xml
Removing last element SAI_API_MAX
Processing saiacl_8h.xml
Creating range attrs SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN .. MAX
Limiting range from 255 to 10
Creating range attrs SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN .. MAX
Limiting range from 255 to 10
Processing saiars_8h.xml
Processing saiarsprofile_8h.xml
Processing saibfd_8h.xml
Processing saibridge_8h.xml
Processing saibuffer_8h.xml
Ignoring SAI_BUFFER_PROFILE_ATTR_BUFFER_SIZE
Processing saicounter_8h.xml
Processing saidebugcounter_8h.xml
Processing saidtel_8h.xml
Removing last element SAI_DTEL_EVENT_TYPE_MAX
Processing saiexperimentalbmtor_8h.xml
Processing saiexperimentaldashacl_8h.xml
Processing saiexperimentaldashdirectionlookup_8h.xml
Processing saiexperimentaldasheni_8h.xml
Processing saiexperimentaldashinboundrouting_8h.xml
Processing saiexperimentaldashmeter_8h.xml
Processing saiexperimentaldashoutboundcatopa_8h.xml
Processing saiexperimentaldashoutboundrouting_8h.xml
Processing saiexperimentaldashpavalidation_8h.xml
Processing saiexperimentaldashvip_8h.xml
Processing saiexperimentaldashvnet_8h.xml
Processing saiextensions_8h.xml
Processing saifdb_8h.xml
Processing saigenericprogrammable_8h.xml
Processing saihash_8h.xml
Processing saihostif_8h.xml
Ignoring SAI_HOSTIF_USER_DEFINED_TRAP_TYPE_NEIGH
Processing saiipmc_8h.xml
Processing saiipmcgroup_8h.xml
Processing saiipsec_8h.xml
Processing saiisolationgroup_8h.xml
Processing sail2mc_8h.xml
Processing sail2mcgroup_8h.xml
Processing sailag_8h.xml
Processing saimacsec_8h.xml
Ignoring SAI_MACSEC_SA_ATTR_XPN
Ignoring SAI_MACSEC_SA_ATTR_MINIMUM_XPN
Processing saimcastfdb_8h.xml
Processing saimetadatalogger_8h.xml
Processing saimetadatatypes_8h.xml
Processing saimetadatautils_8h.xml
Processing saimirror_8h.xml
Processing saimpls_8h.xml
Processing saimymac_8h.xml
Processing sainat_8h.xml
Processing saineighbor_8h.xml
Processing sainexthop_8h.xml
Processing sainexthopgroup_8h.xml
Ignoring SAI_NEXT_HOP_GROUP_TYPE_ECMP
Processing saiobject_8h.xml
Processing saipoe_8h.xml
Processing saipolicer_8h.xml
Processing saiport_8h.xml
Removing last element SAI_PORT_BREAKOUT_MODE_TYPE_MAX
Removing last element SAI_PORT_INTERFACE_TYPE_MAX
Processing saiportextensions_8h.xml
Processing saiqosmap_8h.xml
Processing saiqueue_8h.xml
Processing sairoute_8h.xml
Processing sairouterinterface_8h.xml
Processing sairpfgroup_8h.xml
Processing saisamplepacket_8h.xml
Processing saischeduler_8h.xml
Processing saischedulergroup_8h.xml
Processing saiserialize_8h.xml
Processing saisrv6_8h.xml
Processing saistatus_8h.xml
Processing saistp_8h.xml
Processing saiswitch_8h.xml
Ignoring SAI_SWITCH_ATTR_PORT_NUMBER
Ignoring SAI_SWITCH_ATTR_SHUTDOWN_REQUEST_NOTIFY
Processing saiswitchextensions_8h.xml
Processing saisystemport_8h.xml
Processing saitam_8h.xml
Processing saitunnel_8h.xml
Processing saitwamp_8h.xml
Processing saitypes_8h.xml
Removing last element SAI_COMMON_API_MAX
Removing last element SAI_OBJECT_TYPE_MAX
Ignoring SAI_ACL_BIND_POINT_TYPE_ROUTER_INTF
Removing last element SAI_PORT_ERR_STATUS_MAX
Processing saitypesextensions_8h.xml
Processing saiudf_8h.xml
Processing saiversion_8h.xml
Processing saivirtualrouter_8h.xml
Processing saivlan_8h.xml
Processing saiwred_8h.xml
no need for END enum for SAI_IN_DROP_REASON_CUSTOM_RANGE_BASE
no need for END enum for SAI_OUT_DROP_REASON_CUSTOM_RANGE_BASE
non range base SAI_UDF_ATTR_BASE

@kcudnik
Copy link
Collaborator

kcudnik commented Jun 2, 2024

can you elaborate more ?

@k-v1
Copy link

k-v1 commented Jun 2, 2024

can you elaborate more ?

As I understand, when we build SONiC (e.g. syncd) we don't validate SAI headers (don't run ./checkenumlock.sh, etc). We just generate saimetadata.c and saimetadata.h. I'm not sure if it's expected behaviour or not, but it's the main reason why we don't catch this error with SONiC builds.

@kcudnik
Copy link
Collaborator

kcudnik commented Jun 2, 2024

thats intended, i put it there, since all validation checks should be done on SAI repo on each commit, this issue actually has no impact on sonic, build error on v1.11 is because value MAX is not excluded from backward compatybility check

@BYGX-wcr
Copy link

Any plan to fix this issue? This issue is annoying when I want to build SAI only.

@kcudnik
Copy link
Collaborator

kcudnik commented Sep 27, 2024 via email

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

No branches or pull requests

4 participants