Skip to content

Add traffic tests for static and directly connected routes in IPFWD test suite#17058

Merged
yxieca merged 2 commits intosonic-net:masterfrom
dt-nexthop:feature/sync-1740065336
Mar 17, 2025
Merged

Add traffic tests for static and directly connected routes in IPFWD test suite#17058
yxieca merged 2 commits intosonic-net:masterfrom
dt-nexthop:feature/sync-1740065336

Conversation

@dt-nexthop
Copy link
Contributor

Description of PR

Summary:
Following testcases added for IPv4 and IPv6 traffic

  1. traffic test with different DIP and SIP for directly connected DIP
  2. traffic test with different DIP and SIP for DIP reachable through configured static route.

Fixes # 17057

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • [ x] Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

Additional coverage in forwarding test

How did you do it?

Added extra cases to the existing script to handle the cases where traffic is sent to directly connected route as well as to a prefix that is reachable through a static route.

How did you verify/test it?

Run on T1 topology running master:
ipfwd/test_dip_sip.py::test_ipv4_forwarding[usschq-mswdut-t005-None-ipv4_same_sip_dip] PASSED
ipfwd/test_dip_sip.py::test_ipv4_forwarding[usschq-mswdut-t005-None-ipv4_different_sip_dip_connectedroute] PASSED
ipfwd/test_dip_sip.py::test_ipv4_forwarding[usschq-mswdut-t005-None-ipv4_different_sip_dip_staticrouteprefix]
FAILED
ipfwd/test_dip_sip.py::test_ipv6_forwarding[usschq-mswdut-t005-None-ipv6_same_sip_dip] PASSED
ipfwd/test_dip_sip.py::test_ipv6_forwarding[usschq-mswdut-t005-None-ipv6_different_sip_dip_connectedroute] PASSED

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca
Copy link
Collaborator

yxieca commented Feb 28, 2025

@prsunny can you assign someone to review?

@prsunny
Copy link
Contributor

prsunny commented Mar 14, 2025

@dt-nexthop , would you please share in detail what did the original test cover and whats the enhancement?

@dt-nexthop
Copy link
Contributor Author

@dt-nexthop , would you please share in detail what did the original test cover and whats the enhancement?

@prsunny, this enhancement adds test cases to cover a few traffic forwarding cases that did not exist in the original test 1) There was no test where the destination IP of the packet was forwarded via a directly connected IP prefix. 2) There was no test where the destination IP of the packet was forwarded via a static route. Prior to these changes, all tests in this suite focused on dynamically learned routes.

Let me know if you need more information to order to get these changes merged in.

Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm

@prsunny
Copy link
Contributor

prsunny commented Mar 17, 2025

@yxieca , please merge

@yxieca yxieca merged commit 933ef7d into sonic-net:master Mar 17, 2025
12 checks passed
OriTrabelsi pushed a commit to OriTrabelsi/sonic-mgmt that referenced this pull request Apr 1, 2025
…est suite (sonic-net#17058)

What is the motivation for this PR?
Additional coverage in forwarding test

How did you do it?
Added extra cases to the existing script to handle the cases where traffic is sent to directly connected route as well as to a prefix that is reachable through a static route.

How did you verify/test it?
Run on T1 topology running master
yanmo96 added a commit to Azure/sonic-mgmt.msft that referenced this pull request Oct 28, 2025
### Description of PR
Adjust test_dip_sip.py to ipv6 only topology
Modified get_lag_facts and get_ports_facts to support ipv6 only topo,
and adjusted the cases to run with this topo.
This PR is only for 202412 branch, because the following PR -
sonic-net/sonic-mgmt#17058 was not CP to this
branch


### Type of change
- [ ] Bug fix
- [x] Testbed and Framework(new/improvement)
- [ ] New Test case
- [ ] Skipped for non-supported platforms
- [ ] Test case improvement


### Approach
#### What is the motivation for this PR?
fix test to run as expected on ipv6 only topo

#### How did you do it?
selected the ipv6 ip option for lags and ports facts
and only run ipv6 validation on the test itself.

#### How did you verify/test it?
internal nvidia regression
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…est suite (sonic-net#17058)

What is the motivation for this PR?
Additional coverage in forwarding test

How did you do it?
Added extra cases to the existing script to handle the cases where traffic is sent to directly connected route as well as to a prefix that is reachable through a static route.

How did you verify/test it?
Run on T1 topology running master

Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…est suite (sonic-net#17058)

What is the motivation for this PR?
Additional coverage in forwarding test

How did you do it?
Added extra cases to the existing script to handle the cases where traffic is sent to directly connected route as well as to a prefix that is reachable through a static route.

How did you verify/test it?
Run on T1 topology running master

Signed-off-by: Guy Shemesh <[email protected]>
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.

4 participants