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

Fix multi-asic behaviour for mmuconfig

Open bktsim-arista opened this issue 1 year ago • 4 comments

What I did

Previously, mmuconfig did not function correctly on multi-asic devices as it did not traverse through the correct namespaces, as required for multi-asic devices. This change adds multi-asic support to mmuconfig with the use of multi-asic helper libraries, ensuring that mmuconfig searches throuugh the correct namespaces when used on multi-asic devices, and adds the '-n' optional argument for users to specify namespaces on multi-asic devices.

This is a part of the set of changes being pushed for https://github.com/sonic-net/sonic-buildimage/issues/15148

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 mmuconfig with -n option.

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

@bktsim-arista please re-base to latest

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

@bktsim-arista please share command and it's output from multi-asic platform. Also, did we verify to make sure, it still works for ToR.

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

@vmittal-msft Here's the output on a multiasic platform:

No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -l -n asic0
No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -p alpha_profile -a 2 -n asic0
root@cmp235-3:~# mmuconfig -l
No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -l -n asic0
No buffer pool information available
Profile: alpha_profile
----------  -
dynamic_th  2
----------  -

root@cmp235-3:~#

Also, we tested this on a ToR, and behavior was consistent on a single ASIC system.

rdjeric-arista avatar Apr 11 '24 21:04 rdjeric-arista

@vmittal-msft Here's the output on a multiasic platform:

No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -l -n asic0
No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -p alpha_profile -a 2 -n asic0
root@cmp235-3:~# mmuconfig -l
No buffer pool information available
No buffer profile information available
root@cmp235-3:~# mmuconfig -l -n asic0
No buffer pool information available
Profile: alpha_profile
----------  -
dynamic_th  2
----------  -

root@cmp235-3:~#

Also, we tested this on a ToR, and behavior was consistent on a single ASIC system.

Thanks. @rdjeric-arista @bktsim-arista Can you please share the o/p with some config present ? If no namespace is given, will it show all namespaces ?

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

@vmittal-msft @wenyiz2021 @arlakshm this PR is ready for review

kenneth-arista avatar Aug 22 '24 03:08 kenneth-arista

@bktsim-arista Please rebase

vmittal-msft avatar Aug 22 '24 04:08 vmittal-msft

@bktsim-arista Please rebase

@bktsim-arista is not at Arista anymore. You can redirect these requests to me or @kenneth-arista. Thank you!

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

@vmittal-msft Can we merge this change?

arista-hpandya avatar Sep 05 '24 16:09 arista-hpandya