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

multicast counters to subinterface, remove physical counters from subinterface #934

Merged
merged 16 commits into from
Aug 11, 2023

Conversation

dplore
Copy link
Member

@dplore dplore commented Jul 28, 2023

Change Scope

  • Fixes Add multicast counters to ip interface, remove physical counters from subinterface #905 which unintentionally removed interface ip counters
  • 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 sub 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 28, 2023

Major YANG version changes in commit d147c28:

@dplore dplore marked this pull request as ready for review August 2, 2023 01:01
@dplore dplore requested a review from a team as a code owner August 2, 2023 01:01
@dplore dplore requested a review from robshakir August 2, 2023 01:01
@dplore
Copy link
Member Author

dplore commented Aug 2, 2023

Ready for review @robshakir

One open question for us is: how should multicast IP packets be counted? At the subinterface level or at the ip level or both?

It seems counters are duplicated (where applicable) on the subinterface container and IP container. I am not quite sure what the history is here and if I should duplicate the multicast counter at the ip container level.

Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

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

One minor fix. Did we check that this doesn't remove anything unexpectedly?

release/models/interfaces/openconfig-interfaces.yang Outdated Show resolved Hide resolved
@OpenConfigBot
Copy link

OpenConfigBot commented Aug 10, 2023

Compatibility Report for commit d147c28:
pyangbind@d122b7a

@dplore
Copy link
Member Author

dplore commented Aug 10, 2023

One minor fix. Did we check that this doesn't remove anything unexpectedly?

Fixed index.

Merged in latest breaking change detection (which now detects changed and deleted leafs and compares to the new semantic version) and it had findings in wifi ap interfaces model which was impacted by the refactoring of the groupings in openconfig-interfaces. (@wenovus +1) This is now fixed.

@dplore
Copy link
Member Author

dplore commented Aug 10, 2023

@mike-albano I made a small refactor to the wifi / ap-interfaces model which doesn't change the tree in any way. It was needed to be compatible with the refactoring done on the openconfig-interfaces model in this PR. Would like your approval.

Copy link
Contributor

@mike-albano mike-albano left a comment

Choose a reason for hiding this comment

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

LGTM.

@mike-albano mike-albano merged commit face342 into master Aug 11, 2023
5 checks passed
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.

4 participants