Skip to content

Convert DASH meter bucket object to table entry#2056

Merged
prsunny merged 1 commit intoopencomputeproject:masterfrom
mukeshmv:meter_bucket_entry
Jul 24, 2024
Merged

Convert DASH meter bucket object to table entry#2056
prsunny merged 1 commit intoopencomputeproject:masterfrom
mukeshmv:meter_bucket_entry

Conversation

@mukeshmv
Copy link
Copy Markdown
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
Copy Markdown

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

@prsunny prsunny merged commit 806c656 into opencomputeproject:master Jul 24, 2024
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

kcudnik commented Jul 25, 2024

This style change is not backward compatible

@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented Jul 25, 2024

Please. Remove style change

@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented Jul 25, 2024

@prsunny don't merge changes like this !!

@prsunny
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

kcudnik commented Jul 25, 2024

Why added API is not following proposed standard ?

@mukeshmv
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

@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