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

Support reading/writing module EEPROM data by page and offset #3008

Merged
merged 19 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 11 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
80 changes: 69 additions & 11 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@
* [MACsec config command](#macsec-config-command)
* [MACsec show command](#macsec-show-command)
* [MACsec clear command](#macsec-clear-command)
* [SFP Utilities Commands](#sfp-utilities-commands)
* [SFP Utilities read command](#sfp-utilities-read-command)
* [SFP Utilities write command](#sfp-utilities-write-command)
* [Static DNS Commands](#static-dns-commands)
* [Static DNS config command](#static-dns-config-command)
* [Static DNS show command](#static-dns-show-command)
Expand Down Expand Up @@ -557,7 +560,7 @@ This command displays the current date and time configured on the system
```

**config clock date**

This command will set the date-time of the systetm, given strings with date-time format <YYYY-MM-DD> <HH:MM:SS>

- Usage:
Expand All @@ -575,7 +578,7 @@ This command will set the date-time of the systetm, given strings with date-time
```

**config clock timezone**
Junchao-Mellanox marked this conversation as resolved.
Show resolved Hide resolved

This command will set the timezone of the systetm, given a string of a valid timezone.

- Usage:
Expand All @@ -585,13 +588,13 @@ This command will set the timezone of the systetm, given a string of a valid tim

- Parameters:
- _timezone_: valid timezone to be configured


- Example:
```
admin@sonic:~$ config clock timezone Africa/Accra


**show clock timezones**

This command Will display list of all valid timezones to be configured.
Expand Down Expand Up @@ -2568,7 +2571,7 @@ Once enabled, BGP will not advertise routes which aren't yet offloaded.
admin@sonic:~$ sudo config suppress-fib-pending enabled
```
```
admin@sonic:~$ sudo config suppress-fib-pending disabled
admin@sonic:~$ sudo config suppress-fib-pending disabled
```

Go Back To [Beginning of the document](#) or [Beginning of this section](#bgp)
Expand Down Expand Up @@ -2848,7 +2851,7 @@ This command is used for downloading firmware tp upgrade the transciever module.
```
**sfputil firmware run**

This command is used to start and run a downloaded image. This command transfers control from the currently running firmware to a new firmware.
This command is used to start and run a downloaded image. This command transfers control from the currently running firmware to a new firmware.

- Usage:
```
Expand All @@ -2873,7 +2876,7 @@ This command is used to start and run a downloaded image. This command transfers

**sfputil firmware commit**

This command to commit the running image so that the module will boot from it on future boots.
This command to commit the running image so that the module will boot from it on future boots.

- Usage:
```
Expand Down Expand Up @@ -4594,7 +4597,7 @@ This command is to display the FEC status of the selected interfaces. If **inter
show interfaces fec status [<interface_name>]
```

- Example:
- Example:
```
admin@sonic:~$ show interfaces fec status
Interface FEC Oper FEC Admin
Expand Down Expand Up @@ -6846,7 +6849,7 @@ in order to detemine whether the health of the cable is Ok
the following are checked
- the vendor name is correct able to be read
- the FW is correctly loaded for SerDes by reading the appropriate register val
- the Counters for UART are displaying healthy status
- the Counters for UART are displaying healthy status
i.e Error Counters , retry Counters for UART or internal xfer protocols are below a threshold


Expand Down Expand Up @@ -6902,7 +6905,7 @@ the result will be displayed like this, each item in the dictionary shows the he
{
"uart_stat1": "2",
"uart_stat2": "1",

}
```

Expand Down Expand Up @@ -12793,6 +12796,61 @@ Clear MACsec counters which is to reset all MACsec counters to ZERO.

Go Back To [Beginning of the document](#) or [Beginning of this section](#macsec-commands)

# SFP Utilities Commands

This sub-section explains the list of commands available for SFP utilities feature.

# SFP Utilities read command

- Read SFP EEPROM data

```
admin@sonic:~$ sfputil read-eeprom --help
Usage: sfputil read-eeprom [OPTIONS] <port_name> <page> <offset> <size>
Read SFP EEPROM data
Options:
--no-format Display non formatted data.
--wire-addr Wire address of sff8472.
--help Show this
```

```
admin@sonic:~$ sfputil read-eeprom Ethernet0 0 100 2
00000064 4a 44 |..|

admin@sonic:~$ sfputil read-eeprom Ethernet0 0 0 32
00000000 11 08 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

admin@sonic:~$ sfputil read-eeprom Ethernet0 0 100 2 --no-format
4a44
```

# SFP Utilities write command

- Write SFP EEPROM data

```
admin@sonic:~$ sfputil write-eeprom --help
Usage: sfputil write-eeprom [OPTIONS] <port> <page> <offset> <data>

Write SFP EEPROM data

Options:
--wire-addr Wire address of sff8472.
--verify Verify the data by reading back.
--help Show this message and exit.
```

```
admin@sonic:~$ sfputil write-eeprom Ethernet0 0 100 4a44

admin@sonic:~$ sfputil write-eeprom Etherent0 0 100 4a44 --verify
Error: Write data failed! Write: 4a44, read: 0000.
Junchao-Mellanox marked this conversation as resolved.
Show resolved Hide resolved
```

Go Back To [Beginning of the document](#) or [Beginning of this section](#sfp-utilities-commands)

# Static DNS Commands

This sub-section explains the list of the configuration options available for static DNS feature.
Expand Down
Loading
Loading