Ethernet: fail on MAC/PHY bring-up errors and suppress noisy carrier reads#475
Open
smuppand wants to merge 2 commits into
Open
Ethernet: fail on MAC/PHY bring-up errors and suppress noisy carrier reads#475smuppand wants to merge 2 commits into
smuppand wants to merge 2 commits into
Conversation
Some Ethernet drivers can return EINVAL when reading /sys/class/net/<iface>/carrier while the MAC/PHY attach path is not fully operational. The current Ethernet link polling can leak these cat errors directly into LAVA stdout and obscure the real kernel failure. Update ethIsLinkUp() to suppress carrier read stderr and treat unreadable carrier as unknown, then continue through the existing fallback checks such as is_link_up, operstate, LOWER_UP, and ethtool. This keeps the helper behavior unchanged while making Ethernet CI logs cleaner and easier to triage. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
The Ethernet test currently treats carrier=0 or ethtool "Link detected: no" as a no-cable condition after link bring-up fails. This can hide real driver or device-tree issues where qcom-ethqos/phylink fails before cable detection is meaningful. Add a focused kernel-log scan before classifying no-link as SKIP. If Ethernet MAC/PHY/phylink errors are detected, print the filtered kernel lines to stdout and report FAIL instead of SKIP. This preserves SKIP for clean no-cable/no-carrier cases while correctly flagging failures such as phylink validation errors, 2500base-x mode mismatches, and "cannot attach to PHY" errors. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve Ethernet CI diagnostics and result classification.
This change suppresses noisy
/sys/class/net/<iface>/carrierread errors inethIsLinkUp()and treats unreadable carrier state as unknown so the existing fallback checks can continue.It also updates the Ethernet test to scan kernel logs for focused MAC/PHY/phylink errors before classifying link bring-up failure as a no-cable skip.
Issue on some platforms.
Some Ethernet drivers return
EINVALwhen reading the carrier file while MAC/PHY attach is not complete. The resultingcaterrors pollute LAVA logs.Also, the test previously treated
carrier=0orethtool Link detected: noas a no-cable condition even when the kernel showed real errors such as: