Project

General

Profile

Actions

Feature #9805

closed

i40e should read SFP data when firmware supports it

Added by Robert Mustacchi about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
2018-09-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The i40e driver already supports the MAC_CAPAB_TRANSCEIVER capability; however, it does not support reading from the transceiver. This is because previously the only way to do so reliably would be to take down the link. However, newer firmware provides new commands that allow for this to work. As such, we should leverage this when it exists.

To test this I took a couple different i40e parts. Ones that had the upgraded firmware and ones which did not. From there, I ran both fmtopo and dltraninfo. I verified that on older parts we still had basic information available. I used four different kinds of transceivers. On newer parts we can now see the following:

[root@ivy ~]# /usr/lib/dl/dltraninfo 
i40e0: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
i40e1: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
i40e2: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
i40e3: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
[root@ivy ~]# /usr/lib/dl/dltraninfo -v
i40e0: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
        Identifier: 'SFP/SFP+/SFP28'
        Extended Identifier: 4
        Connector: 'Unknown'
        Ethernet Compliance Codes[0]: '1000BASE-T'
        Encoding: '8B/10B'
        BR, nominal: '1300 MBd'
        Length Copper: '100 m'
        Vendor: 'AVAGO'
        OUI[0]: 0
        OUI[1]: 23
        OUI[2]: 106
        Part Number: 'ABCU-5710RZ-FT2'
        Laser Wavelength: '0 nm'
        Options[0]: 'TX_DISABLE implemented'
        Serial Number: '7503528DCH7K'
        Date Code: '120814'
        8472 Compliance: 'Not compliant'
i40e1: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
        Identifier: 'SFP/SFP+/SFP28'
        Extended Identifier: 4
        Connector: 'LC (Lucent Connector)'
        10G+ Ethernet Compliance Codes[0]: '10G Base-SR'
        Ethernet Compliance Codes[0]: '1000BASE-SX'
        Encoding: '64B/66B'
        BR, nominal: '10300 MBd'
        Length 50um OM2: '80 m'
        Length 62.5um OM1: '30 m'
        Length OM3: '300 m'
        Vendor: 'Intel Corp'
        OUI[0]: 0
        OUI[1]: 27
        OUI[2]: 33
        Part Number: 'FTLX8571D3BCV-IT'
        Revision: 'A'
        Laser Wavelength: '850 nm'
        Options[0]: 'Rx_LOS implemented'
        Options[1]: 'TX_FAULT implemented'
        Options[2]: 'TX_DISABLE implemented'
        Options[3]: 'RATE_SELECT implemented'
        Serial Number: 'AKR0EQ0'
        Date Code: '110618'
        Extended Options[0]: 'Soft Rate Select Control Implemented'
        Extended Options[1]: 'Soft RATE_SELECT implemented'
        Extended Options[2]: 'Soft RX_LOS implemented'
        Extended Options[3]: 'Soft TX_FAULT implemented'
        Extended Options[4]: 'Soft TX_DISABLE implemented'
        Extended Options[5]: 'Alarm/Warning flags implemented'
        8472 Compliance: 'Rev 10.2'
i40e2: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
        Identifier: 'SFP/SFP+/SFP28'
        Extended Identifier: 4
        Connector: 'Copper pigtail'
        Infiniband Compliance Codes[0]: '1X Copper Passive'
        Ethernet Compliance Codes[0]: '1000BASE-CX'
        Fibre Channel Link Lengths[0]: 'short distance (S)'
        Fibre Channel Technology[0]: 'Electrical inter-enclosure (EL)'
        Fibre Channel Technology[1]: 'Electrical intra-enclosure (EL)'
        SFP+ Cable Technology[0]: 'Passive Cable'
        Fibre Channel Transmission Media[0]: 'Twin Axial Pair (TW)'
        Fibre Channel Speed[0]: '100 MBytes/sec'
        Fibre Channel Speed[1]: '200 MBytes/sec'
        Fibre Channel Speed[2]: '400 MBytes/sec'
        Fibre Channel Speed[3]: '800 MBytes/sec'
        Fibre Channel Speed[4]: '1200 MBytes/sec'
        Encoding: 'Unspecified'
        BR, nominal: '10300 MBd'
        Length Copper: '3 m'
        Vendor: 'Siemon'
        OUI[0]: 0
        OUI[1]: 30
        OUI[2]: 98
        Part Number: 'SFPP30-03'
        Revision: 'F'
        Passive Cable Specification Compliance[0]: 'Compliant to SFF-8431 Appendix E'
        Serial Number: '15264240525B30'
        8472 Compliance: 'Not compliant'
i40e3: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
        Identifier: 'SFP/SFP+/SFP28'
        Extended Identifier: 4
        Connector: 'No separable connector'
        Infiniband Compliance Codes[0]: '1X Copper Passive'
        Fibre Channel Technology[0]: 'Electrical intra-enclosure (EL)'
        SFP+ Cable Technology[0]: 'Passive Cable'
        Encoding: '64B/66B'
        BR, maximum: '25750 MBd'
        BR, minimum: '0 MBd'
        Length Copper: '3 m'
        Vendor: 'Amphenol'
        OUI[0]: 120
        OUI[1]: 167
        OUI[2]: 20
        Part Number: 'NDCCGF-C103'
        Revision: 'A'
        Passive Cable Specification Compliance[0]: 'Compliant to SFF-8431 Appendix E'
        Passive Cable Specification Compliance[1]: 'Compliant to FC-PI-4 Appendix H'
        Serial Number: 'APF17191030RB4'
        Date Code: '170513'
        8472 Compliance: 'Rev 12.0'
