Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions orchagent/switch/trimming/capabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,15 @@ void SwitchTrimmingCapabilities::queryTrimQueueModeEnumCapabilities()
auto status = queryEnumCapabilitiesSai(
mList, SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE
);
if (status != SAI_STATUS_SUCCESS)
if (status == SAI_STATUS_NOT_SUPPORTED)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nazariig please check

{
SWSS_LOG_NOTICE(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adyeung @justin-wong-ce we also need to update the

bool SwitchTrimmingCapabilities::isSwitchTrimmingSupported() const

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be addressing this in a separate PR.
(Someone else doing it since I don't have computer access for a bit soon).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kperumalbfn the next SAI 13.2.1 drop will pass the AttrSupported checks required by isSwitchTrimmingSupported(), no need for a change at the func from BRCM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Attribute not supported(%s)enum value capabilities",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Attribute not supported(%s)enum value capabilities",
"Attribute not supported(%s) to query enum value capabilities",

toStr(SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE).c_str()
);
return;
}
else if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR(
"Failed to get attribute(%s) enum value capabilities",
Expand Down Expand Up @@ -490,7 +498,15 @@ void SwitchTrimmingCapabilities::queryTrimQueueModeAttrCapabilities()
auto status = queryAttrCapabilitiesSai(
attrCap, SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE
);
if (status != SAI_STATUS_SUCCESS)
if (status == SAI_STATUS_NOT_SUPPORTED)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind to update the other functions in this file?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise this looks good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind to update the other functions in this file?

done, #3798

{
SWSS_LOG_NOTICE(
"Attribute not supported(%s)enum value capabilities",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Attribute not supported(%s)enum value capabilities",
"Attribute not supported(%s) to query attr vapabilities",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nazariig Justin is on vacation, i've addressed these in this PR #3808.
Please review and proceed with the merge.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhanasekar-arista the new one is approved. Please close the original one

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @nazariig , i wont have permissions to close this one, @justin-wong-ce will close this one once he is back.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhanasekar-arista PR has been closed

toStr(SAI_OBJECT_TYPE_SWITCH, SAI_SWITCH_ATTR_PACKET_TRIM_QUEUE_RESOLUTION_MODE).c_str()
);
return;
}
else if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR(
"Failed to get attribute(%s) capabilities",
Expand Down
Loading