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

describe sfp error in a bitmap way #772

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions doc/xrcvd/transceiver-monitor-hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ New Transceiver info table and transceiver DOM sensor table will be added to sta
; Defines Transceiver Status info for a port
key = TRANSCEIVER_STATUS|ifname ; Error information for SFP on port
; field = value
status = 1*255VCHAR ; code of the SFP status (plug in, plug out or error)
status = 1*255VCHAR ; code of the SFP status (plug in, plug out)
error = 1*255VCHAR ; SFP error (N/A or a string like error1 | error2 )


### 1.2 Accessing EEPROM from platform container ###
Expand All @@ -104,7 +105,7 @@ Transceiver EEPROM accessing can be achieved by legacy sfputil.py plugin or new

#### 1.3.1 Transceiver change event ####

Currently 7 transceiver events are defined as below. The first two are for plug in and plug out, others to reflect various error status, vendors can add new error event if they support more.
Currently 7 transceiver events are defined as below.

status='0' SFP removed,
status='1' SFP inserted,
Expand All @@ -114,6 +115,18 @@ Currently 7 transceiver events are defined as below. The first two are for plug
status='5' High Temperature,
status='6' Bad cable.

However, multiple errors could exists at the same time. For example, a module can be unsupported cable and high temperature. The new transceiver event will be described in a bitmap. New transceiver definition below.

bit 32 : 0=SFP removed, 1=SFP inserted,
bit 31 : 0=OK, 1=I2C bus stuck,
bit 30 : 0=OK, 1=Bad eeprom,
bit 29 : 0=OK, 1=Unsupported cable,
bit 28 : 0=OK, 1=High Temperature,
bit 27 : 0=OK, 1=Bad cable.
bit 1~26: reserved. Must be 0.

Vendor can extend this bitmap with more errors. Xcvrd need parse the bitmap and set transceiver status table in DB accordingly. For example, if the transceiver event bit map is 0x7, the status field value should be "1" and the error field value should be "I2C bus stuck | Bad eeprom".

#### 1.3.2 API to get Transceiver change event from platform ####

Xcvrd need to be triggered by transceiver change event to refresh the transceiver info table.
Expand Down