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

Support interface speed for PortChannels #262

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

lukasstockner
Copy link
Contributor

@lukasstockner lukasstockner commented Jun 15, 2022

ADO: 25085425

- What I did
This change makes SNMP report the correct interface speed for PortChannels instead of defaulting to 40G.

- How I did it
Similar to intfutil, the code simply sums up the interface speeds of all member ports. The logic for iterating over members is based on _get_counter.

- How to verify it

  • Check snmpwalk -v 2c -c public <IP> ifHighSpeed, note that PortChannels are reported as 40G
  • Apply the change
  • Check again, note that the same speed as in show interface status is reported now.

- Description for the changelog
Support reporting interface speeds for PortChannels through SNMP

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 12, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

Iteration over member interfaces is based on _get_counter.

Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
@qiluo-msft qiluo-msft merged commit 2c6ed2e into sonic-net:master Sep 14, 2023
qiluo-msft pushed a commit that referenced this pull request Sep 16, 2023
**- What I did**
This change makes SNMP report the correct interface speed for PortChannels instead of defaulting to 40G.

**- How I did it**
Similar to `intfutil`, the code simply sums up the interface speeds of all member ports. The logic for iterating over members is based on `_get_counter`.

**- How to verify it**
- Check `snmpwalk -v 2c -c public <IP> ifHighSpeed`, note that PortChannels are reported as 40G
- Apply the change
- Check again, note that the same speed as in `show interface status` is reported now.

**- Description for the changelog**
Support reporting interface speeds for PortChannels through SNMP
@lguohan
Copy link
Contributor

lguohan commented Sep 18, 2023

what is the portchannel has no member ports?

@qiluo-msft
Copy link
Contributor

what is the portchannel has no member ports?

Tested on DUT, and it is working with PortChannel with no emmber ports.

admin@sonic:~$ sudo config portchannel add PortChannel999
admin@sonic:~$ show int port
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
       S - selected, D - deselected, * - not synced
  No.  Team Dev        Protocol     Ports
-----  --------------  -----------  --------------
  101  PortChannel101  LACP(A)(Up)  Ethernet112(S)
  102  PortChannel102  LACP(A)(Up)  Ethernet116(S)
  103  PortChannel103  LACP(A)(Up)  Ethernet120(S)
  104  PortChannel104  LACP(A)(Up)  Ethernet124(S)
  999  PortChannel999  LACP(A)(Dw)

root@sonic:/# snmpwalk -v2c -c msft 10.64.247.236 1.3.6.1.2.1.31.1.1.1.15
iso.3.6.1.2.1.31.1.1.1.15.1101 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.1102 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.1103 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.1104 = Gauge32: 100000
iso.3.6.1.2.1.31.1.1.1.15.1999 = Gauge32: 0

yxieca pushed a commit that referenced this pull request Oct 13, 2023
**- What I did**
This change makes SNMP report the correct interface speed for PortChannels instead of defaulting to 40G.

**- How I did it**
Similar to `intfutil`, the code simply sums up the interface speeds of all member ports. The logic for iterating over members is based on `_get_counter`.

**- How to verify it**
- Check `snmpwalk -v 2c -c public <IP> ifHighSpeed`, note that PortChannels are reported as 40G
- Apply the change
- Check again, note that the same speed as in `show interface status` is reported now.

**- Description for the changelog**
Support reporting interface speeds for PortChannels through SNMP
StormLiangMS pushed a commit that referenced this pull request Oct 17, 2023
**- What I did**
This change makes SNMP report the correct interface speed for PortChannels instead of defaulting to 40G.

**- How I did it**
Similar to `intfutil`, the code simply sums up the interface speeds of all member ports. The logic for iterating over members is based on `_get_counter`.

**- How to verify it**
- Check `snmpwalk -v 2c -c public <IP> ifHighSpeed`, note that PortChannels are reported as 40G
- Apply the change
- Check again, note that the same speed as in `show interface status` is reported now.

**- Description for the changelog**
Support reporting interface speeds for PortChannels through SNMP
qiluo-msft pushed a commit that referenced this pull request Oct 20, 2023
**- What I did**
This change makes SNMP report the correct interface speed for PortChannels instead of defaulting to 40G.

**- How I did it**
Similar to `intfutil`, the code simply sums up the interface speeds of all member ports. The logic for iterating over members is based on `_get_counter`.

**- How to verify it**
- Check `snmpwalk -v 2c -c public <IP> ifHighSpeed`, note that PortChannels are reported as 40G
- Apply the change
- Check again, note that the same speed as in `show interface status` is reported now.

**- Description for the changelog**
Support reporting interface speeds for PortChannels through SNMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants