-
Notifications
You must be signed in to change notification settings - Fork 475
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
Cable diagnostics attribute added #1894
Conversation
Signed-off-by: Prafull Singh <56103377+prafull-brcm@users.noreply.github.com>
please fix build errors |
Signed-off-by: Prafull Singh <56103377+prafull-brcm@users.noreply.github.com>
d105ab4
to
2f0f3b2
Compare
Fixed |
please add description of this PR with motivation, thanks. |
e2f385c
to
e2512cf
Compare
Proposal document. |
@jiahua-wang , @prafull-brcm ,
|
|
@lguohan |
Signed-off-by: Prafull Singh <56103377+prafull-brcm@users.noreply.github.com>
become of paramount concern when a link cannot be established or is | ||
performing poorly. | ||
|
||
Enhanced Cable Diagnostics (ECD) provides with intelligent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prafull-brcm where is ECD implemented on the hardware? On the ASIC? Serdes core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor ECD is implemented inside the PHY chip HW.
* @brief Attribute data for #SAI_PORT_ATTR_CABLE_TYPE | ||
* Copper cable types | ||
*/ | ||
typedef enum _sai_port_cable_type_t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prafull-brcm how does the platform detect cable type of the plugged DAC cable? From the cable eeprom? i could not find this in any SFF spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor Cable type information need to be provided by the user, it is not automatically detected. If no information is provided it takes cable type as Unknown.
* @type sai_s32_list_t | ||
* @flags READ_ONLY | ||
*/ | ||
SAI_PORT_ATTR_CABLE_PAIR_LENGTH, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prafull-brcm is it the length of the DAC/copper cable? If not, what exactly is this length indicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor It indicates copper cable length for example twisted wire pairs, coaxial cables with tolerance of +-1meter
The primary purpose of this is to bring in support for compiling on Debian Bookworm. This brings in the following changes: * Update the Doxyfile for doxygen in Debian Bookworm (opencomputeproject/SAI#1946) * Enable sai_uint16_t in ProcessStructValueType Struct Member (opencomputeproject/SAI#1949) * [meta] Add support for port stat extensions (opencomputeproject/SAI#1947) * [meta] Add custom range start end values check (opencomputeproject/SAI#1945) * Cable diagnostics attribute added (opencomputeproject/SAI#1894) * Add attributes to disable L3 rewrites (opencomputeproject/SAI#1924) * Add MAC remote loopback to the port loopback enums. (opencomputeproject/SAI#1934) * [TAM] Granular counter subscription (opencomputeproject/SAI#1670) Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Cable diagnostics is required when 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. Signed-off-by: Prafull Singh <56103377+prafull-brcm@users.noreply.github.com>
Cable diagnostics is required when 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.
Usage of the attribute:
sai_attr_set[0].id = SAI_PORT_ATTR_CABLE_TYPE;
sai_attr_set[0].value.s32 = SAI_PORT_CABLE_TYPE_CAT6;
ret = create_port(&port_id_0, phy_2_switch_id, 2, sai_attr_set);
or Cable type can be set latter also using set port attribute function if port is already created.
sai_attr_set.id = SAI_PORT_ATTR_CABLE_TYPE;
sai_attr_set.value.s32 = SAI_PORT_CABLE_TYPE_CAT6;
set_port_attribute(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(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.