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

SwSS Changes for DHCP DoS Mitigation Feature #3130

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

Conversation

asraza07
Copy link

@asraza07 asraza07 commented May 2, 2024

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

@asraza07 asraza07 changed the title Support for DHCP DoS Mitigation feature SwSS Chnages for DHCP DoS Mitigation Feature May 6, 2024
@asraza07 asraza07 marked this pull request as ready for review May 6, 2024 07:01
@asraza07 asraza07 requested a review from prsunny as a code owner May 6, 2024 07:01
@asraza07 asraza07 changed the title SwSS Chnages for DHCP DoS Mitigation Feature SwSS Changes for DHCP DoS Mitigation Feature May 7, 2024
@ridahanif96
Copy link
Contributor

@Yarden-Z Hi Yarden, Can you please help review this code. Thanks in advance!

@muhammadalihussnain muhammadalihussnain force-pushed the dhcp_dos_mitigation_swss branch from b761b27 to d22882a Compare May 16, 2024 10:17
# 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))
Copy link
Collaborator

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?

Choose a reason for hiding this comment

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

changings has been reverted.

Copy link
Contributor

@prabhataravind prabhataravind left a 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.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@muhammadalihussnain
Copy link

Hi @prabhataravind . code has been updated as suggested. please help review and merge code

@zhangyanzhao
Copy link
Collaborator

@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

This assignment to 'get_ip_prefix_nhg_oid' is unnecessary as it is
redefined
before this value is used.
@@ -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

Variable get_default_vrf_oid is not used.
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

9 participants