Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Seastone] fix QSFP no change event issue for Seastone #13776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qnos
Copy link
Contributor

@qnos qnos commented Feb 10, 2023

Why I did it

Fix issue #13581, QSFP remove/insert change events not deteted for seastone

How I did it

Change to use polling mode to retrieve SFP insert/remove change event,
due to no SFP abs intr signal from CPLD.

How to verify it

After the fix, run 'show interfaces transceiver presence' and 'show interfaces transceiver eeprom'
can show the correct SFP info.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Why I did it
Fix issue sonic-net#13581, QSFP remove/insert change events not deteted for seastone

How I did it
Change to use polling mode to retrieve SFP insert/remove change event,
due to no SFP abs intr signal from CPLD.

How to verify it
After the fix, run 'show interfaces transceiver presence' and 'show interfaces transceiver eeprom'
can show the correct SFP info.

Signed-off-by: Eric Zhu <erzhu@celestica.com>
Copy link
Contributor

@li-pingmao li-pingmao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Seastone, works for optics, but not for DAC, maybe a new PR for DAC.

from .helper import APIHelper
from sonic_py_common.logger import Logger
except ImportError as e:
raise ImportError(repr(e) + " - required module not found")


QSFP_MODPRS_IRQ = '/sys/devices/platform/dx010_cpld/qsfp_modprs_irq'
GPIO_SUS6 = "/sys/devices/platform/slx-ich.0/sci_int_gpio_sus6"
QSFP_EVENT_POLLING_MODE = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always use polling mode for seastones?

@qnos
Copy link
Contributor Author

qnos commented Jun 2, 2023

Tested on Seastone, works for optics, but not for DAC, maybe a new PR for DAC.

It's not true. It works for DAC. The downside is that it's not that fast to sync the status into DB.

admin@sonic:~$ show interfaces transceiver presence
Port         Presence
-----------  -----------
Ethernet0    Present
Ethernet4    Not present
Ethernet8    Present
Ethernet12   Present
Ethernet16   Present
Ethernet20   Not present
Ethernet24   Not present
Ethernet28   Not present
Ethernet32   Not present
Ethernet36   Not present
Ethernet40   Present
Ethernet44   Not present
Ethernet48   Not present
Ethernet52   Not present
Ethernet56   Not present
Ethernet60   Not present
Ethernet64   Present
Ethernet68   Not present
Ethernet72   Not present
Ethernet76   Not present
Ethernet80   Not present
Ethernet84   Not present
Ethernet88   Not present
Ethernet92   Not present
Ethernet96   Not present
Ethernet100  Not present
Ethernet104  Not present
Ethernet108  Not present
Ethernet112  Not present
Ethernet116  Not present
Ethernet120  Not present
Ethernet124  Not present
admin@sonic:~$
admin@sonic:~$ show interface status
  Interface            Lanes    Speed    MTU    FEC    Alias    Vlan    Oper    Admin             Type    Asym PFC
-----------  ---------------  -------  -----  -----  -------  ------  ------  -------  ---------------  ----------
  Ethernet0      65,66,67,68     100G   9100    N/A   Eth1/1  routed      up       up  QSFP28 or later         N/A
  Ethernet4      69,70,71,72     100G   9100    N/A   Eth2/1  routed    down       up              N/A         N/A
  Ethernet8      73,74,75,76     100G   9100    N/A   Eth3/1  routed      up       up  QSFP28 or later         N/A
 Ethernet12      77,78,79,80     100G   9100    N/A   Eth4/1  routed      up       up  QSFP28 or later         N/A
 Ethernet16      33,34,35,36     100G   9100    N/A   Eth5/1  routed      up       up  QSFP28 or later         N/A
 Ethernet20      37,38,39,40     100G   9100    N/A   Eth6/1  routed    down       up              N/A         N/A
 Ethernet24      41,42,43,44     100G   9100    N/A   Eth7/1  routed    down       up              N/A         N/A
 Ethernet28      45,46,47,48     100G   9100    N/A   Eth8/1  routed    down       up              N/A         N/A
 Ethernet32      49,50,51,52     100G   9100    N/A   Eth9/1  routed    down       up              N/A         N/A
 Ethernet36      53,54,55,56     100G   9100    N/A  Eth10/1  routed    down       up              N/A         N/A
 Ethernet40      57,58,59,60     100G   9100    N/A  Eth11/1  routed      up       up  QSFP28 or later         N/A
 Ethernet44      61,62,63,64     100G   9100    N/A  Eth12/1  routed    down       up              N/A         N/A
 Ethernet48      81,82,83,84     100G   9100    N/A  Eth13/1  routed    down       up              N/A         N/A
 Ethernet52      85,86,87,88     100G   9100    N/A  Eth14/1  routed    down       up              N/A         N/A
 Ethernet56      89,90,91,92     100G   9100    N/A  Eth15/1  routed    down       up              N/A         N/A
 Ethernet60      93,94,95,96     100G   9100    N/A  Eth16/1  routed    down       up              N/A         N/A
 Ethernet64     97,98,99,100     100G   9100    N/A  Eth17/1  routed      up       up  QSFP28 or later         N/A
 Ethernet68  101,102,103,104     100G   9100    N/A  Eth18/1  routed    down       up              N/A         N/A
 Ethernet72  105,106,107,108     100G   9100    N/A  Eth19/1  routed    down       up              N/A         N/A
 Ethernet76  109,110,111,112     100G   9100    N/A  Eth20/1  routed    down       up              N/A         N/A
 Ethernet80          1,2,3,4     100G   9100    N/A  Eth21/1  routed    down       up              N/A         N/A
 Ethernet84          5,6,7,8     100G   9100    N/A  Eth22/1  routed    down       up              N/A         N/A
 Ethernet88       9,10,11,12     100G   9100    N/A  Eth23/1  routed    down       up              N/A         N/A
 Ethernet92      13,14,15,16     100G   9100    N/A  Eth24/1  routed    down       up              N/A         N/A
 Ethernet96      17,18,19,20     100G   9100    N/A  Eth25/1  routed    down       up              N/A         N/A
Ethernet100      21,22,23,24     100G   9100    N/A  Eth26/1  routed    down       up              N/A         N/A
Ethernet104      25,26,27,28     100G   9100    N/A  Eth27/1  routed    down       up              N/A         N/A
Ethernet108      29,30,31,32     100G   9100    N/A  Eth28/1  routed    down       up              N/A         N/A
Ethernet112  113,114,115,116     100G   9100    N/A  Eth29/1  routed    down       up              N/A         N/A
Ethernet116  117,118,119,120     100G   9100    N/A  Eth30/1  routed    down       up              N/A         N/A
Ethernet120  121,122,123,124     100G   9100    N/A  Eth31/1  routed    down       up              N/A         N/A
Ethernet124  125,126,127,128     100G   9100    N/A  Eth32/1  routed    down       up              N/A         N/A
admin@sonic:~$ show interfaces transceiver eeprom
Ethernet0: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: 64B/66B
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Extended
                Extended Specification Compliance: 100GBASE-CR4, 25GBASE-CR CA-25G-L or 50GBASE-CR2 with RS
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Unknown
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2019-09-14
        Vendor Name: Amphenol
        Vendor OUI: 78-a7-14
        Vendor PN: NDAAFT-F312
        Vendor Rev: D
        Vendor SN: APF1937312431U

Ethernet4: SFP EEPROM Not detected

Ethernet8: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Unknown
                Extended Specification Compliance: 25GBASE-CR CA-25G-N or 50GBASE-CR2 with no FEC
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Twin Axial Pair (TW)
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2019-09-04
        Vendor Name: LUXSHARE-ICT
        Vendor OUI: 3c-18-a0
        Vendor PN: L0BQF105-SD-R
        Vendor Rev: A
        Vendor SN: 0BQF1059940007

Ethernet12: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Unknown
                Extended Specification Compliance: 25GBASE-CR CA-25G-N or 50GBASE-CR2 with no FEC
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Twin Axial Pair (TW)
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2019-09-04
        Vendor Name: LUXSHARE-ICT
        Vendor OUI: 3c-18-a0
        Vendor PN: L0BQF105-SD-R
        Vendor Rev: A
        Vendor SN: 0BQF1059940007

Ethernet16: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: 64B/66B
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Extended
                Extended Specification Compliance: 100GBASE-CR4, 25GBASE-CR CA-25G-L or 50GBASE-CR2 with RS
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Unknown
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2019-09-14
        Vendor Name: Amphenol
        Vendor OUI: 78-a7-14
        Vendor PN: NDAAFT-F312
        Vendor Rev: D
        Vendor SN: APF1937312431U

Ethernet20: SFP EEPROM Not detected

Ethernet24: SFP EEPROM Not detected

Ethernet28: SFP EEPROM Not detected

Ethernet32: SFP EEPROM Not detected

Ethernet36: SFP EEPROM Not detected

Ethernet40: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: PAM4
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Extended
                Extended Specification Compliance: 50GBASE-CR, 100GBASE-CR2, or 200GBASE-CR4
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Unknown
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2020-12-01
        Vendor Name: Molex
        Vendor OUI: 00-09-3a
        Vendor PN: 2058986020
        Vendor Rev: 1
        Vendor SN: 2033622834

Ethernet44: SFP EEPROM Not detected

Ethernet48: SFP EEPROM Not detected

Ethernet52: SFP EEPROM Not detected

Ethernet56: SFP EEPROM Not detected

Ethernet60: SFP EEPROM Not detected

Ethernet64: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: PAM4
        Extended Identifier: Power Class 1 Module (1.5W max.), No CLEI code present in Page 02h, No CDR in TX, No CDR in RX
        Extended RateSelect Compliance: Unknown
        Identifier: QSFP28 or later
        Length Cable Assembly(m): 2.0
        Nominal Bit Rate(100Mbs): 255
        Specification compliance:
                10/40G Ethernet Compliance Code: Extended
                Extended Specification Compliance: 50GBASE-CR, 100GBASE-CR2, or 200GBASE-CR4
                Fibre Channel Link Length: Unknown
                Fibre Channel Speed: Unknown
                Fibre Channel Transmission Media: Unknown
                Fibre Channel Transmitter Technology: Unknown
                Gigabit Ethernet Compliant Codes: Unknown
                SAS/SATA Compliance Codes: Unknown
                SONET Compliance Codes: Unknown
        Vendor Date Code(YYYY-MM-DD Lot): 2020-12-01
        Vendor Name: Molex
        Vendor OUI: 00-09-3a
        Vendor PN: 2058986020
        Vendor Rev: 1
        Vendor SN: 2033622834

Ethernet68: SFP EEPROM Not detected

Ethernet72: SFP EEPROM Not detected

Ethernet76: SFP EEPROM Not detected

Ethernet80: SFP EEPROM Not detected

Ethernet84: SFP EEPROM Not detected

Ethernet88: SFP EEPROM Not detected

Ethernet92: SFP EEPROM Not detected

Ethernet96: SFP EEPROM Not detected

Ethernet100: SFP EEPROM Not detected

Ethernet104: SFP EEPROM Not detected

Ethernet108: SFP EEPROM Not detected

Ethernet112: SFP EEPROM Not detected

Ethernet116: SFP EEPROM Not detected

Ethernet120: SFP EEPROM Not detected

Ethernet124: SFP EEPROM Not detected

@dal00
Copy link

dal00 commented Feb 19, 2024

It's not true. It works for DAC. The downside is that it's not that fast to sync the status into DB.

I have made a PR that helps with speeding up the detection 10x and therefore sync #18041
(Not tested together with this patch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants