-
Notifications
You must be signed in to change notification settings - Fork 547
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
SwSS Changes for DHCP DoS Mitigation Feature #3130
base: master
Are you sure you want to change the base?
Conversation
@Yarden-Z Hi Yarden, Can you please help review this code. Thanks in advance! |
b761b27
to
d22882a
Compare
tests/test_port_add_remove.py
Outdated
# try to remove this port | ||
config_db.delete_entry('PORT', PORT_A) | ||
num = asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_PORT", | ||
num_of_ports-1, | ||
polling_config = PollingConfig(polling_interval = 1, timeout = 5.00, strict = True)) | ||
polling_config = PollingConfig(polling_interval = 1, timeout = 10.00, strict = True)) |
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.
What is this change for?
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.
changings has been reverted.
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.
Please fix Prince's comment about calling setPortDHCPMitigationRate when there is no explicit configuration.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
2f3785d
to
ad6b25e
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @prabhataravind . code has been updated as suggested. please help review and merge code |
@prsunny can this PR be merged? Two reviewers have approved it. Thanks. |
@@ -393,6 +393,13 @@ | |||
assert len(oids) == 1, "Wrong # of default vrfs: %d, expected #: 1." % (len(oids)) | |||
return oids[0] | |||
|
|||
def get_ip_prefix_nhg_oid(self, ip_prefix, vrf_oid=None): |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning test
redefined
@@ -393,6 +393,13 @@ | |||
assert len(oids) == 1, "Wrong # of default vrfs: %d, expected #: 1." % (len(oids)) | |||
return oids[0] | |||
|
|||
def get_ip_prefix_nhg_oid(self, ip_prefix, vrf_oid=None): | |||
|
|||
def get_default_vrf_oid(self): |
Check notice
Code scanning / CodeQL
Unused local variable Note test
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
What I did
Added support for DHCP DoS Mitigation feature via kernel through PortMgrd
Why I did it
DHCP Mitigation Rate attribute added to config_db needed a path to appl_db and kernel configurations. This was done through PortMgrd