8.1.2. Auto-Negotiation and Link Training
The following high-level functions are for auto-negotiation and link training.
8.1.2.1. HL ANLT Functions
- async anlt_start(port, should_do_an, should_do_lt, an_allow_loopback, lt_preset0, lt_initial_modulations, should_lt_interactive, lt_algorithm, should_enable_lt_timeout)
Changed in version 2.5.
Start ANLT on a port
- Parameters:
port (
GenericL23Port
) – the port objectshould_do_an (bool) – should the port do autoneg?
should_do_lt (bool) – should the port do link training?
an_allow_loopback (bool) – should the autoneg allow loopback?
lt_preset0 (enums.FreyaOutOfSyncPreset) – out-of-sync tap values (preset 0): existing or standard
lt_initial_modulations (Dict[str, enums.LinkTrainEncoding]) – the initial modulations of each serdes
should_lt_interactive (bool) – should perform link training manually?
lt_algorithm (Dict[str, enums.LinkTrainAlgorithm]) – Link training algorithm to use
should_enable_lt_timeout (bool) – should run link training with timeout?
- async anlt_link_recovery(port, restart_link_down, restart_lt_failure)
This command manages the auto-restart features.
- Parameters:
port (
GenericL23Port
) – the port objectrestart_link_down (bool) – enable AN+LT auto-restart when a link down condition is detected. A “link down” state signifies the loss of a valid input signal, which can occur due to events such as cable unplugging and re-plugging, TX disable, or link flap on the link partner’s end. The auto-restart process will continue until the link is re-established. Please note that this setting is only effective when AN and/or LT are enabled.
restart_lt_failure (bool) – if LT is enabled and experiences a failure on either side, the port will initiate the AN+LT restart process repeatedly until LT succeeds. This functionality is only applicable when LT is enabled.
- Returns:
- Return type:
None
- async anlt_status(port)
Changed in version 2.5.
Get the overview of ANLT status
- async anlt_stop(port)
Changed in version 2.5.
Stop AN & LT
- Parameters:
port (
GenericL23Port
) – the port object
- async anlt_log(port)
Added in version 1.1.
Get the anlt log messages
- Parameters:
port (
GenericL23Port
) – the port object- Returns:
AN/LT protocol log traces of the port
- Return type:
- async anlt_strict(port, enable)
Added in version 1.3.
Should ANLT strict mode be enabled
- Parameters:
port (
GenericL23Port
) – the port objectenable (bool) – should ANLT strict mode be enabled
- Returns:
- Return type:
None
- async anlt_log_control(port, types)
Added in version 1.3.
Control what should be logged for ANLT by xenaserver
- Parameters:
port (
GenericL23Port
) – the port objecttypes (t.List[enums.AnLtLogControl]) – control what should be logged for ANLT by xenaserver
- Returns:
- Return type:
None
8.1.2.2. HL Auto-Negotiation Functions
8.1.2.3. HL Link Training Functions
- async lt_coeff_inc(port, serdes, emphasis)
Added in version 1.1.
Ask the remote port to increase coeff of the specified serdes.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
emphasis (enums.LinkTrainCoeffs) – the emphasis to increase
- Returns:
- Return type:
None
- async lt_coeff_dec(port, serdes, emphasis)
Added in version 1.1.
Ask the remote port to decrease coeff of the specified serdes.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
emphasis (enums.LinkTrainCoeffs) – the emphasis to decrease
- Returns:
- Return type:
None
- async lt_coeff_no_eq(port, serdes, emphasis)
Added in version 2.0.
Ask the remote port to set the coeff to NO_EQ on the specified serdes.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
emphasis (enums.LinkTrainCoeffs) – the emphasis to set to NO_EQ
- Returns:
- Return type:
None
- async lt_preset(port, serdes, preset)
Added in version 1.1.
Ask the remote port to use the preset of the specified serdes.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
preset (enums.LinkTrainPresets) – preset index to select for the serdes, 0,1,2,3,4,
- Returns:
- Return type:
None
- async lt_encoding(port, serdes, encoding)
Added in version 1.1.
Ask the remote port to use the encoding of the specified serdes.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
encoding (enums.LinkTrainCoeffs) – link training encoding
- Returns:
- Return type:
None
- async lt_trained(port, serdes)
Added in version 1.1.
Tell the remote port that the current serdes is trained.
- Parameters:
port (
GenericL23Port
) – the port objectserdes (int) – the serdes index, starting from 0
- Returns:
- Return type:
None
- async lt_status(port, serdes)
Changed in version 2.5.
Show the link training status.
- async txtap_get(port, serdes)
Added in version 1.1.
Get the tap value of the local TX tap.
- async txtap_set(port, serdes, pre3, pre2, pre, main, post1)
Added in version 1.1.
Set the tap value of the local TX tap.