Skip to content

[aclorch] if vendor does not implement ACL action capability quieries…#1106

Merged
prsunny merged 3 commits intosonic-net:masterfrom
stepanblyschak:acl_query_not_supported
Oct 28, 2019
Merged

[aclorch] if vendor does not implement ACL action capability quieries…#1106
prsunny merged 3 commits intosonic-net:masterfrom
stepanblyschak:acl_query_not_supported

Conversation

@stepanblyschak
Copy link
Copy Markdown
Contributor

… - use default capabilities (do not fail)

Signed-off-by: Stepan Blyschak [email protected]

What I did

If ACL max action count query failed - use defaultAclActionsSupported for both INGRESS and EGRESS
If ACL actions query on INGRESS failed use defaultAclActionsSupported for INGRESS
If ACL actions query on EGRESS failed use defaultAclActionsSupported for EGRESS

Warn in any scenario that orchagent will assume defaults.

#ifdef SAI_SUPPORTS_OBJECT_API /* does not compile right now */
if enum values supported for ACL action query failed - assume all are supported
(e.g. action - PACKET_ACTION, values - DROP,FORWARD etc.)
#else
assume all values are supported
#end

Why I did it

Seems to crash on many vendors because of lack of capability query support

How I verified it

Verify on system which supports attributes,
Simulate if system does not support and verify defaults are pushed to db

Details if related

… - use default capabilities (do not fail)

Signed-off-by: Stepan Blyschak <[email protected]>
@stepanblyschak stepanblyschak marked this pull request as ready for review October 25, 2019 08:14
putAclActionCapabilityInDB(stage);
}
}
else if (status == SAI_STATUS_NOT_IMPLEMENTED)
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.

Please have just the else case to populate the default table

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it. But that means SAI does not return valid status code

}

for (size_t i = 0; i < values.count; i++)
else if (status == SAI_STATUS_NOT_IMPLEMENTED)
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.

Same as above comment

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.

Can you address this as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Copy Markdown
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

As comments

@prsunny prsunny merged commit 0917157 into sonic-net:master Oct 28, 2019
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
sonic-net#1106)

* [aclorch] if vendor does not implement ACL action capability quieries - use default capabilities (do not fail)
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.

2 participants