Skip to content

Make link flap timeout configurable for link_flap test case#1062

Merged
yxieca merged 1 commit intosonic-net:masterfrom
yvolynets-mlnx:link_flap_timeout
Sep 19, 2019
Merged

Make link flap timeout configurable for link_flap test case#1062
yxieca merged 1 commit intosonic-net:masterfrom
yvolynets-mlnx:link_flap_timeout

Conversation

@yvolynets-mlnx
Copy link
Contributor

@yvolynets-mlnx yvolynets-mlnx commented Aug 9, 2019

Signed-off-by: Yuriy Volynets [email protected]

Description of PR

Summary: Make link flap timeout configurable for link_flap test case
Fixes # (issue)

Type of change

  • [] Bug fix
  • [] Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

Make it possible to pass "link_timeout" parameter from console. Default "link_timeout" is unchanged and is equal to 20 sec.
Example:
-e link_timeout=30

How did you verify/test it?

Tested by running "link_flap" test on several platforms.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@yxieca yxieca merged commit 169865a into sonic-net:master Sep 19, 2019
yxieca pushed a commit that referenced this pull request Sep 19, 2019
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Submodule src/sonic-swss 24fcbb6..3cee6b8:
  > [aclorch]: Fix table name in counter table for mirror rules (sonic-net#1060)
  > Cannot ping to link-local ipv6 interface address of the switch. (sonic-net#774)
  > [MirrorOrch]: Mirror Session Retention across Warm Reboot (sonic-net#1062)

Submodule src/sonic-utilities afaedb7..a06bee7:
  > [201811][config] Add '-h' and '-?' as help options to unify with show/sonic-clear cmds (sonic-net#654)
  > Revert "Fixed config Asym PFC CLI. (sonic-net#632)" (sonic-net#652)

Signed-off-by: Ying Xie <[email protected]>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Revert "Revert " [201911]show interface counters for multi ASIC devices
(sonic-net#1104)""
 Revert "Revert "Pfcstat (sonic-net#1097)""
  [show] Fix 'show int neighbor expected' (sonic-net#1106)
   Update argument for docker exec it->i (sonic-net#1118)
     Update to make config load/reload backward compatible. (sonic-net#1115)
     Handling deletion of Port Channel before deletion of its members
     (sonic-net#1062)
    Skip default route present in ASIC-DB but not in APP-DB. (sonic-net#1107)
     [CLI][PFCWD][Multi-ASIC] Added multi ASIC support to 'pfcwd' CLI
     (sonic-net#1102)
       [201911]  Multi asic platform config interface portchannel, show
       transceiver  (sonic-net#1087)
       [drop counters] Fix configuration for counters with lowercase
       names (sonic-net#1103)

Signed-off-by: Abhishek Dosi <[email protected]>
Pterosaur pushed a commit to Pterosaur/sonic-mgmt that referenced this pull request Mar 25, 2026
…e range (sonic-net#1062)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Update the IPv6 BGP scale PTF traffic generation to use a *cyclic* ICMPv6 type chosen from a safe, non-reserved range, instead of incrementing a global ICMP type value. This avoids eventually drifting into reserved/invalid ICMP type values across repeated test phases/runs in future when new test cases maybe added and keeps packet-mask counters stable.

Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

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

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511

### Approach
#### What is the motivation for this PR?
The bgp scale test previously used a global ICMP type that was incremented on each phase. Over time when new test cases kept adding, this can move into reserved/unsafe ICMP type values, which may cause unexpected behavior and flaky results. We want each phase to use a distinct ICMP type for mask counters, while guaranteeing the type stays within a safe range.

#### How did you do it?
- Added an `itertools.cycle()` generator over a bounded ICMP type range (currently `5..125`).
- Replaced the global incrementing variable with `_get_icmp_type()` to fetch the next type for each test phase.
- This global variable can only be accessed through this function.
- Updated `generate_packets()` to accept `icmp_type` as an explicit parameter and plumbed it through call sites (flapper + withdraw/announce phases).

#### How did you verify/test it?
- Verified the test module imports and packet generation uses the provided `icmp_type`.
- Confirmed all previous call sites were updated to pass `icmp_type`, and packet-mask setup uses the same value for each phase.

#### Any platform specific information?

#### Supported testbed topology if it's a new test case?

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->

Signed-off-by: Sonic Build Admin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants