HL ANLT Functions

The following high-level functions are for auto-negotiation and link training.

Start/Stop ANLT

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)[source]

Changed in version 2.5.

Start ANLT on a port

Parameters:
  • port (GenericL23Port) – the port object

  • should_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_stop(port)[source]

Changed in version 2.5.

Stop AN & LT

Parameters:

port (GenericL23Port) – the port object

ANLT Auto-Restart

This command manages the auto-restart features.

Parameters:
  • port (GenericL23Port) – the port object

  • restart_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

ANLT Status and Log

async anlt_status(port)[source]

Changed in version 2.5.

Get the overview of ANLT status

Parameters:

port (GenericL23Port) – the port object

Returns:

AN/LT status of the port

Return type:

Dict[str, Any]

async anlt_log(port)[source]

Get the anlt log messages

Parameters:

port (GenericL23Port) – the port object

Returns:

AN/LT protocol log traces of the port

Return type:

str

async anlt_log_control(port, types)[source]

Control what should be logged for ANLT by xenaserver

Parameters:
  • port (GenericL23Port) – the port object

  • types (t.List[enums.AnLtLogControl]) – control what should be logged for ANLT by xenaserver

Returns:

Return type:

None

ANLT Strict Mode

async anlt_strict(port, enable)[source]

Should ANLT strict mode be enabled

Parameters:
  • port (GenericL23Port) – the port object

  • enable (bool) – should ANLT strict mode be enabled

Returns:

Return type:

None