-
Notifications
You must be signed in to change notification settings - Fork 93
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
[ptftest] Add p4_dash_utils #640
Conversation
Author used P4 runtime directly to add a fixture to add underlay routing |
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.
lgtm now! thanks Junhua for updating some tests as examples!
|
||
def set_internal_config(neighbor_mac :bytes = None, | ||
mac :bytes = None, | ||
dpapp_mac :bytes = None, |
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.
cpu_mac
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.
fixed
@@ -25,6 +25,11 @@ def setUp(self): | |||
# SAI address family | |||
self.sai_ip_addr_family = SAI_IP_ADDR_FAMILY_IPV4 | |||
|
|||
self.dut_mac = get_mac("veth0") |
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.
nit: 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.
fixed
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.
lgtm!
This PR adds a module p4_dash_utils to include helper functions for p4 pipeline.
set_internal_config
aims to update pipeline internal configuration, neighbor mac, data port mac, cpu port mac, etc.use_flow
aims to enable flow lookup stage in p4 pipeline. It wrappers method setUp/tearDown of test class.