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

[acl]: Allow ACL table bind to LAGs and VLANs. #349

Merged
merged 2 commits into from
Dec 19, 2017

Conversation

oleksandrivantsiv
Copy link
Collaborator

What I did
Allowed to bind ACL table to LAGs and VLANs.
Denied to bind ACL table to LAG members.
Fixed issue with ACL table type and ports validation.
Why I did it
All changes are done in the scope of ACL dynamic configuration feature.
How I verified it
Manual tests
Run ACL testbed tests

sai_object_id_t bp_list[] = { SAI_ACL_BIND_POINT_TYPE_PORT };
int32_t bp_list[] = {SAI_ACL_BIND_POINT_TYPE_PORT,
SAI_ACL_BIND_POINT_TYPE_LAG,
SAI_ACL_BIND_POINT_TYPE_VLAN};
Copy link
Contributor

Choose a reason for hiding this comment

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

depending on the port type (phy/lag/vlan), we can select the BIND_POINT_TYPE here. We do not need to add all bind point type in the SAI_ACL_TABLE_GROUP_ATTR_ACL_BIND_POINT_TYPE_LIST. It is not necessary. On some platforms, it can cost us to use more resources.

group_attr.value.objlist.count = 1;
group_attr.value.objlist.list = bp_list;
group_attr.value.s32list.count = sizeof(bp_list)/sizeof(*bp_list);
group_attr.value.s32list.list = bp_list;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure it is necessary to add all bind point types when you creating acl table group for this port. Since the port has only one type, we should add appropriate port type to the bind point type list. Only 1 type is needed.

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.

limit to 1 bind point type depending on port type.

@nikos-github
Copy link
Contributor

@xinliu-seattle @lguohan
Have you added to the existing test framework for ACLs, test cases for this enhancement?
If so, can you point to the review of those test cases?

Copy link
Contributor

@nikos-github nikos-github left a comment

Choose a reason for hiding this comment

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

Have you added to the existing test framework for ACLs, test cases for this enhancement?
If so, can you point to the review of those test cases?

@oleksandrivantsiv
Copy link
Collaborator Author

break;
default:
SWSS_LOG_ERROR("Failed to process port. Incorrect port %s type %d", alias.c_str(), port.m_type);
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

minor alignment issue?

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.

:shipit:

@lguohan
Copy link
Contributor

lguohan commented Dec 5, 2017

@oleksandrivantsiv , can you resolve the conflict here?

Conflicts:
	orchagent/portsorch.cpp
@lguohan lguohan merged commit 1a7e1cd into sonic-net:master Dec 19, 2017
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
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.

5 participants