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

Include changes from xcvr_api in transceiver_info table #253

Conversation

qinchuanares
Copy link
Contributor

@qinchuanares qinchuanares commented Apr 6, 2022

This PR intends to include the recent changes made in the following two PRs from sonic-platform-common into transceiver_info table in state_db in xcvrd.py file.

sonic-net/sonic-platform-common#228
sonic-net/sonic-platform-common#235

Description

The update transceiver info can be referenced to the HLD here.

Motivation and Context

The old xcvrd was using sonic-platform-common that does not support CMIS and C-CMIS memory mapping. After we introduce the support for CMIS and C-CMIS memory map in xcvr_api in sonic-platform-common, we want to adopt the changes in xcvrd by starting with updating the transceiver_info table. After update, the new keys in this table include:

  • active_firmware
  • inactive_firmware
  • hardware_rev
  • media_interface_code
  • host_electrical_interface
  • host_lane_count
  • media_lane_count
  • host_lane_assignment_option
  • media_lane_assignment_option
  • active_apsel_hostlane1
  • active_apsel_hostlane2
  • active_apsel_hostlane3
  • active_apsel_hostlane4
  • active_apsel_hostlane5
  • active_apsel_hostlane6
  • active_apsel_hostlane7
  • active_apsel_hostlane8
  • media_interface_technology
  • cmis_rev
  • supported_max_tx_power
  • supported_min_tx_power
  • supported_max_laser_freq
  • supported_min_laser_freq

How Has This Been Tested?

Example of tests in sonic-arista 7060 box. Note: to protect 400ZR vendor-specific information, I removed vendor-related information.

#### Ethernet0:  XXX 400G-ZR module
admin@sonic:~$ redis-cli -n 6 hgetall "TRANSCEIVER_INFO|Ethernet0"
 1) "media_interface_code"
 2) "400ZR, DWDM, amplified"
 3) "encoding"
 4) "N/A"
 5) "serial"
 6) 
 7) "host_lane_assignment_option"
 8) "1"
 9) "vendor_oui"
10) 
11) "host_lane_count"
12) "8"
13) "ext_identifier"
14) "Power Class 8 (20.0W Max)"
15) "nominal_bit_rate"
16) "0"
17) "active_apsel_hostlane1"
18) "1"
19) "model"
20) 
21) "supported_max_laser_freq"
22) "196100"
23) "vendor_rev"
24) 
25) "active_apsel_hostlane2"
26) "1"
27) "active_apsel_hostlane7"
28) "1"
29) "application_advertisement"
30) "{1: {'host_electrical_interface_id': '400GAUI-8 C2M (Annex 120E)', 'module_media_interface_id': '400ZR, DWDM, amplified', 'media_lane_count': 1, 'host_lane_count': 8, 'host_lane_assignment_options': 1}, 2: {'host_electrical_interface_id': '400GAUI-8 C2M (Annex 120E)', 'module_media_interface_id': '400ZR, Single Wavelength, Unamplified', 'media_lane_count': 1, 'host_lane_count': 8, 'host_lane_assignment_options': 1}, 3: {'host_electrical_interface_id': '100GAUI-2 C2M (Annex 135G)', 'module_media_interface_id': '400ZR, DWDM, amplified', 'media_lane_count': 1, 'host_lane_count': 2, 'host_lane_assignment_options': 85}}"
31) "supported_min_tx_power"
32) "-22.9"
33) "active_firmware"
34) 
35) "cable_length"
36) "0.0"
37) "inactive_firmware"
38) 
39) "ext_rateselect_compliance"
40) "N/A"
41) "hardware_rev"
42) 
43) "host_electrical_interface"
44) "400GAUI-8 C2M (Annex 120E)"
45) "supported_max_tx_power"
46) "4.0"
47) "supported_min_laser_freq"
48) "191300"
49) "specification_compliance"
50) "sm_media_interface"
51) "connector"
52) "LC"
53) "active_apsel_hostlane8"
54) "1"
55) "media_interface_technology"
56) "1550 nm DFB"
57) "active_apsel_hostlane5"
58) "1"
59) "media_lane_assignment_option"
60) "1"
61) "cable_type"
62) "Length Cable Assembly(m)"
63) "manufacturer"
64) 
65) "is_replaceable"
66) "True"
67) "type"
68) "QSFP-DD Double Density 8X Pluggable Transceiver"
69) "vendor_date"
70) "2020-21-02 17"
71) "active_apsel_hostlane4"
72) "1"
73) "dom_capability"
74) "N/A"
75) "cmis_rev"
76) "4.1"
77) "active_apsel_hostlane3"
78) "1"
79) "media_lane_count"
80) "1"
81) "active_apsel_hostlane6"
82) "1"

#### Ethernet16:  Molex 400G-DR4 module 
admin@sonic:~$ redis-cli -n 6 hgetall "TRANSCEIVER_INFO|Ethernet16"
 1) "media_interface_code"
 2) "400GBASE-DR4 (Cl 124)"
 3) "encoding"
 4) "N/A"
 5) "serial"
 6) "G21211B3113     "
 7) "host_lane_assignment_option"
 8) "1"
 9) "vendor_oui"
