Adding PG7 check to DscpToPgMapping#9859
Conversation
tests/saitests/py3/sai_qos_tests.py
Outdated
There was a problem hiding this comment.
all control traffic is always mapped to q7. on which platform do you see lacp and bgp packets mapped to q0 and q4 respectively?
There was a problem hiding this comment.
all control traffic is always mapped to q7. on which platform do you see lacp and bgp packets mapped to q0 and q4 respectively?
The LLDP and lacp packets received from peer will go to Q0 since it is untagged non ip packet. The BGP packets from peer are going to Q4 with the TOS value 0xC0.
There was a problem hiding this comment.
Checked with @neethajohn. We need to check why the packets aren't coming on PG=7. all control packets should go to PG=7.
There was a problem hiding this comment.
@neethajohn if you are refering to this PR #8097 and related fixes -- isn't not for the TX packets only ? i.e all the control packets being tx'ed should use queue 7.
Here @saksarav-nokia is taking about the queue used for packets RX, coming into the front panel ports. Is that also always queue 7 irrespective of the DSCP or other fields in the packet?
|
@vmittal-msft ,Could you please approve this PR? |
|
@ansrajpu-git @saksarav-nokia Could you confirm the behavior for all control packets BGP/LLDP/LACP/Macsec etc ? thanks |
|
@judyjoseph , Are you talking about the Queues assigned for these control packets received on front panel port? OR CPU?. Could you elaborate more? |
I was referring to the earlier comment from Vineet -- that all the control packets should come in queue 7 irrespective of whether it is send out of CPU port or from front panel port. We can find out the behavior we observe and talk to broadcom if that is different from what was expected. |
|
@judyjoseph , As i mentioned in the chat, the control packets received on front panel ports are queued based on the .1p or dscp values based on the packet type. SInce BGP packets are ip packets, it goes to Queue 0 based on the DSCP value. Since LLDP and LACP packets are untagged L2 packets, they are going to Queue 0. If this behavior is different from XGS, we need to check with BCM. |
|
Following up with brcm via CS00012316603 |
|
In this PR, you're modifying it for PG7, and not queue7 right? Please update the title if indeed PG7 is being checked here. |
|
@ansrajpu-git @saksarav-nokia we may need to update this PR to accommodate extra packets coming in on PG3/4 as we are not planning to change copp_cfg file to force all control packets to go to PG7. |
|
@ansrajpu-git, Since we don't plan to add any changes in this. lets close this. |
@vmittal-msft , The control packets sent from CPU are assigned to PG 7 of the port to which the control packet is sent out. The reason for this is that when CPU sends the packet out, it is sent via KNET which adds the PTCH header for DNX asic to understand the source port and the source system port is the port to which the control packet is sent out. since we send the control packets to TC=7, the tx control packets will be counted against PG 7 of the front panel port. I am checking with BCM to see why it is designed this way. If they can't fix it, then we need this PR. |
|
@vmittal-msft , BCM confirmed in csp CS00012333616 that the control packets sent from CPU to the dest port will be mapped to the PG 7( PG mapped to sai_default_cpu_tx_tc=7) of the dest port since the packets sent from CPU are KNET using PTCH header. So we need to merge this PR. |
|
@saksarav-nokia @vmittal-msft we are seeing failures in the testrun without this fix -- so there are packets coming in PG7, planning to go ahead and merge this one. Let me know any thought |
@judyjoseph , We need this PR. Please see my previous comments and also the BCM csp i mentioned. |
tests/saitests/py3/sai_qos_tests.py
Outdated
There was a problem hiding this comment.
I see this code as a common sai qos test library - do we need to add a check for broadcom DNX ASIC ? else this will get applicable to all asic platforms
There was a problem hiding this comment.
@judyjoseph , added the broadcom DNX ASIC check. Kindly review.
There was a problem hiding this comment.
thanks. My original comment was to protect just this new change i.e i=7 alone with the check for asic == dnx. The other checks for i=0, i=4 was existing earlier, will leave it as such
tests/saitests/py3/sai_qos_tests.py
Outdated
There was a problem hiding this comment.
The behavior where we see packets in PG 7 of the source port, due to TX packets from CPU sent out with TC =7 --- is Broadcom specific
Shouldn't the check be something like this -- i.e expect PG7 only if it is brcm-dnx ?
if i == 0 or i == 4 or (platform_asic and platform_asic == "broadcom-dnx" and i == 7):
tests/saitests/py3/sai_qos_tests.py
Outdated
There was a problem hiding this comment.
As discussed, lets try this logic -
i => 0 -> 7
pg => 0,3,4
dscps => 62,1,1
DNX/Chassis:
pg = 0 => Some extra packets with unmarked TC
pg = 4 => Extra packets for LACP/BGP packets
pg = 7 => packets from cpu to front panel ports
if non chassis:
if i == pg:
assert(pg_cntrs[pg] == pg_cntrs_base[pg] + len(dscps))
else:
assert(pg_cntrs[i] == pg_cntrs_base[i])
else
i = {3}
assert(pg_cntrs[pg] == pg_cntrs_base[pg] + len(dscps))
i = {0,4,7}
assert(pg_cntrs[pg] >= pg_cntrs_base[pg] + len(dscps))
else {1,2,5,6}
assert(pg_cntrs[i] == pg_cntrs_base[i])
vmittal-msft
left a comment
There was a problem hiding this comment.
Lets try commented logic to see if it works for chassis.
@vmittal-msft, as per the discussion and comments added a change for dnx chassis. Please review & comment. |
tests/saitests/py3/sai_qos_tests.py
Outdated
There was a problem hiding this comment.
@ansrajpu-git Can you please keep non DNX check same ?
There was a problem hiding this comment.
@vmittal-msft , As per the discussion and notes taken, I have implemented the changes.
the non-chassis behavior is reverted back to how it was originally implemented PR #7079
@vmittal-msft vmittal-msft 2 weeks ago
As discussed, lets try this logic -
i => 0 -> 7
pg => 0,3,4
dscps => 62,1,1
DNX/Chassis:
pg = 0 => Some extra packets with unmarked
pg = 4 => Extra packets for LACP/BGP packets
pg = 7 => packets from cpu to front panel ports
if non chassis:
if i == pg:
assert(pg_cntrs[pg] == pg_cntrs_base[pg] + len(dscps))
else:
assert(pg_cntrs[i] == pg_cntrs_base[i])
else
i = {3}
assert(pg_cntrs[pg] == pg_cntrs_base[pg] + len(dscps))
i = {0,4,7}
assert(pg_cntrs[pg] >= pg_cntrs_base[pg] + len(dscps))
else {1,2,5,6}
assert(pg_cntrs[i] == pg_cntrs_base[i])
Please confirm if more changes are required..
There was a problem hiding this comment.
@ansrajpu-git i still see some difference from the logic we discussed. Can you please check ?
There was a problem hiding this comment.
@vmittal-msft, updated the logic. Please check.
…oPgMapping" This reverts commit 16025cd8f8dab5281cdca33c00b37df963bfdb80.
|
@vmittal-msft, please help this merge to 202205 branch. |
* Qos newSAI change_adding queue7 to DscpToPGMapping * QoS_DscpToPgMapping_platform_asic check added
The issue is introduced by the PR:sonic-net#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:sonic-net#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:sonic-net#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:sonic-net#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
The issue is introduced by the PR:sonic-net#9859. This PR should be dedicated for broadcom-dnx, it should not change the logic for the remaining platform, so restore the original logic for non-broadcom-dnx.
Description of PR
With the new SAI image & the fix as part of PR# sonic-net/sonic-buildimage#16254, the DscpToPgMapping qos test needs a check on the PG7 as well because, the control packets from CPU will now come to PG7 and may increase the packet count.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
Adding pg7 to verification along with pg0 & pg4 as, the control packets from CPU will now come to pg7 and may increase the packet count.
What is the motivation for this PR?
DscpToPgMapping failed in test run.
How did you do it?
How did you verify/test it?
Executed the qos test suite.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation