Skip to content

[orchagent] PORT_PHY_ATTR logs ERR on VS for unsupported attributes (RX_SIGNAL_DETECT) #4242

@rustiqly

Description

@rustiqly

Description

After merging #3957 (PORT_PHY_ATTR flex counter support) and #4017 (PORT_SERDES_ATTR), orchagent logs ERR-level messages on VS (Virtual Switch) platforms for unsupported PHY attributes:

ERR swss#orchagent: :- verifyPortSupportsAllPhyAttr: PORT_PHY_ATTR: Port Ethernet0 does not support RX_SIGNAL_DETECT attribute (status=-15)
ERR swss#orchagent: :- verifyPortSupportsAllPhyAttr: PORT_PHY_ATTR: Port Ethernet1 does not support RX_SIGNAL_DETECT attribute (status=-15)

This causes VS/KVM CI test failures due to unexpected ERR-level syslog messages being matched by log analyzers.

Root Cause

verifyPortSupportsAllPhyAttr() logs at ERR level when SAI returns SAI_STATUS_NOT_SUPPORTED (-15). On VS, the virtual SAI doesn't implement PHY attributes like SAI_PORT_ATTR_RX_SIGNAL_DETECT, SAI_PORT_ATTR_FEC_ALIGNMENT_LOCK, and SAI_PORT_ATTR_RX_SNR, so every port triggers this error.

Impact

  • Causes spurious test failures in VS/KVM CI pipelines (e.g., seen in sonic-buildimage PR #25552 CI)
  • ERR-level logs for expected platform limitations add noise to syslog

Suggested Fix

Downgrade the log level from ERR to WARNING or INFO when SAI returns SAI_STATUS_NOT_SUPPORTED. This is an expected condition on platforms that don't support PHY attribute polling — it's not an error.

Alternatively, skip PHY attribute flex counter registration on platforms that don't support these attributes.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions