-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'opencomputeproject:master' into master
- Loading branch information
Showing
13 changed files
with
1,243 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
![](media/image1.png){width="4.231944444444444in" height="5.34375in"} | ||
|
||
----------------------------------------------------------------------- | ||
|
||
----------------------------------------------------------------------- | ||
|
||
Switch Abstraction Interface | ||
|
||
Change Proposal | ||
|
||
----------------------------------------------------------------------------- | ||
**Title** **Cable Diagnostics Proposal** | ||
----------------- ----------------------------------------------------------- | ||
**Authors** **Broadcom Inc** | ||
|
||
**Status** **In Review** | ||
|
||
**Type** **Standards Track** | ||
|
||
**Created** **10/06/2023** | ||
|
||
**SAI-Version** **V0.0** | ||
----------------------------------------------------------------------------- | ||
|
||
1 Overview [3](#overview) | ||
|
||
2 Cable diagnostics Use Case [3](#cable-diagnostics-use-case) | ||
|
||
3 Attribute Specification [4](#attribute-specification) | ||
|
||
3.1 Changes in file saiport.h [4](#changes-in-file-saiport.h) | ||
|
||
4 Examples [5](#examples) | ||
|
||
4.1 Cable Diagnostics Usage [5](#cable-diagnostics-usage) | ||
|
||
# Overview | ||
|
||
When a link is up and operating normally with adequate bit error | ||
performance, there is no need for any diagnostic either on the | ||
digital/analog portion of the link or on the cable connecting the link. | ||
However, the characteristics of the problems associated with a cable | ||
become of paramount concern when a link cannot be established or is | ||
performing poorly. | ||
|
||
Enhanced Cable Diagnostics (ECD) provides with intelligent | ||
pre-processing and post-processing algorithm inside HW that can be | ||
initiated at any time by setting specific register bits and then reading | ||
the results. | ||
|
||
# Cable diagnostics Use Case | ||
|
||
# Attribute Specification | ||
|
||
## Changes in file saiport.h | ||
|
||
/\* Data Types \*/ | ||
|
||
/\*\* | ||
|
||
\* \@brief Attribute data for #SAI_PORT_ATTR_CABLE_PAIR_STATE | ||
|
||
\* Copper cable pair states | ||
|
||
\*/ | ||
|
||
typedef enum \_sai_port_cable_pair_state_t | ||
|
||
{ | ||
|
||
/\*\* Cable pair state is good \*/ | ||
|
||
SAI_PORT_CABLE_PAIR_STATE_OK, | ||
|
||
/\*\* The MDI Cable pair state open \*/ | ||
|
||
SAI_PORT_CABLE_PAIR_STATE_OPEN, | ||
|
||
/\*\* The MDI Cable pair state short (intra-short) \*/ | ||
|
||
SAI_PORT_CABLE_PAIR_STATE_SHORT, | ||
|
||
/\*\* The MDI Cable pair state is shorted with another pair | ||
(inter-short) cross talk \*/ | ||
|
||
SAI_PORT_CABLE_PAIR_STATE_CROSSTALK, | ||
|
||
/\*\* Cable state unknown \*/ | ||
|
||
SAI_PORT_CABLE_PAIR_STATE_UNKNOWN | ||
|
||
} sai_port_cable_pair_state_t; | ||
|
||
/\*\* | ||
|
||
\* \@brief Attribute data for #SAI_PORT_ATTR_CABLE_TYPE | ||
|
||
\* Copper cable types | ||
|
||
\*/ | ||
|
||
typedef enum \_sai_port_cable_type_t | ||
|
||
{ | ||
|
||
/\*\* Cable type Unknown \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_UNKNOWN, | ||
|
||
/\*\* Cable type CAT5 \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_CAT5, | ||
|
||
/\*\* Cable type CAT5E \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_CAT5E, | ||
|
||
/\*\* Cable type CAT6 \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_CAT6, | ||
|
||
/\*\* Cable type CAT6A \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_CAT6A, | ||
|
||
/\*\* Cable type CAT7 \*/ | ||
|
||
SAI_PORT_CABLE_TYPE_CAT7 | ||
|
||
} sai_port_cable_type_t; | ||
|
||
/\* Port Attribute \*/ | ||
|
||
/\*\* | ||
|
||
\* \@brief Read ethernet copper cable pair status. | ||
|
||
\* | ||
|
||
\* Returns pair states sequentially from list index 0 to n (n = number | ||
of pairs - 1) | ||
|
||
\* value of n depends on number of pairs in twisted ethernet copper | ||
cable | ||
|
||
\* Cable diagnostics triggers ECD once cable pair states is requested, | ||
it is synchronous call. | ||
|
||
\* | ||
|
||
\* \@type sai_s32_list_t sai_port_cable_pair_state_t | ||
|
||
\* \@flags READ_ONLY | ||
|
||
\*/ | ||
|
||
SAI_PORT_ATTR_CABLE_PAIR_STATE, | ||
|
||
/\*\* | ||
|
||
\* \@brief Get ethernet copper cable pair length (unit meter) | ||
|
||
\* | ||
|
||
\* Returns ethernet cable pair length sequentially from list index 0 to | ||
n (n = number of pairs - 1) | ||
|
||
\* value of n depends on number of pairs in twisted ethernet copper | ||
cable | ||
|
||
\* Cable diagnostics runs once cable pair length is requested, it is | ||
synchronous call. | ||
|
||
\* | ||
|
||
\* \@type sai_s32_list_t | ||
|
||
\* \@flags READ_ONLY | ||
|
||
\*/ | ||
|
||
SAI_PORT_ATTR_CABLE_PAIR_LENGTH, | ||
|
||
/\*\* | ||
|
||
\* \@brief Configure ethernet copper cable type to check the cable | ||
status | ||
|
||
\* | ||
|
||
\* \@type sai_port_cable_type_t | ||
|
||
\* \@flags CREATE_AND_SET | ||
|
||
\* \@default SAI_PORT_CABLE_TYPE_UNKNOWN | ||
|
||
\* \@validonly SAI_PORT_ATTR_MEDIA_TYPE == SAI_PORT_MEDIA_TYPE_COPPER | ||
|
||
\*/ | ||
|
||
SAI_PORT_ATTR_CABLE_TYPE, | ||
|
||
# Examples | ||
|
||
## Cable Diagnostics Usage | ||
|
||
sai_attr_set\[0\].id = SAI_PORT_ATTR_CABLE_TYPE; | ||
|
||
sai_attr_set\[0\].value.s32 = SAI_PORT_CABLE_TYPE_CAT6; | ||
|
||
. | ||
|
||
. | ||
|
||
ret = create_port(&phy_2_system_port_id_0, phy_2_switch_id, 2, | ||
This comment has been minimized.
Sorry, something went wrong. |
||
sai_attr_set); | ||
|
||
**or** | ||
|
||
Cable type can be set latter using set port attribute function. | ||
|
||
**set_port_attribute(**phy_2_system_port_id_0**, &sai_attr_set);** | ||
|
||
**Cable pair status and cable length is read only attribute, can be | ||
called anytime.** | ||
|
||
sai_attr_get.id = SAI_PORT_ATTR_CABLE_PAIR_STATE; | ||
|
||
ret = get_port_attribute(phy_2_system_port_id_0,1, &sai_attr_get); | ||
|
||
**Note:** Please note that cable diagnostics is debug feature it puts | ||
chip in debug mode user needs to re-configure the mode and | ||
auto-negotiation after cable pair status and cable length attribute is | ||
requested to work in normal mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
@prafull-brcm It is better to say something like "assume the sai port has been created with port_oid_0. The current description may lead to a wrong impression that user has to create port every time before does TDR test. In real use case, port is always created long before TDR test.