-
Notifications
You must be signed in to change notification settings - Fork 297
Switch Capability support #728
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
Conversation
vslib/src/SwitchStateBase.cpp
Outdated
SAI_OBJECT_TYPE_TAM_TRANSPORT, | ||
SAI_OBJECT_TYPE_TAM_TELEMETRY, | ||
SAI_OBJECT_TYPE_TAM_EVENT_THRESHOLD | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually all objects are supported, you can create any objects, but not all read only attributes will work, they need to be refreshed manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also NULL object should not be on that list ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use std::vector<sai_object_type_t> maybe ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also move that closes to the first use
vslib/src/SwitchStateBase.cpp
Outdated
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr)); | ||
|
||
attr.id = SAI_SWITCH_ATTR_SUPPORTED_OBJECT_TYPE_LIST; | ||
attr.value.s32list.count = sizeof(supported_obj_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sizeof(supported_obj_list)/sizeof(int32_t) ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address comments
efc8efd
to
08b6fe7
Compare
can you also add here unittests for this ? you can add them in vslib/src/tests.cpp |
vslib/src/SwitchStateBase.cpp
Outdated
CHECK_STATUS(set(SAI_OBJECT_TYPE_SWITCH, m_switch_id, &attr)); | ||
|
||
// Fill this with supported SAI_OBJECT_TYPEs | ||
int32_t supported_obj_list[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to sai_object_type_t instead of int32_t
08b6fe7
to
6f298f8
Compare
sure. I will add the same. |
6f298f8
to
a964026
Compare
Signed-off-by: Prabhu Sreenivasan <[email protected]>
a964026
to
a208c00
Compare
retest vs please |
Adds SAI_SWITCH_ATTR_SUPPORTED_OBJECT_TYPE_LIST to switch attributes. Signed-off-by: Prabhu Sreenivasan <[email protected]>
Adds SAI_SWITCH_ATTR_SUPPORTED_OBJECT_TYPE_LIST to switch attributes. Signed-off-by: Prabhu Sreenivasan <[email protected]>
Signed-off-by: Prabhu Sreenivasan [email protected]
Adds SAI_SWITCH_ATTR_SUPPORTED_OBJECT_TYPE_LIST to switch attributes.
Related PRs:
sonic-net/sonic-swss#1525