-
Notifications
You must be signed in to change notification settings - Fork 578
[TAM]: Add telemetry stats APIs and maximal polling interval for stream telemetry (with meta fix) #2260
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
Draft
Pterosaur
wants to merge
2
commits into
opencomputeproject:master
Choose a base branch
from
Pterosaur:enhance_stream_telemetry_with_meta_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[TAM]: Add telemetry stats APIs and maximal polling interval for stream telemetry (with meta fix) #2260
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,18 +164,27 @@ sub BuildCommitHistory | |
| # of union may not increase by adding members, and actual union size | ||
| # check is performed by sai sanity check | ||
|
|
||
| # Structs that are allowed to append new members at the end (ABI extension). | ||
| # api_t structs are always allowed. Add other structs here as needed. | ||
| my @extensible_structs = ( | ||
| "sai_switch_health_data_t", | ||
| "sai_port_oper_status_notification_t", | ||
kcudnik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "sai_stat_st_capability_t", | ||
| ); | ||
|
|
||
| my %extensible = map { $_ => 1 } @extensible_structs; | ||
|
|
||
| if ($currCount != $histCount and not $structTypeName =~ /^sai_\w+_api_t$/ | ||
| and $structTypeName ne "sai_switch_health_data_t" | ||
| and $structTypeName ne "sai_port_oper_status_notification_t") | ||
| and not $extensible{$structTypeName}) | ||
| { | ||
| LogError "FATAL: struct $structTypeName member count differs, was $histCount but is $currCount on commit $commit" if $type eq "struct"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. beyne instead of error, just add a information message that struct broke compatibility at this commit |
||
| } | ||
|
|
||
| if ($histCount > $currCount) | ||
| { | ||
| if ($structTypeName eq "sai_port_oper_status_notification_t") | ||
| if ($extensible{$structTypeName}) | ||
| { | ||
| # we allow this to change back backward compatibility | ||
| # we allow extensible structs to change for backward compatibility | ||
| } | ||
| else | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -646,7 +646,14 @@ sub CreateStructUnionSizeCheckTest | |
| $STRUCTS{$name} = $name; | ||
|
|
||
| next if $name =~ /^sai_\w+_api_t$/; # skip api structs | ||
| next if $name eq "sai_switch_health_data_t"; | ||
|
|
||
| # Skip extensible structs that are allowed to grow (see also structs.pl) | ||
| my %extensible_structs = map { $_ => 1 } ( | ||
| "sai_switch_health_data_t", | ||
| "sai_port_oper_status_notification_t", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sai_port_oper_status_notification_t remove |
||
| "sai_stat_st_capability_t", | ||
| ); | ||
| next if $extensible_structs{$name}; | ||
|
|
||
| my $upname = uc($name); | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least add comment that this will break backward compatibility