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

Policy Based Metering (PBM) - HLD #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Policy Based Metering (PBM) - HLD #4

wants to merge 4 commits into from

Conversation

shaygol
Copy link

@shaygol shaygol commented Dec 5, 2024

High-level design for the PBM feature - the ability to attach policers to ACL entries

@shaygol shaygol requested review from a team, amazor, marvellgit, matiAlfaro, VladimirKuk, shiraez, aviramd and DanielaMurin and removed request for a team December 5, 2024 14:14
doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
; value annotations
port_name = 1*64VCHAR ; name of the port, must be unique
max_ports = 1*5DIGIT ; number of ports supported on the chip
* ext_actions_list = ["POLICER", "ACTION1", "ACTION2", ...] ; additional action list - can be extended in the future with new actions

Choose a reason for hiding this comment

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

Currently only POLICER, right? I'd remove the not implemented ones (ACTION*)
Where is the mapping of the name POLICER to the policer table
empty is default? it always happens? for backward compatibility

Copy link
Author

Choose a reason for hiding this comment

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

Empty is the default - this list defines the actions that the ACL rules can be used

doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
### Restrictions/Limitations

- Policers must be supported
- Policer cannot be deleted when referenced by ACL rule.

Choose a reason for hiding this comment

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

missing Yang model, in it you can implemented this

doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
---
### Open/Action Items
- Are there specific ASIC platforms with limitations for this feature?
- ACL-Loader utility uses the an external python library (openconfig_acl) that rely on pre-defined, structured models. In order to support the new 'policer_action' per rule the openconfig_acl schema need to be changed.

Choose a reason for hiding this comment

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

why is this open? effort? what is the the side effect?

Copy link
Author

Choose a reason for hiding this comment

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

Theoretically, there is an option to be a contributor for openconfig_acl (.py) (https://openconfig.net/about/contribute/) - but...

doc/policy_based_metering/PBM-HLD.md Outdated Show resolved Hide resolved
@shaygol shaygol requested review from pliran and matiAlfaro December 9, 2024 15:29
sgoldshmit added 4 commits December 12, 2024 14:02
High-level design for the PBM feature - the ability to attach policers
to ACL entries
- update HLD info
- update the image with the DB names
@shaygol
Copy link
Author

shaygol commented Dec 12, 2024

Please see this for reference (HLD to config custom ACL table type): HLD

; value annotations
port_name = 1*64VCHAR ; name of the port, must be unique
max_ports = 1*5DIGIT ; number of ports supported on the chip
* ext_actions_list = ["POLICER"] ; additional action list - can be extended in the future
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please see this for reference (HLD to config custom ACL table type): HLD

Because there already exists an existing mechanism for custom ACLs, not sure you need this new configurable field. Instead add a new type "POLICER".
If the user wants to do special cases, they can create custom ACL table types and use your implemented POLICER rule.


* packet_action = "forward"/"drop"/"redirect" ; option for actions when the rule are matched.
* packet_action_mirror = True/false ; it hould be a sub set of the table 'ext_actions_list' felid
* packet_action_do_not_nat = True/false
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am confused, are there changes to the possible values in:

  • packet_action
  • packet_action_mirror
  • packet_action_do_not_nat
    ?

; could be platform dependent

* packet_action = "forward"/"drop"/"redirect" ; option for actions when the rule are matched.
* packet_action_mirror = True/false ; it hould be a sub set of the table 'ext_actions_list' felid
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, is "ext_actions_list" a new field in the ACL_RULES_TABLE too?
If we get rid of this field in the table, i assume we get rid of it here too, correct?

config policer update <name> --rate <rate> --burst <burst>

# Add/Remove/Update ACL tables --> new field 'ext_actions_list'
config acl add table [OPTIONS] <table_name> <table_type> [--ext_actions_list <actions_list>]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you create a custom ACL using the CLI?

No SONiC architecture changes are required as the existing infrastructure is being used.
##### *Image 1: ACL Configuration Flow Overview*

![alt text](Overview.jpg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I understand this picture. What are you trying to show? Either use a different picture, or give a short explanation

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.

3 participants