Skip to content

Fix a bug in LLDP test that will let the test pass even no interface …#70

Merged
lguohan merged 1 commit intosonic-net:masterfrom
taoyl-ms:taoyl/lldp_bugfix
Dec 20, 2016
Merged

Fix a bug in LLDP test that will let the test pass even no interface …#70
lguohan merged 1 commit intosonic-net:masterfrom
taoyl-ms:taoyl/lldp_bugfix

Conversation

@taoyl-ms
Copy link
Copy Markdown
Contributor

…is up

@lguohan lguohan merged commit 9a1ddce into sonic-net:master Dec 20, 2016
wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Feb 21, 2025
…iguration in common_helpers file (sonic-net#70)

<!--
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:
The ECN configuration commands still used 'sudo ip netns exec asicX' command to check and configure the ECN.

In 202405, there were changes done to fix the ECN configuration CLIs and hence the above needs to modified.

The correct way to reference ECN configuration is : sudo ecnconfig -n asicX - to check and configure ECN on SONIC DUTs.

Fixes # (issue)
sonic-net#16304

### Type of change

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

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

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [X] 202405

### Approach
#### What is the motivation for this PR?
The use of 'sudo ip netns exec asic' to check and configure ECN fails in 2405 release. With new changes, the ecnconfig -n asic - will be required to check and change ECN configuration.

#### How did you do it?
All changes are done in tests/common/snappi_tests/common_helpers.py:
1. For enable_ecn and disable_ecn functions, changed the reference from - sudo ip netns exec asic - to - sudo ecnconfig -n asic.
2. For config_wred function, changed kmax_cmd, kmin_cmd and kdrop_cmd to use - sudo ecnconfig -n instead of - sudo ip netns exec asic.

#### How did you verify/test it?
Verification logs:

1. Running the ECN test with specific Kmin, Kmax and Pmax values set.

Test is setting Kmin, Kmax and Pmax to 800k, 2000k and 25 respectively.
It is enabling ECN configuration for Priority#3.

```
---------------------------------------------------------------------------------------------------- live log call ----------------------------------------------------------------------------------------------------
18:34:45 test_multidut_dequeue_ecn_brcm_dnx.test_ L0101 INFO | Running test for testbed subtype: multi-dut-single-asic
18:34:48 snappi_fixtures.__intf_config_multidut L0933 INFO | Configuring Dut: ixre-egl-board73 with port Ethernet8 with IP 20.10.1.0/31
18:34:49 snappi_fixtures.__intf_config_multidut L0933 INFO | Configuring Dut: ixre-egl-board74 with port Ethernet0 with IP 20.10.1.2/31
18:34:51 test_multidut_dequeue_ecn_brcm_dnx.test_ L0111 INFO | Selected lossless priority:3
18:34:51 test_multidut_dequeue_ecn_brcm_dnx.test_ L0131 INFO | Selecting different Kmin, Kmax and Pmax for DNX based platform
18:34:51 test_multidut_dequeue_ecn_brcm_dnx.test_ L0137 INFO | Running ECN dequeue test with params: {'kmin': 800000, 'kmax': 2000000, 'pmax': 25} and 800 packets
18:34:51 restpy_multidut_helper.run_ecn_test L0068 INFO | Stopping PFC watchdog
18:34:52 restpy_multidut_helper.run_ecn_test L0072 INFO | Disabling packet aging if necessary
18:34:56 restpy_multidut_helper.run_ecn_test L0077 INFO | Configuring WRED and ECN thresholds

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /data/tests/snappi_tests/multidut/ecn/files/restpy_multidut_helper.py(80)run_ecn_test()
-> if (not default_ecn):
```

3. Checking the ECN configuration before the test:
On board#74
```
admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -l
Thu Jan 2 06:35:17 PM UTC 2025
Profile: AZURE_LOSSLESS
----------------------- --------
ecn ecn_all
green_drop_probability 5
green_max_threshold 10000000
green_min_threshold 2000000
red_drop_probability 5
red_max_threshold 10000000
red_min_threshold 2000000
wred_green_enable true
wred_red_enable true
wred_yellow_enable true
yellow_drop_probability 5
yellow_max_threshold 10000000
yellow_min_threshold 2000000
----------------------- --------
```

On board#73:
```
admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -l
Thu Jan 2 06:36:12 PM UTC 2025
Profile: AZURE_LOSSLESS
----------------------- --------
ecn ecn_all
green_drop_probability 5
green_max_threshold 10000000
green_min_threshold 2000000
red_drop_probability 5
red_max_threshold 10000000
red_min_threshold 2000000
wred_green_enable true
wred_red_enable true
wred_yellow_enable true
yellow_drop_probability 5
yellow_max_threshold 10000000
yellow_min_threshold 2000000
----------------------- --------
```

4. Setting the ECN configuration and checking the values:
On board#73:
```
admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -l
Thu Jan 2 06:36:58 PM UTC 2025
Profile: AZURE_LOSSLESS
----------------------- --------
ecn ecn_all
green_drop_probability 5
green_max_threshold 10000000
green_min_threshold 2000000
red_drop_probability 25
red_max_threshold 2000000
red_min_threshold 800000
wred_green_enable true
wred_red_enable true
wred_yellow_enable true
yellow_drop_probability 5
yellow_max_threshold 10000000
yellow_min_threshold 2000000
----------------------- --------

```
On board#74:
```
admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -l
Thu Jan 2 06:37:06 PM UTC 2025
Profile: AZURE_LOSSLESS
----------------------- --------
ecn ecn_all
green_drop_probability 5
green_max_threshold 10000000
green_min_threshold 2000000
red_drop_probability 25
red_max_threshold 2000000
red_min_threshold 800000
wred_green_enable true
wred_red_enable true
wred_yellow_enable true
yellow_drop_probability 5
yellow_max_threshold 10000000
yellow_min_threshold 2000000
----------------------- --------

```
5. Setting the queue for priority 3 on both board#73 and board#74:
Before the test:
```

admin@ixre-egl-board74:~$ ### modifying the queue configuration
admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -q 4
Thu Jan 2 06:37:50 PM UTC 2025
ECN status for namespace asic0:
queue 4: off
admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -q 3
Thu Jan 2 06:38:11 PM UTC 2025
ECN status for namespace asic0:
queue 3: off

admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -q 4
Thu Jan 2 06:38:01 PM UTC 2025
ECN status for namespace asic0:
queue 4: off
admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -q 3
Thu Jan 2 06:38:07 PM UTC 2025
ECN status for namespace asic0:
queue 3: off

```

Test:
```
> /data/tests/snappi_tests/multidut/ecn/files/restpy_multidut_helper.py(80)run_ecn_test()
-> if (not default_ecn):
(Pdb) c

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB continue (IO-capturing resumed) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /data/tests/snappi_tests/multidut/ecn/files/restpy_multidut_helper.py(99)run_ecn_test()
-> logger.info("Enabling ECN markings")
(Pdb) c
```

After the test:
```
admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -q 4
Thu Jan 2 06:38:29 PM UTC 2025
ECN status for namespace asic0:
queue 4: off
admin@ixre-egl-board73:~$ date; sudo ecnconfig -n asic0 -q 3
Thu Jan 2 06:38:32 PM UTC 2025
ECN status for namespace asic0:
queue 3: on

admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -q 4
Thu Jan 2 06:38:36 PM UTC 2025
ECN status for namespace asic0:
queue 4: off
admin@ixre-egl-board74:~$ date; sudo ecnconfig -n asic0 -q 3
Thu Jan 2 06:38:38 PM UTC 2025
ECN status for namespace asic0:
queue 3: on

```

#### 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?
-->
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
[sonic-linkmgrd][202012] submodule update
3d13ff2 Jing Zhang      Wed May 4 10:07:14 2022 -0700   Add doc for default route related changes  (sonic-net#63)
c703be4 Jing Zhang      Mon May 2 13:27:54 2022 -0700   Reset WaitActiveUp count before switching to active (sonic-net#70)
86eb727 Jing Zhang      Wed Apr 27 10:35:05 2022 -0700  lower log level to warning (sonic-net#69)
e22c736 Jing Zhang      Mon May 2 13:33:24 2022 -0700   [202012] Avoid proactively switching to active if default route is missing (sonic-net#67)
d4f282b Jing Zhang      Thu Apr 28 18:35:11 2022 -0700  [202012] Add support to enable switchover time measurement (with link prober interval decreased to 10ms) feature (sonic-net#66)

sign-off: Jing Zhang [zhangjing@microsoft.com](mailto:zhangjing@microsoft.com)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…e latest HEAD automatically (sonic-net#15016)

src/wpasupplicant/sonic-wpa-supplicant

* a24412c25 - (HEAD -> 202205, origin/master, origin/HEAD, origin/202211, origin/202205, master) [mka]: Fix unexpected cleanup (sonic-net#73) (8 days ago) [Ze Gan]
* 26d1da0bc - [mka]: Fix re-establishment by reset MI (sonic-net#72) (8 days ago) [Ze Gan]
* f07e0a097 - [azp]: Update build pipeline to build for Bullseye (sonic-net#70) (4 weeks ago) [Ze Gan]
*   2c69e2cda - Use github code scanning instead of LGTM (sonic-net#69) (6 months ago) [Liu Shilong]
|\  
| * 23abb04e5 - fix (6 months ago) [shilongliu]
| * f34d68fe6 - libdbus-1-dev (6 months ago) [shilongliu]
| * dc2dd881e - add dbus (6 months ago) [shilongliu]
| * 5de037661 - use swsscommon packages (6 months ago) [shilongliu]
| * 32c5a2729 - Use github code scanning instead of LGTM (6 months ago) [shilongliu]
|/  
* aa731b96f - [azp]: Install libyang in azure pipeline (sonic-net#68) (8 months ago) [Hua Liu]
* 71b635d74 - Revert "[Azp]: Upgrade Azp to bullseye (sonic-net#49)" (sonic-net#66) (9 months ago) [Ze Gan]
* 7aa4e6fa4 - Adding Microsoft SECURITY.MD (sonic-net#58) (9 months ago) [microsoft-github-policy-service[bot]]
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#15544)

src/sonic-telemetry

*   0b8843c - (HEAD -> 202205, origin/202205) Merge pull request sonic-net#120 from zbud-msft/202205_divide_by_zero (3 hours ago) [Ying Xie]
| *   015defa - Merge branch '202205' into 202205_divide_by_zero (5 hours ago) [Zain Budhwani]
* | de2124b - Change log level (5 hours ago) [zbud-msft]
* | f203be5 - Add logs for md5 checksum (sonic-net#80) (5 hours ago) [Zain Budhwani]
| *   ea6c84b - Merge branch '202205' into 202205_divide_by_zero (31 hours ago) [Zain Budhwani]
* | ab98380 - Fix sonic-mgmt-common version to ec32690 in pipeline (sonic-net#123) (34 hours ago) [Sachin Holla]
* 5fcecef - Merge branch '202205' into 202205_divide_by_zero (4 days ago) [Ying Xie]
* 09c8bfc - Merge branch '202205' into 202205_divide_by_zero (11 days ago) [Zain Budhwani]
* 21b9bc8 - Fix crash when retrieving cpu utilization (sonic-net#70) (sonic-net#71) (11 days ago) [Zain Budhwani]
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.

2 participants