-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Optimze ACL Table/Rule notification handling #5621
Conversation
to loop pop() until empty to consume all the data in a batch This wau we prevent multiple call to iptable updates Signed-off-by: Abhishek Dosi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @qiluo-msft to review, as well.
files/image_config/caclmgrd/caclmgrd
Outdated
# Check ACL Rule notification and make sure Rule point to ACL Table which is Controlplane | ||
else: | ||
acl_table = key.split(acl_rule_table_seprator)[0] | ||
if self.config_db_map[namespace].get_table(self.ACL_TABLE)[acl_table]["type"] == self.ACL_TABLE_TYPE_CTRLPLANE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](start = 102, length = 1)
Use only one space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Abhishek Dosi <[email protected]>
* Optimze ACL Table/Rule notifcation handling to loop pop() until empty to consume all the data in a batch This wau we prevent multiple call to iptable updates Signed-off-by: Abhishek Dosi <[email protected]> * Address review comments Signed-off-by: Abhishek Dosi <[email protected]>
Do you have performance test result? |
@qiluo-msft Also there was no delay in notification and all notification were available in one batch of loop. I did not measure in time perspective. |
* Optimze ACL Table/Rule notifcation handling to loop pop() until empty to consume all the data in a batch This wau we prevent multiple call to iptable updates Signed-off-by: Abhishek Dosi <[email protected]> * Address review comments Signed-off-by: Abhishek Dosi <[email protected]>
What I did:
Optimize ACL Table/Rule notification handling
to loop pop() until empty to consume all the data in a batch
This way we prevent multiple call to iptable updates
- How to verify it
Loaded (sudo acl-loader update full acl.json) with 100 rules and verified all the set notification are batch together in one update to iptables .
Similarly (sudo acl-loader delete) batch all del operation in one update.