-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Asymmetric PFC High Level Design
Rev | Date | Author | Change Description |
---|---|---|---|
0.1 | Volodymyr Samotiy | Initial version |
This document provides general information about the asymmetric PFC feature implementation in SONiC.
This document describes the high level design of the Assymetric PFC feature.
Definitions/Abbreviation | Description |
---|---|
PFC | Priority Flow Control |
API | Application Programmable Interface |
SAI | Switch Abstraction Interface |
This section describes the SONiC requirements for asymmetric PFC feature.
- Asymmetric PFC should be per-interface configuration parameter.
- Asymmetric PFC should be disabled by default.
- When asymmetric PFC is disabled, there is no change to standard PFC behavior.
- When asymmetric PFC is enabled, there are following changes to standard PFC behavior:
- The interface should handle incoming pause frames on all priorities, not just on lossless.
- The interface should only generate pause frames on priorities that are configured to be lossless.
- User should be able to enable and disable asymmetric PFC mode on the interfaces.
- User should be able to query configured on the interfaces asymmetric PFC mode.
New "pfc_asym" attribute should be added to "PORT" table in order to store asymmetric PFC mode.
key = PORT ; Port configuration
; field = value
pfc_asym = "on" / "off" ; Asymmetric PFC mode
...
Example of "PORT" table output after adding new "pfc_asym" attribute:
127.0.0.1:6379[4]> HGETALL PORT|Ethernet0
1) "speed"
2) "100000"
3) "lanes"
4) "0,1,2,3"
5) "alias"
6) "Ethernet0"
7) "pfc_asym"
8) "on"
"PortsOrch" should be updated in order to handle new "pfc_asym" attribute. Also "PortsOrch" should provide public API to set PFC values according to configured asymmetric mode (it is needed by PFC_WD).
When "pfc_asym" attribute is set to "on", orchagent should do the following:
- Set PFC mode attribute to the "SEPARATE" value:
SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_MODE = SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE
- Get list of lossless priorities (on which PFC is enabled).
- Set TX PFC attribute to the retrieved list of lossless priorities.
SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_TX = <bit_vector>
- Set RX PFC attribute to the list of all priorities.
SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_RX = 0xFF
When "pfc_asym" attribute is set to "off", orchagent should do the following:
- Set PFC mode attribute to the "COMBINED" value:
SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_MODE = SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED
- Get list of lossless priorities (on which PFC is enabled for TX).
- Set PFC attribute to the retrieved list of priorities.
SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL = <bit_vector>
"PfcwdOrch" should be updated in order to handle setting of PFC priorities according to the asymmetric mode, to do so it should use "PortsOrch" API for setting PFC values.
New "pfc" utility script should be implement in "sonic-utilities" in order to configure and display asymmetric pfc related information.
Usage: pfc [OPTIONS] COMMAND [ARGS]...
Utility to operate with PFC configuration.
Options:
--help Show this message and exit.
Commands:
config Set PFC configuration.
show Show PFC information.
pfc config asymmetric <on|off> <interface_name>
Global "config" command should be extended in order to add "pfc" alias to the PFC utility.
# config interface pfc ?
Usage: config interface pfc [OPTIONS] COMMAND [ARGS]...
PFC related configuration.
Options:
--help Show this message and exit.
Commands:
asymmetric Set asymmetric PFC configuration
pfc show asymmetric [<interface_name>]
# pfc show asymmetric
Interface Asymmetric
------------ ------------
Ethernet0 on
Ethernet4 off
...
The "show interface status" command is able to show the asymmetric pfc status for each port.
admin@sonic:~$ show interface status
Interface Lanes Speed MTU Alias Oper Admin Type Asym PFC
----------- --------------- ------- ----- ------- ------ ------- ------ ----------
Ethernet0 0,1,2,3 40G 9100 etp1 up up QSFP+ on
Ethernet4 4,5,6,7 40G 9100 etp2 up up QSFP+ off
Ethernet8 8,9,10,11 40G 9100 etp3 up up QSFP+ off
Ethernet12 12,13,14,15 40G 9100 etp4 up up QSFP+ off
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us