Command Line Reference
DCB Configuration
PFC
17 min
it is supported to manage pfc with templates or with customized configurations templated pfc management templated pfc management by default, a default pfc threshold template exists in the system that supports globally enabling pfc for up to two queues pfc for queues 3 and 4 has been enabled by default run show pfc profiles command to display the default pfc threshold configuration customized pfc management customized pfc management configure a custom pg buffer profile to specify the pfc threshold the specific steps for configuration are as follows run priority flow control enable ingress queue id command to enable pfc for the queue globally run buffer profile buffer profile name command to create a lossless buffer profile run class map class map name command to create a class map to specify the queue run policy map policy map name command to create a policy map, and run class class map name to bind it to the class map then run priority group buffer buffer profile name command to bind to the priority group buffer profile run service policy policy map name command to apply the policy to the interface due to the complexity of custom pfc configuration, it is recommended to use default template pfc in preference pfc view pfc view table 1 pfc view table 1 pfc view true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type show interface priority flow control show interface priority flow control \[command] show interface priority flow control \[purpose] display the pfc status of interfaces \[view] privileged user view \[use cases] sonic# show interface priority flow control interface lossless priorities \ 0/0 3,4 0/4 3,4 0/8 3,4 0/12 3,4 0/16 3,4 0/20 3,4 0/24 3,4 0/28 3,4 0/32 3,4 0/36 3,4 0/40 3,4 0/44 3,4 0/48 3,4 0/52 3,4 0/56 3,4 0/60 3,4 0/64 3,4 0/68 3,4 0/72 3,4 0/76 3,4 0/80 3,4 0/84 3,4 0/88 3,4 0/92 3,4 0/96 3,4 0/100 3,4 0/104 3,4 0/108 3,4 0/112 3,4 0/116 3,4 0/120 3,4 0/124 3,4 0/128 3,4 0/129 3,4 show counters priority flow control show counters priority flow control \[command] show counters priority flow control \[purpose] display pfc counters \[view] privileged user view \[use cases] sonic# show counters priority flow control port rx pfc0 pfc1 pfc2 pfc3 pfc4 pfc5 pfc6 pfc7 \ 0/0 0 0 0 0 0 0 0 0 0/4 0 0 0 0 0 0 0 0 0/8 0 0 0 0 0 0 0 0 0/12 0 0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 0 0 0 0 0 0 0 0/76 0 0 0 0 0 0 0 0 0/80 0 0 0 0 0 0 0 0 0/84 0 0 0 0 0 0 0 0 0/88 0 0 0 0 0 0 0 0 0/92 0 0 0 0 0 0 0 0 0/96 0 0 0 0 0 0 0 0 0/100 0 0 0 0 0 0 0 0 0/104 0 0 0 0 0 0 0 0 0/108 0 0 0 0 0 0 0 0 0/112 0 0 0 0 0 0 0 0 0/116 0 0 0 0 0 0 0 0 0/120 0 0 0 0 0 0 0 0 0/124 0 0 0 0 0 0 0 0 0/128 0 0 0 0 0 0 0 0 0/129 0 0 0 0 0 0 0 0 clear counters priority flow control clear counters priority flow control \[command] clear counters priority flow control \[purpose] clear pfc counters \[view] privileged user view \[use cases] sonic# clear counters priority flow control show pfc profiles show pfc profiles \[command] show pfc profiles \[purpose] display pfc profiles \[view] privileged user view \[use cases] sonic# show pfc profile { "ingress lossless profile" { "dynamic th" "1", "pool" "ingress lossless pool", "size" "1518", "xoff" "38816", "xon offset" "13440" }, "pg lossless 1" { "dynamic th" " 4", "pool" "ingress lossless pool", "size" "1518", "xoff" "46496", "xon offset" "13440" }, "pg lossless 100000 40m profile" { "dynamic th" "1", "pool" "ingress lossless pool", "size" "1518", "xoff" "38816", "xon" "0", "xon offset" "13440" } } pfc config pfc config table 2 pfc config table 2 pfc config true 363,298#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 1 1 unhandled content type #d8e5f5 1 1 unhandled content type unhandled content type unhandled content type priority flow control enable priority flow control enable ingress queue id \[command] priority flow control enable ingress queue id \[purpose] globally enable pfc for the queue \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] global configuration view \[notes] only support up to two queues to enable pfc globally, by default, pfc of queue 3, 4 have been enabled if you want to enable pfc for other queues, please disable pfc of queue 3 or 4 first configuring the pfc global enable queue requires reload to take effect port based modification of pfc enable queues is not supported at this time run command no priority flow control enable ingress queue id to disable pfc for the queue \[use cases] sonic# configure sonic(config)# priority flow control enable 4 buffer profile buffer profile buffer profile name \[command] buffer profile buffer profile name \[purpose] configure a custom pfc buffer profile and enter buffer configuration view \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] global configuration view \[notes] run command no buffer profile profile name to delete the buffer profile \[use cases] sonic(config)# buffer profile testname sonic(config buffer profile testname)# mode lossless {static mode lossless {static static th |dynamic dynamic th } size size \[command] mode lossless { static static th | dynamic dynamic th } size size \[purpose] set a pfc lossless buffer (for cx308p 48y n v2, cx532p n v2 and cx732q n v2) (for cx308p 48y n v2, cx532p n v2 and cx732q n v2) \[parameters] true 142,519#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type \[view] buffer configuration view \[notes] info the cell size varies by model on cx308p 48y n v2, cx532p n v2 and cx732q n v2, the cell size is 128 bytes on cx864e n, the cell size is 512 bytes on other models, the cell size is 224 bytes when congestion occurs at a queue and the ingress buffer occupancy reaches the watermark, it starts sending pause frames when the sender receives a pause frame and reduces the traffic sent, the ingress buffer occupancy of the switch decreases and stops sending pause frames when the occupancy falls below the watermark the formula for calculating the pfc watermark is limit=guaranteed buffers + dynamic factor dynamic factor is 0 in static mode the sum of the lossless buffers allocated to each queue shall be no greater than the lossless pool size recommended configuration ! buffer profile lossless buffer profile mode lossless dynamic 3 size 0 \[use cases] sonic(config)# buffer profile buffer test sonic(config buffer profile buffer test)# mode lossless dynamic 3 size 0 mode lossless {static mode lossless {static static th |dynamic dynamic th } size size xoff xoff xon offset xon offset \[xon xon ] \[command] mode lossless { static static th | dynamic dynamic th } size size xoff xoff xon offset xon offset \[ xon xon ] \[purpose] set a pfc lossless buffer (for other models) (for other models) \[parameters] true 122,539#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type unhandled content type unhandled content type #d8e5f5 unhandled content type #d8e5f5 unhandled content type the parameters of dynamic lossless buffer are related to the port speed, cable length, etc the following are the recommended values \[view] buffer configuration view \[notes] when congestion occurs at a queue and the ingress buffer occupancy reaches xoff, it starts sending pause frames when the sender receives pause frames and reduces the traffic sent, the ingress buffer occupancy of the switch decreases and stops sending pause frames when the occupancy reaches xon the default ingress pause frame trigger threshold and pause frame stop threshold exist in the interface configuration when not configured by the user the sum of the lossless buffers allocated to each queue shall be no greater than the lossless pool size warning the parameters of dynamic lossless buffer are related to the port speed, cable length, etc we recommend you to use “easy roce” to automatically generate lossless parameters improper configuration may cause packet loss during traffic transmission if you want to assign them manually, the following are recommended parameters for different speeds interfaces recommended configurations for the cx864e n model recommended configurations for the cx864e n model 84,78 06766500277314,71 58646699944536,69 58646699944536,87 86932786425953,84 04463563002416,75 84543750405254 true#4283c7 center unhandled content type #4283c7 center unhandled content type #4283c7 center unhandled content type #4283c7 center unhandled content type #4283c7 center unhandled content type #4283c7 center unhandled content type #4283c7 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type #d8e5f5 center unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type #d8e5f5 center 1 1 unhandled content type recommended configurations for other models recommended configurations for other models true 84,78 06766500277314,71 58646699944536,69 58646699944536,87 86932786425953,84 04463563002416,75 84543750405254 true center #4283c7 unhandled content type center #4283c7 unhandled content type center #4283c7 unhandled content type center #4283c7 unhandled content type center #4283c7 unhandled content type center #4283c7 unhandled content type center #4283c7 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center #d8e5f5 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center 1 1 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type center #d8e5f5 unhandled content type \[use cases] sonic(config)# buffer profile pg lossless 100000 100m profile sonic(config buffer profile pg lossless 100000 100m profile)# mode lossless dynamic 1 size 1518 xoff 46496 xon offset 13440 priority group buffer priority group buffer buffer profile name \[command] priority group buffer buffer profile name \[purpose] bind the pg buffer profile to the queue at ingress \[parameters] true 330,331#4283c7 unhandled content type #4283c7 unhandled content type unhandled content type unhandled content type \[view] policy map class map configuration view \[notes] please bind an existing class map to specify the queue for policy matching, and the queue should be globally pfc enabled run command no priority group buffer buffer profile name to unbind the pg buffer profile \[use cases] sonic(config)# buffer profile pg lossless 100000 100m profile sonic(config buffer profile pg lossless 100000 100m profile)# mode lossless dynamic 1 size 1518 xoff 46496 xon offset 13440 sonic(config buffer profile pg lossless 100000 100m profile)# exit sonic(config)# polic map test1 sonic(config pmap test1)# class cmap 4 sonic(config pmap c)# priority group buffer pg lossless 100000 100m profile
