sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Fix multi-asic behaviour for ecnconfig

Open bktsim-arista opened this issue 2 years ago • 4 comments

What I did

Previously, ecnconfig -l was not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices to retrieve correct results for ecnconfig. This change fixes multi-asic behaviour of CLI commands that rely on ecnconfig.

This is a part of the set of changes being pushed for https://github.com/sonic-net/sonic-buildimage/issues/15148 This change relies on helpers added in https://github.com/sonic-net/sonic-buildimage/pull/17243

How I did it

Added namespace option -n and used multi_asic library to implement multi_asic behaviour. Added relevant unit tests to ensure functionality.

How to verify it

Run unit tests, or ecnconfig commands with option -n.

bktsim-arista avatar Nov 30 '23 19:11 bktsim-arista

please re-base the PR to latest

vmittal-msft avatar Mar 22 '24 01:03 vmittal-msft

@bktsim-arista 1.Is this verified on pizzabox as well ? 2. If no namespace is given, will it show for all ?

vmittal-msft avatar May 16 '24 19:05 vmittal-msft

/Azp run Azure.sonic-utilities

arlakshm avatar May 31 '24 20:05 arlakshm

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 31 '24 20:05 azure-pipelines[bot]

@arlakshm @vmittal-msft @wenyiz2021 this PR is ready for review. All tests have passed with the latest updates. It will be easier to review with whitespace difference disabled because the new static checks requires reformatting (e.g. spacing) of touched Python files.

kenneth-arista avatar Aug 07 '24 17:08 kenneth-arista

please share command and it's output from multi asic platform. Also, please make sure it still works for ToR.

Here are the snapshots obtained after running it on a multi-asic devise:

ecnconfig -l -n asic0 ecnconfig -l -n asic0

ecnconfig -l -n asic1 ecnconfig -l -n asic1

ecnconfig -l ecnconfig -l

Behaviour of queue on mutli-asic platform

multi_asic queue get and set

Behaviour of set on multi-asic platform when no namespace is specified

multi_set_all_masic

arista-hpandya avatar Aug 07 '24 17:08 arista-hpandya

@vmittal-msft 1.Is this verified on pizzabox as well ? 2. If no namespace is given, will it show for all ?

Yes, behaviour on single asic devices is preserved and when no namespace is given, it will show/set for all

arista-hpandya avatar Aug 07 '24 17:08 arista-hpandya

I am assuming this is verified on T0/T1 device as well to make sure it is fine.

No, it has not been tested on T0/T1 devices yet. I will update the PR once I have tested it on the same.

arista-hpandya avatar Aug 20 '24 16:08 arista-hpandya

I am assuming this is verified on T0/T1 device as well to make sure it is fine.

The changes have been verified on T0 and T1 devices, the snapshots of the same are attached below. TL;DR: It should be safe to merge

T0

ecnconfig multi_set ecnconfig queue test


T1

ecnconfig_multi_set ecnconfig_queue_test

arista-hpandya avatar Aug 21 '24 22:08 arista-hpandya