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

Create egress ACL table group during the PFCWD stats list installment #787

Merged
merged 4 commits into from
Feb 15, 2019

Conversation

wendani
Copy link
Contributor

@wendani wendani commented Feb 8, 2019

Signed-off-by: Wenda wenni@microsoft.com

What I did
On the PFCWD stats list installment, create egress ACL table group for each port and bind to it.

Why I did it
In pfc watchdog warm-reboot, we find that brcm sai not supporting ACL table group port unbind yet. If pfc storm ever occurred on a port, egress ACL table group will be created and bound to the port, and persist the association with the port even after the storm is restored. In the situation that there is restored but not ongoing pfc storm before warm-reboot, egress table group will not be created in view after warm-reboot. Syncd comparison logic will see the difference, and remove the egress ACL table group object from the port, the underlying unbind operation of which is not supported in brcm sai yet.

We use the workaround solution that we created egress table group proactively for all ports under PFCWD's surveillance so that syncd will not see the difference post warm-reboot even if pfc storm ever occurs on a port.

How I verified it

Details if related

Signed-off-by: Wenda <wenni@microsoft.com>
@wendani wendani requested review from stcheng and lguohan February 8, 2019 19:17
@wendani wendani changed the title Create egress table group during the PFCWD stats list installment Create egress ACL table group during the PFCWD stats list installment Feb 8, 2019

// Create egress table group for each port of pfcwd's interest
sai_object_id_t group_member_oid;
gPortsOrch->bindAclTable(port.m_port_id, SAI_NULL_OBJECT_ID, group_member_oid, ACL_STAGE_EGRESS);
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not correct. you want to reuse bindAclTable function, but you return false if table_oid == NULL.
You want to create an empty table group, the return should be success, not false.

I suggest you to define a new function createAclTableGroup(), and call gPortsOrch->createAclTableGroup(port.m_port_id, ACL_STAGE_EGRESS)

Then, you rewrite bindAclTable to use createAclTableGroup.

Copy link
Contributor

@lguohan lguohan 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.

group to a port, which can be physical, vlan, or lag

Signed-off-by: Wenda <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@lguohan lguohan merged commit a6d60f2 into sonic-net:master Feb 15, 2019
@lguohan lguohan requested a review from yxieca February 16, 2019 19:11
@yxieca
Copy link
Contributor

yxieca commented Feb 21, 2019

Made to 201811 branch on 2019/2/21

yxieca pushed a commit that referenced this pull request Feb 21, 2019
…#787)

* Create egress table group during the PFCWD stats list installment

Signed-off-by: Wenda <wenni@microsoft.com>

* Introduce function bindAclTableGroup() to create and bind ACL table
group to a port, which can be physical, vlan, or lag

Signed-off-by: Wenda <wenni@microsoft.com>

* Rename function to createBindAclTableGroup()

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Check the validity of ACL table oid

Signed-off-by: Wenda Ni <wenni@microsoft.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants