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

Draft HLD document for portchannel interface #2

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

Satoru-Shinohara
Copy link
Collaborator

No description provided.

# Scope
- This document describes the high level design of OpenConfig configuration of portchannel interfaces via REST and gNMI in SONiC.
- This does not cover the SONiC KLISH CLI.
- This covers only the portchannel interfaces configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we support counters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do support counters for interfaces + Ethernet.
However, when comparing E-SONiC vs SONiC-net's DB's on a fresh image, I saw that creating a PortChannel on Community-SONiC Switch did not produce PortChannel in the COUNTERS_DB in a way that was expected.

E-SONiC Showed portchannel inside COUNTERS_PORT_NAME_MAP

"COUNTERS_PORT_NAME_MAP": {
"expireat": 1719361893.0460842,
"ttl": -0.001,
"type": "hash",
"value": {
...
"PortChannel105": "oid:0x2000000000bce"
}
},

While Community-SONiC Showed it inside COUNTERS_LAG_NAME_MAP

"COUNTERS_LAG_NAME_MAP": {
"expireat": 1719362054.8109653,
"ttl": -0.001,
"type": "hash",
"value": {
"": "",
"PortChannel10": "oid:0x2000000000c41"
}
},

Following the OID for both, E-SONiC Produced the proper counters table

"COUNTERS:oid:0x2000000000bce": {
"expireat": 1719361893.0559826,
"ttl": -0.001,
"type": "hash",
"value": {
"PORT_STAT_IF_IN_BITS_PER_SECOND": "0",
"PORT_STAT_IF_IN_OCTETS_PER_SECOND": "0",
"PORT_STAT_IF_IN_PKTS_PER_SECOND": "0",
...

While Community-SONiC Showed No Results
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Once a traffic flows on the given PO interface, the counters should be populated for the OID.
e.g. mock tables to test LAG counters
https://github.com/sonic-net/sonic-utilities/blob/0e6a55ef5eac306ef61d6f0241625a6baee42ab8/tests/mock_tables/asic1/counters_db.json

Copy link
Collaborator

Choose a reason for hiding this comment

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

But, I don't think you code can handle counters because your callback does not have a translation logic for those attributes from Counter DB to YANG. You can check.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I just checked that those attributes for LAG counters - SAI_ROUTER_INTERFACE_STAT_IN_ERROR_OCTETS etc. - are not presented in OC yang. So, it's ok.

@Satoru-Shinohara Satoru-Shinohara merged commit 39e4161 into ss-pc-hld-internal-review Jun 27, 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.

3 participants