Skip to content

Draft HLD document for portchannel interface#2

Merged
Satoru-Shinohara merged 2 commits intoss-pc-hld-internal-reviewfrom
ss-pc-hld
Jun 27, 2024
Merged

Draft HLD document for portchannel interface#2
Satoru-Shinohara merged 2 commits intoss-pc-hld-internal-reviewfrom
ss-pc-hld

Conversation

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