RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1895361 - ethtool: Add support for extended link state reporting
Summary: ethtool: Add support for extended link state reporting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ethtool
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.4
Assignee: Ivan Vecera
QA Contact: Tianhao
URL:
Whiteboard:
Depends On: 1878826
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-06 13:24 UTC by Ivan Vecera
Modified: 2021-05-18 13:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 13:35:02 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ivan Vecera 2020-11-06 13:24:59 UTC
Description of problem:
Bug#1894545 added support for extended link state reporting to kernel and allow NIC drivers to report a reason why a link is down. This BZ adds the same but on ethtool userspace side.

How reproducible:
Run 'ethtool <interface>' on interface handled by a driver that supports extended link state reporting (mlxsw driver currently)

Steps to Reproduce:
1. Run the ethtool command
2. Check result

Let's say we have one interface with no cable connected and the second one with cable but counterpart interface is down.

Actual results:
# ethtool enp6s0np32 | grep 'Link detected'
        Link detected: no
# ethtool enp6s0np17 | grep 'Link detected'
        Link detected: no

Expected results:
# ethtool enp6s0np32 | grep 'Link detected'
        Link detected: no (No cable)
# ethtool enp6s0np17 | grep 'Link detected'
        Link detected: no (Autoneg, No partner detected)

Comment 5 Tianhao 2020-11-26 06:22:50 UTC
Hi Ivan,

Can you please borrow me the access to testing HW as said in comment #1?

Thanks in advance.
Regards,
Tianhao

Comment 13 Tianhao 2020-12-01 03:07:18 UTC
Verified on the test HW provided by Ivan.

[root@mlxsw-2 ~]# uname -r
4.18.0-249.el8.mlxsw.x86_64
[root@mlxsw-2 ~]# ethtool enp3s0np32 | grep "Link detected"
	Link detected: no (No cable)

[root@mlxsw-2 ~]# ethtool enp3s0np17 | grep "Link detected"
	Link detected: yes
[root@mlxsw-2 ~]# ethtool enp3s0np18 | grep "Link detected"
	Link detected: yes
[root@mlxsw-2 ~]# ip link show enp3s0np17
5: enp3s0np17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:f5:35:c1 brd ff:ff:ff:ff:ff:ff
[root@mlxsw-2 ~]# ip link show enp3s0np18
6: enp3s0np18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:f5:35:c3 brd ff:ff:ff:ff:ff:ff
[root@mlxsw-2 ~]# ip link set enp3s0np17 down
[root@mlxsw-2 ~]# ethtool enp3s0np18 | grep "Link detected"
	Link detected: no (Autoneg, No partner detected)
[root@mlxsw-2 ~]# ethtool enp3s0np17 | grep "Link detected"
	Link detected: no
[root@mlxsw-2 ~]# ip link show enp3s0np17
5: enp3s0np17: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:f5:35:c1 brd ff:ff:ff:ff:ff:ff
[root@mlxsw-2 ~]# ip link show enp3s0np18
6: enp3s0np18: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:f5:35:c3 brd ff:ff:ff:ff:ff:ff

Comment 15 errata-xmlrpc 2021-05-18 13:35:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ethtool bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1576


Note You need to log in before you can comment on or make changes to this bug.