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 multicast counters to ip interface, remove physical counters from subinterface #905

Merged
merged 11 commits into from
Jul 25, 2023

Conversation

dplore
Copy link
Member

@dplore dplore commented Jul 7, 2023

Change Scope

  • Refactor counters for interfaces and subinterfaces to use a common grouping for counters used for both interfaces and subinterfaces
  • Add multicast-pkt counters to common interface counters
  • Add resets counter for interface grouping
  • Deprecate in-fcs-error, in-unknown-protosand carrier transitions from subinterfaces
  • Removed TODO item regarding additional error counters
  • This change is backwards compatible
module: openconfig-interfaces
  +--rw interfaces
     +--rw interface* [name]
        +--ro state
        |  +--ro counters
        |  |  +--ro in-octets?             oc-yang:counter64
        |  |  +--ro in-pkts?               oc-yang:counter64
        |  |  +--ro in-unicast-pkts?       oc-yang:counter64
        |  |  +--ro in-broadcast-pkts?     oc-yang:counter64
        |  |  +--ro in-multicast-pkts?     oc-yang:counter64
        |  |  +--ro in-errors?             oc-yang:counter64
        |  |  +--ro in-discards?           oc-yang:counter64
        |  |  +--ro out-octets?            oc-yang:counter64
        |  |  +--ro out-pkts?              oc-yang:counter64
        |  |  +--ro out-unicast-pkts?      oc-yang:counter64
        |  |  +--ro out-broadcast-pkts?    oc-yang:counter64
        |  |  +--ro out-multicast-pkts?    oc-yang:counter64
        |  |  +--ro out-discards?          oc-yang:counter64
        |  |  +--ro out-errors?            oc-yang:counter64
        |  |  +--ro last-clear?            oc-types:timeticks64
        |  |  +--ro in-unknown-protos?     oc-yang:counter64
        |  |  +--ro in-fcs-errors?         oc-yang:counter64
        |  |  +--ro carrier-transitions?   oc-yang:counter64
        |  |  +--ro resets?                oc-yang:counter64.       <-- added
        +--rw subinterfaces
        |  +--rw subinterface* [index]
        |     +--ro state
        |     |  +--ro counters
        |     |     +--ro in-octets?             oc-yang:counter64
        |     |     +--ro in-pkts?               oc-yang:counter64
        |     |     +--ro in-unicast-pkts?       oc-yang:counter64
        |     |     +--ro in-broadcast-pkts?     oc-yang:counter64
        |     |     +--ro in-multicast-pkts?     oc-yang:counter64        <-- added
        |     |     +--ro in-errors?             oc-yang:counter64
        |     |     +--ro in-discards?           oc-yang:counter64
        |     |     +--ro out-octets?            oc-yang:counter64
        |     |     +--ro out-pkts?              oc-yang:counter64
        |     |     +--ro out-unicast-pkts?      oc-yang:counter64
        |     |     +--ro out-broadcast-pkts?    oc-yang:counter64
        |     |     +--ro out-multicast-pkts?    oc-yang:counter64      <-- added
        |     |     +--ro out-discards?          oc-yang:counter64
        |     |     +--ro out-errors?            oc-yang:counter64
        |     |     +--ro last-clear?            oc-types:timeticks64
        |     |     x--ro in-unknown-protos?     oc-yang:counter64    <-- deprecated
        |     |     x--ro in-fcs-errors?         oc-yang:counter64.          <-- deprecated
        |     |     x--ro carrier-transitions?   oc-yang:counter64.       <-- deprecated

Platform Implementations

Error counters analysis

The TODO item to investigate if additional interface error counters are needed was removed based on the following analysis:

I'd like to complain a little bit that this is expanding the scope of the PR which is intended to be small and only seeks to

  • add multicast counters
  • remove physical interface errors counters from subinterfaces which are invalid

Thank you for reading my complaint. :)

That said, I investigated and I think this TODO can be removed. Here are the error counters which seem to match commonly supported output from 'show interfaces' commands on various implementations. There is variation by This varies by hardware and NOS. Some platforms report only input and output errors without support for additional, more granular errors. Some platforms aggregate errors as input and output errors and also support more granular errors.

Common error counters OC Path Description
runts ...ethernet/state/counters/in-undersize-frames Number of received packets that were too small to be handled. Aggregated to input errors count.
giants .../ethernet/state/counters/in-oversize-frames Number of received packets that were too large. Aggregated to input errors count.
ignored .../state/counters/in-discards Total number of ignored packet errors. Ignored packets are those that are discarded because the interface hardware does not have enough internal buffers. Broadcast storms and bursts of noise can result in an increased number of ignored packets.
throttles .../state/counters/in-discards Number of packets dropped due to throttling (because the input queue was full).
input errors .../state/counters/in-errors Total number of received packets that contain errors and hence cannot be delivered. Compare this to total input drops, which counts packets that were not delivered despite containing no errors.
CRC /interfaces/interface/ethernet/state/counters/in-crc-errors
Number of packets that failed the Ethernet CRC check.
frame /interfaces/interface/state/counters/in-fcs-errors Number of packets with bad framing bytes. Perhaps further investigation needed to de-duplicate the in-crc-errors and in-fcs-errors leaves.
overrun /interfaces/interface/state/counters/out-discards Number of overrun errors experienced by the interface. Overruns represent the number of times that the receiver hardware is unable to send received data to a hardware buffer because the input rate exceeds the receiver's ability to handle the data.
resets /interfaces/interface/state/counters/resets Number of times that the interface hardware has been reset.
output errors /interfaces/interface/state/counters/out-discards Number of times that the receiver hardware was unable to handle received data to a hardware buffer because the input rate exceeded the receiver's ability to handle the data.
underruns /interfaces/interface/state/counters/out-discards Underruns will occur when the low level transceiver tries to send data, but the buffer is still empty because the device hasn't serviced the packets yet.
output buffer failures /interfaces/interface/state/counters/out-discards Number of times that a packet was not output from the output hold queue because of a shortage of MEMD shared memory.
carrier transitions interfaces/interface/state/counters/carrier-transitions  Number of times the interface state has transitioned between up and down.

@OpenConfigBot
Copy link

OpenConfigBot commented Jul 7, 2023

Major YANG version changes in commit 7a7a74f:

@dplore
Copy link
Member Author

dplore commented Jul 8, 2023

/gcbrun

@dplore dplore marked this pull request as ready for review July 10, 2023 19:34
@dplore dplore requested a review from a team as a code owner July 10, 2023 19:34
@dplore dplore requested a review from robshakir July 15, 2023 02:06
@dplore dplore requested a review from robshakir July 19, 2023 23:32
@dplore
Copy link
Member Author

dplore commented Jul 19, 2023

All comments addressed, let me know if you think it's ready @robshakir

@robshakir
Copy link
Contributor

Thanks for the changes. LGTM.

@dplore dplore merged commit e5ce68c into master Jul 25, 2023
4 checks passed
@dplore dplore deleted the dplore/subif-multicast branch July 25, 2023 16:27
@dplore dplore restored the dplore/subif-multicast branch July 28, 2023 20:25
dplore added a commit that referenced this pull request Jul 28, 2023
dplore added a commit that referenced this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants