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

[Dash] Handle FC update for existing ENI objects #33

Closed
wants to merge 1 commit into from

Conversation

vivekrnv
Copy link
Owner

Why I did

When FC is enabled after being disabled, FlexCounters are not installed for existing ENI's.

What I did

Fix the flow.

How I verified it

Create ENI, By default FC is enabled on DPU

2024 Nov 13 00:53:05.218187 sonic INFO swss#orchagent: :- doTask: Registering FC for ENI: 497f23d7-f0ac-4c99-a98f-59b470e8c7bd, id oid:0x7008000000020
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB hgetall COUNTERS:oid:0x7008000000020
{ 'SAI_ENI_STAT_OUTBOUND_RX_PACKETS': '21', ……..}
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB HGETALL "COUNTERS_ENI_NAME_MAP"
{'497f23d7-f0ac-4c99-a98f-59b470e8c7bd': 'oid:0x7008000000020'}

Disable ENI, this removes FC

root@sonic:/home/admin# counterpoll eni disable
2024 Nov 13 00:54:58.667654 sonic INFO swss#orchagent: :- removeEniFromFC: Unregistering FC for 497f23d7-f0ac-4c99-a98f-59b470e8c7bd, id: oid:0x7008000000020
root@sonic:/home/admin#  COUNTERS:oid:0x7008000000020
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB HGETALL "COUNTERS_ENI_NAME_MAP"
{}

Re-enable FC,

root@sonic:/home/admin# counterpoll eni enable
2024 Nov 13 00:55:30.715809 sonic INFO swss#orchagent: :- doTask: Registering FC for ENI: 497f23d7-f0ac-4c99-a98f-59b470e8c7bd, id oid:0x7008000000020
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB HGETALL "COUNTERS_ENI_NAME_MAP"
{'497f23d7-f0ac-4c99-a98f-59b470e8c7bd': 'oid:0x7008000000020'}

<Send 10 pkts>
testutils.send(ptfadapter, dash_pl_config[LOCAL_PTF_INTF], pkt, 10)
root@sonic:/home/admin# sonic-db-cli COUNTERS_DB hgetall COUNTERS:oid:0x7008000000020
{'SAI_ENI_STAT_OUTBOUND_RX_PACKETS': '31'}

Details if related

Signed-off-by: vkarri <vkarri@nvidia.com>
@vivekrnv vivekrnv closed this Nov 15, 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.

2 participants