Skip to content

Policer enhancement to support operational visibility and MEF Metering Modes - #2323

Open
AnandhiDhanabalan wants to merge 2 commits into
opencomputeproject:masterfrom
AnandhiDhanabalan:mrvl_policer
Open

Policer enhancement to support operational visibility and MEF Metering Modes#2323
AnandhiDhanabalan wants to merge 2 commits into
opencomputeproject:masterfrom
AnandhiDhanabalan:mrvl_policer

Conversation

@AnandhiDhanabalan

Copy link
Copy Markdown
Contributor

Overview

This proposal enhances the SAI policer specification by introducing capabilities that improve operational transparency and broaden deployment readiness for carrier Ethernet environments.

Key Enhancements

1. Addition of MEF Standard Metering Modes
Introduce support for MEF 10.2 metering algorithms (MEF0 / MEF1), widely adopted in service provider and metro Ethernet networks. This expands SAI policer capabilities to align with established carrier bandwidth profiling models.

2. Improved Hardware Configuration Visibility
Provide a standard mechanism to query the actual CIR / PIR / CBS / PBS values programmed in hardware. This gives operators clear insight into effective policer settings, helping validate SLA targets, understand hardware-applied values, and simplify troubleshooting.

Signed-off-by: Anandhi Dhanabalan <adhanabalan@marvell.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Signed-off-by: Anandhi Dhanabalan <adhanabalan@marvell.com>
@AnandhiDhanabalan

Copy link
Copy Markdown
Contributor Author

@kcudnik, I'd like to add an alias similar to the one below. However, I get a compilation error because two enum values resolve to the same value.

Is there a way to support enum aliases in this case?

SAI_POLICER_MODE_TR_TCM_V2 = 0x00000003,

/** MEF 10.2 with Coupling Flag = 0 (RFC 4115 compliant) */
SAI_POLICER_MODE_MEF0 = SAI_POLICER_MODE_TR_TCM_V2,

@kcudnik

kcudnik commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

why you want to add alias if you have explicit name for that alreay? add "@ignore" to this enum

@AnandhiDhanabalan

Copy link
Copy Markdown
Contributor Author

why you want to add alias if you have explicit name for that alreay? add "@ignore" to this enum

Current SAI supports only SAI_POLICER_MODE_TR_TCM (RFC 2698).

SAI_POLICER_MODE_MEF0 and RFC 4115 are functionally equivalent. As mentioned in my original comment, I'd like both enum names to resolve to the same underlying value since they are functionally equivalent but originate from different standards bodies.

Is supporting such enum aliases possible?

@kcudnik

kcudnik commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Is supporting such enum aliases possible?

yes

@AnandhiDhanabalan

AnandhiDhanabalan commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Is supporting such enum aliases possible?

yes

Can I update the PR even if warning/error for same comes when make -c meta is issued ?

@kcudnik

kcudnik commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

yes, you can force push

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.

2 participants