Skip to content
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

[show][config] add presence of cable, hwmode consistency in mux status; add support for config muxcable reset, nonhitless firmware upgrade, pcs, fec stats #1932

Closed
wants to merge 14 commits into from

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Nov 17, 2021

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com

This PR helps us support some more muxcable cli commands. These help us debug the cable issues faster from CLI as well as configure some properties on cable if required. It also adds non-hitless optional support for muxcable firmware CLI

  • show muxcable get-fec-anlt-speed
  • show muxcable fecstatistics
  • show muxcable pcsstatistics
  • show muxcable alivecablestatus
  • show muxcable event-log
  • show muxcable debugdumpregisters
  • config muxcable set-fec
  • config muxcable reset
  • config muxcable anlt

What I did

added new cli for muxcable

How I did it

added the changes

How to verify it

unit-tests are added for new commands

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

admin@sonic:~$ show mux fecstatistics Ethernet48 1
PORT                                      VALUE
-------------------------  --------------------
Total recevied CW          11503052155808982781
Total correct CW            2116945631070750141
Total corrected CW          1488798828427060849
Total uncorrectable CW               1493763484
Corrected CW ( 1 sym err)   2063216930070464037
Corrected CW ( 2 sym err)   6639010623159212327
Corrected CW ( 3 sym err)              19394822
Corrected CW ( 4 sym err)            4245010845
Corrected CW ( 5 sym err)            2645407235
Corrected CW ( 6 sym err)                 51793
Corrected CW ( 7 sym err)                 58883
Corrected CW ( 8 sym err)                  1492
Corrected CW ( 9 sym err)                  8898
Corrected CW (10 sym err)                 39368
Corrected CW (11 sym err)                  4545
Corrected CW (12 sym err)                 10146
Corrected CW (13 sym err)                 36248
Corrected CW (14 sym err)                 33252
Corrected CW (15 sym err)                  2480```

admin@sonic:~$ show mux debugdumpregisters Ethernet48 0 --json
{
    "serde_lane_14": "{'ch_est': 0.0, 'of': 0, 'hf': 0, 'ctle1': 0, 'ctle2': 0, 'delta': -2, 'eye': 0, 'ppm': -9, 'adp_cnt': 0, 'adp_done': 0, 'agc_g1': 85, 'agc_g2': 21, 'exit_code': 0, 'pll_tx': 27, 'pll_rx': 27, 'f1': -7, 'f2': -1, 'f3': 45, 'temp': 54}",
    "serde_lane_2": "{'ch_est': 0.0, 'of': 0, 'hf': 0, 'ctle1': 0, 'ctle2': 0, 'delta': -1, 'eye': 0, 'ppm': 0, 'adp_cnt': 0, 'adp_done': 0, 'agc_g1': 85, 'agc_g2': 21, 'exit_code': 0, 'pll_tx': 27, 'pll_rx': 27, 'f1': -3, 'f2': -1, 'f3': -1, 'temp': 54}",
    "serde_lane_0": "{'ch_est': 1.33203125, 'of': 56, 'hf': 42, 'ctle1': 7, 'ctle2': 7, 'delta': 0, 'eye': 816, 'ppm': -11, 'adp_cnt': 2, 'adp_done': 1, 'agc_g1': 5, 'agc_g2': 5, 'exit_code': 0, 'pll_tx': 35, 'pll_rx': 33, 'f1': 7, 'f2': -3, 'f3': 1, 'temp': 54}",
    "serde_lane_12": "{'ch_est': 0.0, 'of': 0, 'hf': 0, 'ctle1': 7, 'ctle2': 15, 'delta': 0, 'eye': 0, 'ppm': -1, 'adp_cnt': 1, 'adp_done': 0, 'agc_g1': 64, 'agc_g2': 16, 'exit_code': 0, 'pll_tx': 33, 'pll_rx': 33, 'f1': 18, 'f2': 0, 'f3': 0, 'temp': 54}",
    "nic_voltage": "3.2640000000000002",
}

admin@sonic:~$ show mux pcsstatistics Ethernet48 0
PORT                    VALUE
--------------------  -------
Rx Frames OK             6178
Rx Chk SEQ Errs          6178
Rx Alignment Errs        6178
Rx In Errs               6178
Rx FrameTooLong Errs     6178
Rx Octets OK             6178
Tx Frames OK             6178
Tx Out Errs              6178
Tx Octets OK             6178
{
    "Rx Frames OK": "6178",
    "Rx Chk SEQ Errs": "6178",
    "Rx Alignment Errs": "6178",
    "Rx In Errs": "6178",
    "Rx FrameTooLong Errs": "6178",
    "Rx Octets OK": "6178",
    "Tx Frames OK": "6178",
    "Tx Out Errs": "6178",
    "Tx Octets OK": "6178"
}
admin@sonic:~$ show mux alivecablestatus Ethernet24
PORT    VALUE
------  -------
cable   True

admin@sonic:~$ show mux get-fec-anlt-speed Ethernet48
PORT          VALUE
----------  -------
fec_nic           0
fec_tor_a         0
fec_tor_b         0
speed         50000
anlt_nic      False
anlt_tor_a    False
anlt_tor_b    False
admin@sonic:~$ show mux berinfo Ethernet48
Usage: show mux berinfo [OPTIONS] <port_name> TARGET
Try "show mux berinfo -h" for help.

Error: Missing argument "TARGET".
admin@sonic:~$ show mux berinfo Ethernet48 0
  PORT    VALUE
------  -------
     0        0
     1        0
     2        0
     3        0

admin@sonic:~$ sudo config mux set-fec Ethernet48 0 0
Muxcable at port Ethernet48 will be changed to enable/disable fec mode 0 state; disable traffic Continue? [y/N]: y
Success in fec enable/disable port Ethernet48 to 0


admin@sonic~$sudo config mux set-anlt Ethernet48 0 0
Muxcable at port Ethernet48 will be changed to enable/disable anlt mode 0 state; disable traffic Continue? [y/N]: y
Success in anlt enable/disable port Ethernet48 to 0

firmware upgrade, pcs, fec stats

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 17, 2021

This pull request introduces 3 alerts when merging 6108973 into e7535ae - view on LGTM.com

new alerts:

  • 2 for Unused local variable
  • 1 for Unused import

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 18, 2021

This pull request introduces 11 alerts when merging 2bc3d3f into 9ab6c51 - view on LGTM.com

new alerts:

  • 10 for Unused local variable
  • 1 for Unused import

@prgeor
Copy link
Contributor

prgeor commented Nov 18, 2021

This pull request introduces 11 alerts when merging 2bc3d3f into 9ab6c51 - view on LGTM.com

new alerts:

  • 10 for Unused local variable
  • 1 for Unused import

LGTM warnings

@prgeor prgeor self-assigned this Nov 18, 2021
@prgeor
Copy link
Contributor

prgeor commented Nov 18, 2021

@vdahiya12 can you attach the HLD for these CLI commands?

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12
Copy link
Contributor Author

@vdahiya12 can you attach the HLD for these CLI commands?

sonic-net/SONiC#757
These are essentially based on abstract class implementation.
https://github.com/Azure/sonic-platform-common/blob/master/sonic_y_cable/y_cable_base.py

@lgtm-com
Copy link

lgtm-com bot commented Nov 19, 2021

This pull request introduces 11 alerts when merging e35d262 into ac8382f - view on LGTM.com

new alerts:

  • 10 for Unused local variable
  • 1 for Unused import

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 19, 2021

This pull request introduces 2 alerts when merging 1bd240b into ac8382f - view on LGTM.com

new alerts:

  • 2 for Unused local variable

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 22, 2021

This pull request introduces 1 alert when merging b0d0351 into 02a98ef - view on LGTM.com

new alerts:

  • 1 for Unused local variable

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 changed the title [show][config] add support for config muxcable reset, nonhitless firmware upgrade, pcs, fec stats [show][config] add presence of cable, hwmode consistency in mux status; add support for config muxcable reset, nonhitless firmware upgrade, pcs, fec stats Nov 22, 2021
@vdahiya12
Copy link
Contributor Author

Already merged as part of #2105

@vdahiya12 vdahiya12 closed this Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants