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

Convert DASH meter bucket object to table entry #2056

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

mukeshmv
Copy link
Contributor

Bring in SAI API changes from this DASH PR
sonic-net/DASH#605

Bring in SAI API changes from this DASH PR
sonic-net/DASH#605

Signed-off-by: mukeshmv <mukesh@pensando.io>
@KrisNey-MSFT
Copy link

Could someone add @prsunny and @marian-pritsak to the Reviewers here?

@prsunny prsunny merged commit 806c656 into opencomputeproject:master Jul 24, 2024
3 checks passed
@@ -215,15 +215,21 @@ sub CheckStatsFunction

if (not $fnparams =~ /^\w+_id number_of_counters counter_ids( (mode )?counters)?$/)
{
LogWarning "invalid stat function $fname params names: $fnparams";
if (not $fnparams =~ /^\w+_entry number_of_counters counter_ids( (mode )?counters)?$/)
Copy link
Contributor

Choose a reason for hiding this comment

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

@mukeshmv as I mentioned in the DASH PR, the right way to do this is to check in this file only and bring it to DASH. Now, the DASH SAI is diverged from OCP SAI, because it is not superset anymore. Any future DASH update is going to have a chance to break this feature, as the generated API is still going to use the old SAI object format for metering bucket. It is not good to leave DASH in this state. Can you help bring this change back to DASH?

Hi @prsunny , do you mind to help track this? I am OOF and My internet access is horrible, so I won't be able to do this myself.

Copy link
Contributor Author

@mukeshmv mukeshmv Jul 25, 2024

Choose a reason for hiding this comment

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

The style.pm change is not sufficient to get the Meter bucket API change in since the API change is not backward compatible. Hence we had to resort to pushing this directly to SAI. I have a new PR open in Dash to pull this in along with your original commit that should resolve this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not backward compatible ! Remove !!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kcudnik, could you elaborate why you think this style change is not backward compatible ? The change actually relaxes the check by allowing another variation in addition to the existing stats API. I don't see how this breaks backward compatibility.

Copy link
Contributor Author

@mukeshmv mukeshmv Jul 25, 2024

Choose a reason for hiding this comment

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

Change is equivalent to adding an "or" to existing check - allowing an extra pattern.

-    if (not $fnparams =~ /^\w+_id number_of_counters counter_ids( (mode )?counters)?$/)
+    if (not ($fnparams =~ /^\w+_id number_of_counters counter_ids( (mode )?counters)?$/ or
+             $fnparams =~ /^\w+_entry number_of_counters counter_ids( (mode )?counters)?$/))
     {
         LogWarning "invalid stat function $fname params names: $fnparams";
     }

If you want I can change it to this for better readability.

@kcudnik
Copy link
Collaborator

kcudnik commented Jul 25, 2024

This style change is not backward compatible

@kcudnik
Copy link
Collaborator

kcudnik commented Jul 25, 2024

Please. Remove style change

@kcudnik
Copy link
Collaborator

kcudnik commented Jul 25, 2024

@prsunny don't merge changes like this !!

@prsunny
Copy link
Collaborator

prsunny commented Jul 25, 2024

@mukeshmv , lets remove the style change and only have the dash changes in these PRs. all other changes other than dash should go as seperate PR/approval

@prsunny
Copy link
Collaborator

prsunny commented Jul 25, 2024

This style change is not backward compatible

@kcudnik , can you check Mukesh's comment? If required, we can revert this PR.

@kcudnik
Copy link
Collaborator

kcudnik commented Jul 25, 2024

Why added API is not following proposed standard ?

@mukeshmv
Copy link
Contributor Author

Why added API is not following proposed standard ?

@kcudnik, the reason is explained in @r12f 's Dash PR sonic-net/DASH#605

@jimmyzhai
Copy link
Contributor

@mukeshmv, @r12f, @prsunny, @kcudnik the style change relaxes stats API check. While compiling sonic-sairedis with this PR, it will fail. SaiInterface (meta/SaiInterface.h) still does not support stats API for sai_xxx_entry.

siqbal1986 pushed a commit to siqbal1986/SAI that referenced this pull request Sep 30, 2024
)

Bring in SAI API changes from this DASH PR
sonic-net/DASH#605

Signed-off-by: siqbal1986 <shahzad.iqbal@microsoft.com>
erohsik pushed a commit to erohsik/SAI that referenced this pull request Nov 7, 2024
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.

7 participants