-
Notifications
You must be signed in to change notification settings - Fork 811
[tests] Add packet level tests for Path tracing Midpoint #10486
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
base: master
Are you sure you want to change the base?
Conversation
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
@lguohan we added the packet level testing as per your suggestion. could you review ? |
@kperumalbfn can you please help to review this test PR as well? Thanks. |
logger.info("Show rif counters failed with exception: {}".format(repr(e))) | ||
rif_support = False | ||
|
||
for prefix in ["2001:db8:2::1/128"]: |
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.
May be copy this test V6 prefix to a member and reuse in all the methods?
logger.info("Disable Path Tracing") | ||
self.config_path_tracing(duthost, ifname="Ethernet8", enable=False) | ||
|
||
def simple_ipv6_packet( |
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.
We can use simple_tcpv6 or simple_udpv6 from testutils. Please check the other tests.
(peer_ip_ifaces_pair, rif_rx_ifaces, rif_support, ptf_port_idx, | ||
pc_ports_map, ptf_indices, ingress_router_mac) = common_param | ||
|
||
ipv6_pkt = TestPathTracingMidpoint.simple_ipv6_packet( |
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.
Is it possible to update this V6 extension to PTF utils repo? Will be useful for other test cases as well.
logger.info("out_rif_ifaces: {}, out_ifaces: {}".format(out_rif_ifaces, out_ifaces)) | ||
out_ptf_indices = [ptf_indices[iface] for iface in out_ifaces] | ||
|
||
self.config_path_tracing(duthost, ifname=out_ifaces[0], enable=True, interface_id=128) |
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.
Can we have one testcase for ECMP and verify the packet with either one egress interface in the PT?
Expected result: | ||
- The DUT pushes a new MCD before forwarding the packet on the outgoing interface | ||
""" | ||
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname] |
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.
how do we skip this test on SKUs that doesn't support PT?
Signed-off-by: Carmine Scarpitta <[email protected]>
4578d21
to
86a30af
Compare
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Description of PR
Summary:
This PR adds the packet level tests to verify Path Tracing Midpoint functionality.
Path Tracing HLD is available here: sonic-net/SONiC#1456
Type of change
Back port request
Approach
What is the motivation for this PR?
Add packet level tests to verify Path Tracing Midpoint.
How did you do it?
Added a new test case
tests/path_tracing.py
How did you verify/test it?