Skip to content

[portstat] "Overruns Received" in detailed counters displays SAI_PORT_STAT_IP_IN_RECEIVES (total IP traffic) instead of actual overruns #4568

Description

@sundeepkaranam

show interfaces counters detailed labels SAI_PORT_STAT_IP_IN_RECEIVES as "Overruns Received." This counter counts every IP packet received on the port — it is a traffic volume counter, not an error counter.

Any active port shows millions of "Overruns Received" under normal operation.

Reproduce

# 1. Run detailed counters on any port passing traffic
show interfaces counters detailed Ethernet1

# 2. "Overruns Received" shows a large number (e.g. 138M after 6 days of uptime)

# 3. Compare with Redis — the value matches SAI_PORT_STAT_IP_IN_RECEIVES
redis-cli -n 2 hget "COUNTERS:oid:<port_oid>" "SAI_PORT_STAT_IP_IN_RECEIVES"

Root Cause

In utilities_common/portstat.py, counter_bucket_dict position 41 maps to SAI_PORT_STAT_IP_IN_RECEIVES:

41: ['SAI_PORT_STAT_IP_IN_RECEIVES'],

The NStats namedtuple field at position 41 is rx_ovrrun. The detailed print labels it "Overruns Received":

print("Overruns Received.............................. {}".format(
    ns_diff(cntr["rx_ovrrun"], old_cntr["rx_ovrrun"])))

SAI_PORT_STAT_IP_IN_RECEIVES is defined in saiport.h as total IP datagrams received (RFC 4293 ipIfStatsInReceives). It increments on every normal IP packet. It has no relation to overruns.

Present on master and all release branches (confirmed back to 202211).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions