Skip to content

Comments

Fix SONiC PFC storm generation script on Arista devices#20764

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
sdszhang:pfc_gen_th5_sonic
Sep 25, 2025
Merged

Fix SONiC PFC storm generation script on Arista devices#20764
StormLiangMS merged 1 commit intosonic-net:masterfrom
sdszhang:pfc_gen_th5_sonic

Conversation

@sdszhang
Copy link
Contributor

@sdszhang sdszhang commented Sep 22, 2025

Description of PR

Summary:
Fix SONiC PFC storm generation script on Arista devices.

The PFC generation script needs to enable PFC on the fanout. However, in our fanout configuration. PORT_QOS_MAP is not configured by default. So the following code will return an error, and won't do anything.

admin@str5-7060x6-moby-512-fan-2:~$ sudo config interface pfc priority Ethernet88 4 on
Cannot find interface Ethernet88
admin@str5-7060x6-moby-512-fan-2:~$ 

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Fix the script error for Arista SONiC fanout.

How did you do it?

This script will only be called on fanout, the new change includes:

  1. create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
  2. Remove the PORT_QOS_MAP when stopping pfc storm,
  3. For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.

How did you verify/test it?

On local testbed.

Any platform specific information?

Arista SONiC fanout only.

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

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang
Copy link
Contributor Author

sdszhang commented Sep 22, 2025

@veronica-arista @lipxu @XuChen-MSFT can you help to review?

@rick-arista @davidm-arista @r12f for viz.

@rick-arista
Copy link
Contributor

LGTM

@veronica-arista
Copy link
Contributor

Also looks good to me since we do not have any testbed with Sonic fanout devices.

If anyone is running fanouts with Sonic that are configured differently than the Microsoft set-up, redis-cli -n 4 DEL "PORT_QOS_MAP|{intf}" may interfere with their normal settings.

@sdszhang
Copy link
Contributor Author

Also looks good to me since we do not have any testbed with Sonic fanout devices.

If anyone is running fanouts with Sonic that are configured differently than the Microsoft set-up, redis-cli -n 4 DEL "PORT_QOS_MAP|{intf}" may interfere with their normal settings.

It's a good point. We can handle it in another PR later if different type of config is found.

Copy link
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 83918cc into sonic-net:master Sep 25, 2025
20 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Sep 26, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #20830

mssonicbld pushed a commit that referenced this pull request Sep 26, 2025
This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.
vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.
yifan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 14, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: YiFan Wang <yifan@nexthop.ai>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
…0764)

This script will only be called on fanout, the new change includes:

create the PORT_QOS_MAP entry before calling config interface pfc priority {intf} {prio} on
Remove the PORT_QOS_MAP when stopping pfc storm,
For SONiC fanout, use self._shellCmd() instead of incorrect self._cliCmd() when disabling PFC.
How did you verify/test it?
On local testbed.

Any platform specific information?
Arista SONiC fanout only.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202503: Azure/sonic-mgmt.msft#1035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants