opencomputeproject / SAI

Switch Abstraction Interface
Other
471 stars 474 forks source link

[TestGap] A test case is required to verify DSCP_TO_TC_MAP is not cleared after a port is added to a LAG #1627

Open richardyu-ms opened 1 year ago

richardyu-ms commented 1 year ago

Description:

When configure [DSCP to TC mapping] for a PortChannel member, mapped queue on the egress port(PortChannel member) is not working as expected.

*** Sympton:

In this case, the port is Ethernet124, in PortChannel104.

  1. Config DSCP_TO_TC_MAP on a port DSCP_TO_TC_MAP oid:0x1400000000067b
:~$ redis-cli -n 1 hgetall "ASIC_STATE:SAI_OBJECT_TYPE_PORT:oid:0x1000000000022"
...
12) "oid:0x1400000000067b"
13) "SAI_PORT_ATTR_QOS_TC_TO_QUEUE_MAP"
14) "oid:0x14000000000683"
15) "SAI_PORT_ATTR_QOS_TC_TO_PRIORITY_GROUP_MAP"
16) "oid:0x14000000000681"
17) "SAI_PORT_ATTR_QOS_PFC_PRIORITY_TO_QUEUE_MAP"
18) "oid:0x1400000000067d"
19) "SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL"
20) "92"
...
  1. Ingress 1000 packets from Ethernet124, and check the queue counters. The DSCP value of the packet is 4, it should be mapped to Queue 4. DSCP 4 -> TC 4 -> Queue 4
  2. Check the queue counters of egress port. We can find that the packets egress from Queue 0, which should be Queue 4.
    :~$ show queue counters Ethernet4
    Last cached time was 2022-09-09 10:37:23.910916
     Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
    ---------  -----  --------------  ---------------  -----------  ------------
    Ethernet4    UC0           1,000          104,000            0             0
    Ethernet4    UC1               0                0            0             0
    Ethernet4    UC2               0                0            0             0
    Ethernet4    UC3               0                0            0             0
    Ethernet4    UC4               0                0            0             0

    Expected

    If the same packets are ingressed from other port, the mapping is correct.

    ~$ show queue counters Ethernet4
    Last cached time was 2022-09-09 10:39:29.267222
     Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
    ---------  -----  --------------  ---------------  -----------  ------------
    Ethernet4    UC0               0                0            0             0
    Ethernet4    UC1               0                0            0             0
    Ethernet4    UC2               0                0            0             0
    Ethernet4    UC3               0                0            0             0
    Ethernet4    UC4           1,000          104,000            0             0
    Ethernet4    UC5               0                0            0             0

Test Steps:

Please confirm the DSCP_TO_TC_MAP are working as expected on ports not join port channel

  1. Config DSCP_TO_TC_MAP on a port
  2. Configure the port in DSCP_TO_TC_MAP to a port channel
  3. enable the LAG Member
  4. check all the prot in DSCP_TO_TC_MAP are working as expected
bingwang-ms commented 1 year ago

Step 3 doesn't make sense to me. Why do we need to remove the DSCP_TO_TC_MAP on ports?

bingwang-ms commented 1 year ago

Also, if we don't remove existing DSCP_TO_TC_MAP for ports, step 6 is not required.

richardyu-ms commented 1 year ago

Also, if we don't remove existing DSCP_TO_TC_MAP for ports, step 6 is not required.

simplified the steps