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

fix for CRM available bug #1699

Merged
merged 1 commit into from
Apr 9, 2021
Merged

fix for CRM available bug #1699

merged 1 commit into from
Apr 9, 2021

Conversation

qbdwlr
Copy link
Contributor

@qbdwlr qbdwlr commented Apr 7, 2021

What I did
Changes update switch statement in CrmOrch::getResAvailableCounters() to use CrmResourceType enum which guarantees the uniqueness of labels in the switch statement.

Why I did it
Previously, the switch statement in CrmOrch::getResAvailableCounters() used values from two different enums: sai_switch_attr_t and sai_acl_table_attr_t. There is no guarantee that the values from sai_switch_attr_t will not conflict with values from sai_acl_table_attr_t, so it is not good coding practice. Any future development in this area should not be using values from multiple enums with overlapping values in a single switch statement.
Additionally, future CRM development can use the new sai_object_type_get_availability() with sai_object_type_t instead of defining new SAI attrs per CrmResourceType without issue of enum conflict.
Refer to crmorch.cpp changes in #1686 for an example of sai_object_type_get_availability() in CrmOrch::getResAvailableCounters().

How I verified it
Re-test of route and acl plus mpls CRM support in #1686

Details if related

@rlhui rlhui requested a review from abdosi April 8, 2021 16:09
@lguohan
Copy link
Contributor

lguohan commented Apr 9, 2021

@prsunny to look

@prsunny prsunny merged commit d8b8ca9 into sonic-net:master Apr 9, 2021
@qbdwlr
Copy link
Contributor Author

qbdwlr commented Apr 12, 2021

@prsunny: What is the ETA for moving sonic-swss pointer forward in sonic-buildimage to include this PR?

@prsunny
Copy link
Collaborator

prsunny commented Apr 12, 2021

@prsunny: What is the ETA for moving sonic-swss pointer forward in sonic-buildimage to include this PR?

@qbdwlr , you can raise a submodule update PR to buildimage similar to sonic-net/sonic-buildimage#7263

raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
Changes update switch statement in CrmOrch::getResAvailableCounters() to use CrmResourceType enum which guarantees the uniqueness of labels in the switch statement.
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…ic-net#1699)

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

What I did
this PR adds support for interface alias support for muxcable commands. Basically for other OS's there could be a different scheme of interface naming which will be now be supported by muxcable commands as well.

How I did it
Added the changes in muxcable.py in show and config .

How to verify it
run on a Arista-7050cx3 switch.

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@str2-7050cx3-acs-04:/usr$ show mux cableinfo Ethernet15/1
Vendor    Model
--------  ----------------
Credo     CACL2X321P2PA1MS
admin@str2-7050cx3-acs-04:/usr$ show mux hwmode muxdirection Ethernet13/1
Port        Direction
----------  -----------
Ethernet48  standby
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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.

None yet

4 participants