Open liulk opened 2 weeks ago
cc: @aaronmillisor
cc: @ejbrever
Judging from the fact that https://github.com/openconfig/public/commit/4e0d236b04326c37275ea9d5c621ea51e7d8eeb8 and https://github.com/openconfig/public/commit/b05e0076a8716f4a21dd5029e22fc47d54b7d059 used terminology specific to optical transceivers, my guess is that it was originally only intended for PHY loopback, not MAC.
After #731 and #1034, it added cases where it is possible to mix the configuration of L1 loopback on L2 interfaces or L2 loopback on L1 channels.
ASIC_PHY_LOCAL
and ASIC_PHY_REMOTE
(L1 loopback) on /interfaces/interface/config/loopback-mode which is an L2 interface.ASIC_MAC_LOCAL
and ASIC_MAC_REMOTE
(L2 loopback) on /terminal-device/logical-channels/channel/config/loopback-mode which is an L1 channel.Do these actually make sense?
How do we feel about deprecating all enums of loopback-mode-type and just add LOCAL and REMOTE as the recommended values? The PHY / MAC will depend on which interface type the mode is configured on.
Updated proposal:
FACILITY
, TERMINAL
, ASIC_PHY_LOCAL
, ASIC_PHY_REMOTE
, ASIC_MAC_LOCAL
, ASIC_MAC_REMOTE
.LOCAL
and REMOTE
.An ASIC can implement loopback functionality in the MAC layer or the (internal) PHY layer. There's also an external PHY layer which corresponds to a transceiver.
One of the points in #1034 was that in some use cases, the actual loopback functionality is not necessarily required and the FACILITY
is used to emulate the oper-up state of an interface (when the operator doesn't care about the data plane behavior of the interface)
I agree the definitions of FACILITY and TERMINAL are reversed.
Maybe FACILITY|TERMINAL are not applicable to pluggable optics on a router the same way. In that case, perhaps dedicated enums for those would be better. But I would strongly suggest we do not deprecate FACILITY|TERMINAL as for optical networking they are industry standard names and we have a lot of OpenConfig implementations using those that we shouldn't break (at least ten across four vendors).
https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-terminal-device.html
Currently:
Cisco reported that FACILITY and TERMINAL loopbacks should be reversed. @ahsaanyousaf confirmed it.
Proposed:
Background:
@aashaikh first added the definition here: https://github.com/openconfig/public/commit/4e0d236b04326c37275ea9d5c621ea51e7d8eeb8
@aashaikh first use of loopback-mode-type for terminal device loopback-mode leaf here: https://github.com/openconfig/public/commit/b05e0076a8716f4a21dd5029e22fc47d54b7d059
@sulrich changed the interface loopback-mode leaf from boolean to loopback-mode-type here: https://github.com/openconfig/public/pull/731
@sallylsy and @dplore added PHY and MAC specific enums: https://github.com/openconfig/public/pull/1034