Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@
"eStrKey": "Pattern"
},

"PORT_QOS_MAP_APPLY_EMPTY_PFC": {
"desc": "Configure port pfc enable with empty string to disable PFC on all queues."
},

"PORT_QOS_MAP_APPLY_EMPTY_PFCWD": {
"desc": "Configure port pfcwd_sw_enable with empty string to disable watchdog on all queues."
},

"TC_TO_DSCP_MAP_CRETAE": {
"desc": "Configure a Traffic class to DSCP map."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,64 @@
}
},

"PORT_QOS_MAP_APPLY_EMPTY_PFC": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet4",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet4",
"tpid": "0x8100",
"speed": "25000"
}
]
}
},
"sonic-port-qos-map:sonic-port-qos-map": {
"sonic-port-qos-map:PORT_QOS_MAP": {
"PORT_QOS_MAP_LIST": [
{
"ifname": "Ethernet4",
"pfc_enable": ""
}
]
}
}
},

"PORT_QOS_MAP_APPLY_EMPTY_PFCWD": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet4",
"lanes": "65",
"mtu": "9000",
"name": "Ethernet4",
"tpid": "0x8100",
"speed": "25000"
}
]
}
},
"sonic-port-qos-map:sonic-port-qos-map": {
"sonic-port-qos-map:PORT_QOS_MAP": {
"PORT_QOS_MAP_LIST": [
{
"ifname": "Ethernet4",
"pfcwd_sw_enable": ""
}
]
}
}
},

"TC_TO_DSCP_MAP_CRETAE": {
"sonic-tc-dscp-map:sonic-tc-dscp-map": {
"sonic-tc-dscp-map:TC_TO_DSCP_MAP": {
Expand Down
8 changes: 5 additions & 3 deletions src/sonic-yang-models/yang-models/sonic-port-qos-map.yang
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,18 @@ module sonic-port-qos-map {

leaf pfc_enable {
type string {
pattern "[0-7](,[0-7])*";
pattern "([0-7](,[0-7])*)?";
}
description
"Specify the queue(s) on which PFC is enabled. Empty string is allowed to disable PFC on all queues.";
}

leaf pfcwd_sw_enable {
type string {
pattern "[0-7](,[0-7])*";
pattern "([0-7](,[0-7])*)?";
}
description
"Specify the queue(s) on which software pfc watchdog are enabled.";
"Specify the queue(s) on which software pfc watchdog are enabled. Empty string is allowed to disable watchdog on all queues.";
}

leaf pfc_to_queue_map {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it possible to also help see if pfc_to_queue and pfc_to_pg map can be ignored too?

Copy link
Copy Markdown
Collaborator Author

@stephenxs stephenxs Apr 13, 2025

Choose a reason for hiding this comment

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

Hi @r12f
Thanks for the comments
I do not suggest doing so, because

  1. It suffices to disable PFC on both directions by clearing pfc_enable
  2. The ASIC always have PFC to queue and PFC to PG mappings. Not setting them means keeping them as the default. the customer won't understand what the mappings are, which is not good

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah, Stephen, what I mean is to allow the empty list. and looks like it is ok.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@kperumalbfn for viz to make sure it matches with our generated policies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@stephenxs could you also disable PFC in PORT_QOS_MAP SKU specific j2 configs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@kperumalbfn
Already done here by providing generate_lossless_tc_list generating empty PFC enable and PFC watchdog enable bitmaps.

Expand Down
Loading