Skip to content

[qos] testQosSaiHeadroomPoolSize not support headroom test for multiple port multiple PG in dynamic threshold mode #7113

@XuChen-MSFT

Description

@XuChen-MSFT

Description

testQosSaiHeadroomPoolSize not support headroom test for multiple port multiple PG in dynamic threshold mode.

Original case design only support static threshold mode.

RCA:
Script try to fill shared buffer by injecting constant number of packets in multiple ports and PGs. In this testcase, this constant number is pkts_num_trig_pfc.

Since in dynamic threshold mode, each port's available shared buffer and pfc threshold are dynamic rather than static. and the actual pfc threshold will become smaller with consumption of free buffer.
As below:

Memory can be allocated from shared buffer for pgi  for port p if 
           Alpha * free buffer > Bp,i
Bp,i: Buffer allocated for pgi of ingress port p

Filling shared buffer with constant value which equal pfc threshold will cause ingress drop for last src port.

For example, in below case, Saw unexpected ingress drop while sending traffic to src port0 and src port1's PG3 and PG4 to fill shared buffer.

"sai_qos_tests.HdrmPoolSizeTest ... [u'10.0.0.35', u'10.0.0.37']", 
pkts num: leak_out: 36, trig_pfc: 6541, hdrm_full: 1292, hdrm_partial: 1165, pkt_size 64", 
[(0, 3, 5), (0, 4, 6), (1, 3, 5), (1, 4, 6)]", 
base counter:", 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
|                     | 5 Pfc3TxPkt | 6 Pfc4TxPkt | 1 InDiscard | 12 InDropPkt | 0 OutDiscard | 13 OutDropPkt | 11 OutUcPkt | 14 InUcPkt | 15 InNonUcPkt | 16 OutNonUcPkt | 17 OutQlen |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
| base src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    101     |       26      |       18       |     0      |, 
| base src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|  base dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       27      |       18       |     0      |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
send_packet(6541 // 1) witch dscp 3 from src_port0 to dst_port", 
Filled service pool via send pkt from src_port0, stats:", 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
|                     | 5 Pfc3TxPkt | 6 Pfc4TxPkt | 1 InDiscard | 12 InDropPkt | 0 OutDiscard | 13 OutDropPkt | 11 OutUcPkt | 14 InUcPkt | 15 InNonUcPkt | 16 OutNonUcPkt | 17 OutQlen |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
| base src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    101     |       26      |       18       |     0      |, 
|      src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    6678    |       26      |       18       |     0      |, 
| base src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|      src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|  base dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       27      |       18       |     0      |, 
|       dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |     132     |    100     |       27      |       18       |    6541    |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
send_packet(6541 // 1) witch dscp 4 from src_port0 to dst_port", 
Filled service pool via send pkt from src_port0, stats:", 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
|                     | 5 Pfc3TxPkt | 6 Pfc4TxPkt | 1 InDiscard | 12 InDropPkt | 0 OutDiscard | 13 OutDropPkt | 11 OutUcPkt | 14 InUcPkt | 15 InNonUcPkt | 16 OutNonUcPkt | 17 OutQlen |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
| base src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    101     |       26      |       18       |     0      |, 
|      src_port0_id17 |      0      |    30730    |     1977    |     1974     |      0       |       0       |     100     |   13220    |       26      |       18       |     0      |, 
| base src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|      src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    101     |       25      |       18       |     0      |, 
|  base dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       27      |       18       |     0      |, 
|       dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |     132     |    101     |       27      |       18       |   11108    |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
send_packet(6541 // 1) witch dscp 3 from src_port1 to dst_port", 
Filled service pool via send pkt from src_port1, stats:", 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
|                     | 5 Pfc3TxPkt | 6 Pfc4TxPkt | 1 InDiscard | 12 InDropPkt | 0 OutDiscard | 13 OutDropPkt | 11 OutUcPkt | 14 InUcPkt | 15 InNonUcPkt | 16 OutNonUcPkt | 17 OutQlen |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
| base src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    101     |       26      |       18       |     0      |, 
|      src_port0_id17 |      0      |    65933    |     1977    |     1974     |      0       |       0       |     100     |   13220    |       26      |       18       |     0      |, 
| base src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|      src_port1_id18 |    32591    |      0      |     3612    |     3609     |      0       |       0       |      96     |    6642    |       25      |       18       |     0      |, 
|  base dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       27      |       18       |     0      |, 
|       dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |     132     |    101     |       27      |       18       |   14040    |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
send_packet(6541 // 1) witch dscp 4 from src_port1 to dst_port", 
Filled service pool via send pkt from src_port1, stats:", 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
|                     | 5 Pfc3TxPkt | 6 Pfc4TxPkt | 1 InDiscard | 12 InDropPkt | 0 OutDiscard | 13 OutDropPkt | 11 OutUcPkt | 14 InUcPkt | 15 InNonUcPkt | 16 OutNonUcPkt | 17 OutQlen |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
| base src_port0_id17 |      0      |      0      |      3      |      0       |      0       |       0       |     100     |    101     |       26      |       18       |     0      |, 
|      src_port0_id17 |      0      |    96646    |     1977    |     1974     |      0       |       0       |     100     |   13220    |       27      |       18       |     0      |, 
| base src_port1_id18 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       25      |       18       |     0      |, 
|      src_port1_id18 |    63304    |    29716    |     8038    |     8035     |      0       |       0       |      96     |   13183    |       26      |       18       |     0      |, 
|  base dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |      96     |    100     |       27      |       18       |     0      |, 
|       dst_port_id16 |      0      |      0      |      3      |      0       |      0       |       0       |     132     |    101     |       28      |       18       |   16155    |, 
+---------------------+-------------+-------------+-------------+--------------+--------------+---------------+-------------+------------+---------------+----------------+------------+, 
        "Service pool almost filled", 

Steps to reproduce the issue:

  1. run testQosSaiHeadroomPoolSize

Describe the results you received:

Describe the results you expected:

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions