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

Add bulk meter stats fetch support in syncd #1460

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mukeshmv
Copy link
Contributor

@mukeshmv mukeshmv commented Nov 14, 2024

This PR adds syncd FlexCounter support to periodically fetch SAI bulk stats for Dash meter buckets and write the stats to COUNTERS_DB.
Multiple Meter buckets, each with inbound and outbound byte counters, are internally allocated for each ENI object in the Dash pipeline.
To support this a new DashMeterCounterContext class is derived from BaseCounterContext that tracks and invokes SAI bulkGetStats for all the meter bucket objects for each ENI object added to the context.

Reference -
https://github.com/sonic-net/DASH/blob/main/documentation/metering/metering.md

COUNTERS_DB -
Key:
"COUNTERS:{eni_id:oid:0x7008000000001,meter_class:1000,switch_id:oid:0x0}"
Field-Value pairs:

1) "SAI_METER_BUCKET_ENTRY_STAT_OUTBOUND_BYTES"
2) "4000100"
3) "SAI_METER_BUCKET_ENTRY_STAT_INBOUND_BYTES"
4) "4000200"

This PR adds syncd FlexCounter support to periodically fetch
SAI bulk stats for Dash meter buckets and write the stats to
COUNTERS_DB.
Multiple Meter buckets, each with inbound and outbound byte counters,
are internally allocated for each ENI object in the Dash pipeline.
To support this a new DashMeterCounterContext class is derived from
BaseCounterContext that tracks and invokes SAI bulkGetStats for all the
meter bucket objects for each ENI object added to the context.

Reference -
https://github.com/sonic-net/DASH/blob/main/documentation/metering/metering.md

Signed-off-by: Mukesh MV <[email protected]>
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.

1 participant