sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
173 stars 689 forks source link

Enhanced Cisco specific ECN marking config verification test #13452

Closed sreejithsreekumaran closed 2 days ago

sreejithsreekumaran commented 1 week ago

Description of PR

Summary:

Needed to uplift the case to Validate the ECN configuration

Summary: Fixes # (issue)

1) read PORT_QOS_MAP and check for interfaces and pfc_enable configuration 2) Skip verification if pfc_enable is not set 3) Verify for each PG present in pfc_enable and remove assumption of 3 and 4 as lossless PG

Type of change

Back port request

Approach

What is the motivation for this PR?

the existing script was verifying marking configuration for only lossless 3 and 4. Uplifted to make it generic by reading the configuration for lossless PGs.

How did you do it?

How did you verify/test it?

Verified it on Cisco box 1) By having interfaces with no PFC configuration 2) Having interfaces with selected PFC configuration

Any platform specific information?

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

Documentation

sreejithsreekumaran commented 1 week ago

/UT logs

Ethernet0 doesn't have pfc enabled and Ethernet4 has pfc_enabled only on 4.

root@mathilda-01:/home/cisco# show pfc priority 

Interface    Lossless priorities
-----------  ---------------------
Ethernet0
Ethernet4    4
Ethernet16   3,4
Ethernet20   3,4
Ethernet24   3,4
Ethernet28   3,4
Ethernet32   3,4
Ethernet36   3,4
grep "PFC is not enabled" test_2024-06-25-18-14-33.log
**25/06/2024 18:14:55 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet0**
25/06/2024 18:16:30 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet12
25/06/2024 18:16:30 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet132
25/06/2024 18:16:30 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet136
25/06/2024 18:16:30 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet140
25/06/2024 18:16:30 test_ecn_config.test_verify_ecn_marking_ L0179 INFO   | PFC is not enabled on Ethernet172
grep "Checking Port" test_2024-06-25-18-14-33.log
25/06/2024 18:15:58 test_ecn_config.test_verify_ecn_marking_ L0183 INFO   | Checking Port: Ethernet36 pg 4
25/06/2024 18:15:59 test_ecn_config.test_verify_ecn_marking_ L0183 INFO   | Checking Port: Ethernet4 pg 4
25/06/2024 18:16:00 test_ecn_config.test_verify_ecn_marking_ L0183 INFO   | Checking Port: Ethernet40 pg 3
wsycqyz commented 1 week ago

I believe we need this PR in 2024 and 202311 branch?

sreejithsreekumaran commented 1 week ago

I believe we need this PR in 2024 and 202311 branch?

Yes, please, we can commit according to the branching strategy in place.

mssonicbld commented 2 days ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-mgmt/pull/13535

mssonicbld commented 2 days ago

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/13534