[root@ivy ~]# /usr/lib/fm/fmd/fmtopo -V *transceiver*
TIME                 UUID
Feb 21 16:45:55 c555002f-5b6c-c16f-a7db-df43e60078f2

hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=7503528DCH7K:part=ABCU-5710RZ-FT2/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=0/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=7503528DCH7K:part=ABCU-5710RZ-FT2/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=0/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=7503528DCH7K:part=ABCU-5710RZ-FT2/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=0/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X9SCL-X9SCM
    chassis-id        string    0123456789
    server-id         string    ivy
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true
  group: sff-transceiver                version: 1   stability: Private/Private
    vendor            string    AVAGO
    part-number       string    ABCU-5710RZ-FT2
    serial-number     string    7503528DCH7K

hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=AKR0EQ0:part=FTLX8571D3BCV-IT:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=1/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=AKR0EQ0:part=FTLX8571D3BCV-IT:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=1/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=AKR0EQ0:part=FTLX8571D3BCV-IT:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=1/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X9SCL-X9SCM
    chassis-id        string    0123456789
    server-id         string    ivy
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true
  group: sff-transceiver                version: 1   stability: Private/Private
    vendor            string    Intel Corp
    part-number       string    FTLX8571D3BCV-IT
    revision          string    A
    serial-number     string    AKR0EQ0

hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=15264240525B30:part=SFPP30-03:revision=F/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=2/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=15264240525B30:part=SFPP30-03:revision=F/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=2/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=15264240525B30:part=SFPP30-03:revision=F/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=2/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X9SCL-X9SCM
    chassis-id        string    0123456789
    server-id         string    ivy
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true
  group: sff-transceiver                version: 1   stability: Private/Private
    vendor            string    Siemon
    part-number       string    SFPP30-03
    revision          string    F
    serial-number     string    15264240525B30

hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=APF17191030RB4:part=NDCCGF-C103:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=3/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=APF17191030RB4:part=NDCCGF-C103:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=3/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X9SCL-X9SCM:server-id=ivy:chassis-id=0123456789:serial=APF17191030RB4:part=NDCCGF-C103:revision=A/motherboard=0/hostbridge=1/pciexrc=1/pciexbus=2/pciexdev=0/pciexfn=3/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X9SCL-X9SCM
    chassis-id        string    0123456789
    server-id         string    ivy
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true
  group: sff-transceiver                version: 1   stability: Private/Private
    vendor            string    Amphenol
    part-number       string    NDCCGF-C103
    revision          string    A
    serial-number     string    APF17191030RB4

In comparison, on older parts:

[root@haswell ~]# /usr/lib/dl/dltraninfo 
i40e0: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: no
i40e1: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
i40e2: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
i40e3: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
[root@haswell ~]# /usr/lib/dl/dltraninfo -v
i40e0: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: no
failed to read transceiver page 0xa0: Operation not supported
i40e1: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
failed to read transceiver page 0xa0: Operation not supported
i40e2: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
failed to read transceiver page 0xa0: Operation not supported
i40e3: discovered 1 transceiver
        transceiver 0 present: yes
        transceiver 0 usable: yes
failed to read transceiver page 0xa0: Operation not supported
[root@haswell ~]# /usr/lib/fm/fmd/fmtopo -V *transceiver*
TIME                 UUID
Feb 21 16:53:02 9b27a294-ef33-47ce-b7e7-d92f52005398

hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=0/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=0/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=0/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X10SLM+-LN4F
    chassis-id        string    0123456789
    server-id         string    haswell
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    false

hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=1/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=1/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=1/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X10SLM+-LN4F
    chassis-id        string    0123456789
    server-id         string    haswell
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true

hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=2/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=2/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=2/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X10SLM+-LN4F
    chassis-id        string    0123456789
    server-id         string    haswell
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true

hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=3/port=0/transceiver=0
  group: protocol                       version: 1   stability: Private/Private
    resource          fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=3/port=0/transceiver=0
    FRU               fmri      hc://:product-id=X10SLM+-LN4F:server-id=haswell:chassis-id=0123456789/motherboard=0/hostbridge=0/pciexrc=0/pciexbus=1/pciexdev=0/pciexfn=3/port=0/transceiver=0
  group: authority                      version: 1   stability: Private/Private
    product-id        string    X10SLM+-LN4F
    chassis-id        string    0123456789
    server-id         string    haswell
  group: transceiver                    version: 1   stability: Private/Private
    type              string    sff
    usable            string    true
Actions #1

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed

git commit 286d309c80aad9eac1fdbcb0388ed194d995d837

commit  286d309c80aad9eac1fdbcb0388ed194d995d837
Author: Robert Mustacchi <rm@joyent.com>
Date:   2018-09-13T22:12:11.000Z

    9805 i40e should read SFP data when firmware supports it
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Reviewed by: Dale Ghent <dale.ghent@joyent.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF