[pcied] Honour PCIE_DETACH_INFO on platforms that are not smartswitches

Offen Anfängerfreundlich
#900 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
82/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

Beginne in sonic-pcied/scripts/pcied und prüfe die bedingungslose Einrichtung von PCIE_DETACH_INFO um Zeile 109 sowie die ausschließlich für smartswitch geltende Behandlung um die Zeilen 211-213. Verfolge, wie ein abgetrenntes bus_info das poll-Ergebnis, err und PCIE_DEVICES|status beeinflusst. Als erledigt gilt, wenn absichtlich abgetrennte Geräte auf Plattformen ohne smartswitch berücksichtigt werden, ohne dass status FAILED bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

pcied only consults the PCIE_DETACH_INFO table when the platform is a smartswitch:

https://github.com/sonic-net/sonic-platform-daemons/blob/a9d71d7218e72423b3b993c39cfb07f1cdac8705/sonic-pcied/scripts/pcied#L211-L213

On anything else device_info.is_smartswitch() is False, so the table is never read and a device that has been deliberately detached is reported as missing on every poll:

pcied: PCIe Device: <name> Not Found

err is non-zero as a result, so PCIE_DEVICES|status in STATE_DB stays FAILED for as long as the device is detached, which in turn trips anything watching that field (e.g. loganalyzers in sonic-mgmt tests).

Nothing about the table is smartswitch-specific. pcied creates it unconditionally at startup:

https://github.com/sonic-net/sonic-platform-daemons/blob/a9d71d7218e72423b3b993c39cfb07f1cdac8705/sonic-pcied/scripts/pcied#L109

and its contract is just "this bus_info is expected to be absent right now". Smartswitches are simply the first consumer; a fixed-form switch that detaches a PCIe device to upgrade it in service (an FPGA or a retimer, say) has exactly the same need and no way to express it.

pcied should honour PCIE_DETACH_INFO regardless of platform type.

Vorherrschende Sprache
Python
Sterne
38
Forks
236
Ø Merge
3 T. 18 Std.
Gemergte PRs (30 T.)
5

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sonic-net/sonic-platform-daemons

Alle Issues in sonic-net/sonic-platform-daemons

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.