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

Allocate buffer for 256 entries for ACL resource query #523

Merged
merged 2 commits into from
Jun 13, 2018

Conversation

prsunny
Copy link
Collaborator

@prsunny prsunny commented Jun 11, 2018

What I did
Allocate an initial buffer instead of NULL during ACL table/group query

Why I did it
During every CRM polling interval, the following WARNING message is observed. This fix will suppress the frequent WARNINGs

Jun 11 20:23:07.092436 str-a7060cx-acs-1 WARNING syncd: :- processEvent: get API for key: SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000 op: get returned status: SAI_STATUS_BUFFER_OVERFLOW

How I verified it
Load the changes and verify for WARNING message.
RUN CRM test and also the following commands:

admin@str-a7060cx-acs-1:~$ crm show resources acl table
Table ID         Resource Name      Used Count    Available Count
---------------  ---------------  ------------  -----------------
0x700000000093c  acl_entry                   2               1278

admin@str-a7060cx-acs-1:~$ crm show resources acl group
Stage    Bind Point    Resource Name      Used Count    Available Count
-------  ------------  ---------------  ------------  -----------------
INGRESS  PORT          acl_group                  56                968
INGRESS  PORT          acl_table                   1                  2
INGRESS  LAG           acl_group                   0                968
INGRESS  LAG           acl_table                   0                  4
...

Details if related

@@ -436,20 +436,19 @@ void CrmOrch::getResAvailableCounters()
case SAI_SWITCH_ATTR_AVAILABLE_ACL_TABLE:
case SAI_SWITCH_ATTR_AVAILABLE_ACL_TABLE_GROUP:
{
attr.value.aclresource.count = 0;
attr.value.aclresource.list = NULL;
const int aclResourceCount = 256;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we define this number as a macro?

@prsunny prsunny merged commit 6189eaa into sonic-net:master Jun 13, 2018
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.

4 participants