10) "00-09-3a"
11) "host_lane_count"
12) "8"
13) "ext_identifier"
14) "Power Class 6 (12.0W Max)"
15) "nominal_bit_rate"
16) "0"
17) "active_apsel_hostlane1"
18) "1"
19) "model"
20) "1064281000      "
21) "supported_max_laser_freq"
22) "N/A"
23) "vendor_rev"
24) "11"
25) "active_apsel_hostlane2"
26) "1"
27) "active_apsel_hostlane7"
28) "1"
29) "application_advertisement"
30) "{1: {'host_electrical_interface_id': '400GAUI-8 C2M (Annex 120E)', 'module_media_interface_id': '400GBASE-DR4 (Cl 124)', 'media_lane_count': 4, 'host_lane_count': 8, 'host_lane_assignment_options': 1}, 2: {'host_electrical_interface_id': '100GAUI-2 C2M (Annex 135G)', 'module_media_interface_id': '100GBASE-DR (Cl 140)', 'media_lane_count': 1, 'host_lane_count': 2, 'host_lane_assignment_options': 85}}"
31) "supported_min_tx_power"
32) "N/A"
33) "active_firmware"
34) "3.1"
35) "cable_length"
36) "0.0"
37) "inactive_firmware"
38) "3.1"
39) "ext_rateselect_compliance"
40) "N/A"
41) "hardware_rev"
42) "1.1"
43) "host_electrical_interface"
44) "400GAUI-8 C2M (Annex 120E)"
45) "supported_max_tx_power"
46) "N/A"
47) "supported_min_laser_freq"
48) "N/A"
49) "specification_compliance"
50) "sm_media_interface"
51) "connector"
52) "MPO 1x12"
53) "active_apsel_hostlane8"
54) "1"
55) "media_interface_technology"
56) "1310 nm DFB"
57) "active_apsel_hostlane5"
58) "1"
59) "media_lane_assignment_option"
60) "1"
61) "cable_type"
62) "Length Cable Assembly(m)"
63) "manufacturer"
64) "MOLEX           "
65) "is_replaceable"
66) "True"
67) "type"
68) "QSFP-DD Double Density 8X Pluggable Transceiver"
69) "vendor_date"
70) "2021-05-24   "
71) "active_apsel_hostlane4"
72) "1"
73) "dom_capability"
74) "N/A"
75) "cmis_rev"
76) "4.0"
77) "active_apsel_hostlane3"
78) "1"
79) "media_lane_count"
80) "4"
81) "active_apsel_hostlane6"
82) "1"


#### Ethernet160:  YYY 400G-ZR module 
admin@sonic:~$ redis-cli -n 6 hgetall "TRANSCEIVER_INFO|Ethernet160"
 1) "media_interface_code"
 2) "400ZR, DWDM, amplified"
 3) "encoding"
 4) "N/A"
 5) "serial"
 6) 
 7) "host_lane_assignment_option"
 8) "1"
 9) "vendor_oui"
10) 
11) "host_lane_count"
12) "8"
13) "ext_identifier"
14) "Power Class 8 (18.0W Max)"
15) "nominal_bit_rate"
16) "0"
17) "active_apsel_hostlane1"
18) "1"
19) "model"
20) 
21) "supported_max_laser_freq"
22) "196100"
23) "vendor_rev"
24) "01"
25) "active_apsel_hostlane2"
26) "1"
27) "active_apsel_hostlane7"
28) "1"
29) "application_advertisement"
30) "{1: {'host_electrical_interface_id': '400GAUI-8 C2M (Annex 120E)', 'module_media_interface_id': '400ZR, DWDM, amplified', 'media_lane_count': 1, 'host_lane_count': 8, 'host_lane_assignment_options': 1}, 2: {'host_electrical_interface_id': '100GAUI-2 C2M (Annex 135G)', 'module_media_interface_id': '400ZR, DWDM, amplified', 'media_lane_count': 1, 'host_lane_count': 2, 'host_lane_assignment_options': 85}}"
31) "supported_min_tx_power"
32) "-14.0"
33) "active_firmware"
34) 
35) "cable_length"
36) "0.0"
37) "inactive_firmware"
38) 
39) "ext_rateselect_compliance"
40) "N/A"
41) "hardware_rev"
42) 
43) "host_electrical_interface"
44) "400GAUI-8 C2M (Annex 120E)"
45) "supported_max_tx_power"
46) 
47) "supported_min_laser_freq"
48) "191300"
49) "specification_compliance"
50) "sm_media_interface"
51) "connector"
52) "LC"
53) "active_apsel_hostlane8"
54) "1"
55) "media_interface_technology"
56) "C-band tunable laser"
57) "active_apsel_hostlane5"
58) "1"
59) "media_lane_assignment_option"
60) "1"
61) "cable_type"
62) "Length Cable Assembly(m)"
63) "manufacturer"
64)    "
65) "is_replaceable"
66) "True"
67) "type"
68) "QSFP-DD Double Density 8X Pluggable Transceiver"
69) "vendor_date"
70) "2020-10-20 "
71) "active_apsel_hostlane4"
72) "1"
73) "dom_capability"
74) "N/A"
75) "cmis_rev"
76) "5.0"
77) "active_apsel_hostlane3"
78) "1"
79) "media_lane_count"
80) "1"
81) "active_apsel_hostlane6"
82) "1"


#### Ethernet192:  InPhi 100G-DWDM module 
admin@sonic:~$ redis-cli -n 6 hgetall "TRANSCEIVER_INFO|Ethernet192"
 1) "cable_type"
 2) "Length(km)"
 3) "vendor_rev"
 4) "10"
 5) "serial"
 6) "L164200324      "
 7) "encoding"
 8) "PAM4"
 9) "vendor_oui"
10) "00-21-b8"
11) "ext_identifier"
12) "Unknown, No CLEI code present in Page 02h, CDR present in TX, CDR present in RX"
13) "application_advertisement"
14) "N/A"
15) "nominal_bit_rate"
16) "255"
17) "manufacturer"
18) "INPHI CORP      "
19) "type"
20) "QSFP28 or later"
21) "vendor_date"
22) "2017-02-08   "
23) "connector"
24) "LC"
25) "model"
26) "IN-Q2AY2-45-M1  "
27) "specification_compliance"
28) "{'10/40G Ethernet Compliance Code': 'Extended', 'SONET Compliance Codes': 'Unknown', 'SAS/SATA Compliance Codes': 'Unknown', 'Gigabit Ethernet Compliant Codes': 'Unknown', 'Fibre Channel Link Length': 'Unknown', 'Fibre Channel Transmitter Technology': 'Unknown', 'Fibre Channel Transmission Media': 'Unknown', 'Fibre Channel Speed': 'Unknown', 'Extended Specification Compliance': '100GE-DWDM2'}"
29) "is_replaceable"
30) "True"
31) "cable_length"
32) "80.0"
33) "dom_capability"
34) "N/A"
35) "ext_rateselect_compliance"
36) "Unknown"

#### Ethernet224:  Molex 100G-DR module 
admin@sonic:~$ redis-cli -n 6 hgetall "TRANSCEIVER_INFO|Ethernet224"
 1) "cable_type"
 2) "Length(km)"
 3) "vendor_rev"
 4) "11"
 5) "serial"
 6) "G21081R1177     "
 7) "encoding"
 8) "64B/66B"
 9) "vendor_oui"
10) "00-09-3a"
11) "ext_identifier"
12) "Power Class 6 Module (4.5W max.), No CLEI code present in Page 02h, CDR present in TX, CDR present in RX"
13) "application_advertisement"
14) "N/A"
15) "nominal_bit_rate"
16) "255"
17) "manufacturer"
18) "MOLEX           "
19) "type"
20) "QSFP28 or later"
21) "vendor_date"
22) "2021-02-22   "
23) "connector"
24) "LC"
25) "model"
26) "1064273500      "
27) "specification_compliance"
28) "{'10/40G Ethernet Compliance Code': 'Extended', 'SONET Compliance Codes': 'Unknown', 'SAS/SATA Compliance Codes': 'Unknown', 'Gigabit Ethernet Compliant Codes': 'Unknown', 'Fibre Channel Link Length': 'Unknown', 'Fibre Channel Transmitter Technology': 'Unknown', 'Fibre Channel Transmission Media': 'Unknown', 'Fibre Channel Speed': 'Unknown', 'Extended Specification Compliance': '100GBASE-DR'}"
29) "is_replaceable"
30) "True"
31) "cable_length"
32) "1.0"
33) "dom_capability"
34) "N/A"
35) "ext_rateselect_compliance"
36) "Unknown"

Additional Information (Optional)

@prgeor prgeor requested a review from keboliu April 7, 2022 18:31
@prgeor
Copy link
Collaborator

prgeor commented Apr 7, 2022

@aravindmani-1 @keboliu please review

@prgeor
Copy link
Collaborator

prgeor commented Apr 7, 2022

@andywongarista please review

aravindmani-1
aravindmani-1 previously approved these changes Apr 8, 2022
andywongarista
andywongarista previously approved these changes Apr 8, 2022
Copy link
Collaborator

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@qinchuanares I don't see ZR specific info in the table? Am i m missing something?

supported_max_tx_power       = FLOAT                            ; support maximum tx power
supported_min_tx_power       = FLOAT                            ; support minimum tx power
supported_max_laser_freq     = FLOAT                            ; support maximum laser frequency
supported_min_laser_freq     = FLOAT                            ; support minimum laser frequency

sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
@qinchuanares
Copy link
Contributor Author

@qinchuanares I don't see ZR specific info in the table? Am i m missing something?

supported_max_tx_power       = FLOAT                            ; support maximum tx power
supported_min_tx_power       = FLOAT                            ; support minimum tx power
supported_max_laser_freq     = FLOAT                            ; support maximum laser frequency
supported_min_laser_freq     = FLOAT                            ; support minimum laser frequency

Good catch. I fixed it in the next commit.

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

Successfully merging this pull request may close these issues.

4 participants