Skip to content

MMU Allocation

lguohan edited this page May 30, 2017 · 1 revision

Overview

SWSS supports buffer configuration for queue and pool level by providing the pre-calculated values. However, for lossless traffic class, the headroom and xon buffer size for each queue depends on the port speed and cable length. Ideally, the user should just specify the number of lossless traffic class, and then SWSS should generate the correct buffer size based on the port speed and cable length configuration.

The port speed can be found in the minigraph while the cable length can be specified in the minigraph for each port.

Design

If user does not provide its own buffer.json, then SWSS container should generate a default buffer.json based on the loss/lossless queue assignment. Such assignment can be encoded into the minigraph. For example, when the minigraph specifies two lossless queue, then the SWSS should generate a default MMU configuration for the two lossless queues based on the port speed and cable length.

Current thinking is to use j2 template to generate the buffer.json. Such template is ASIC specific and should be provided by the ASIC vendor.

The input of the template should be following:

  • number of lossless queue for each port and their queue indexes
  • number of lossy queue for each port and their queue indexes

The template has following assumptions:

  • queue configurations are the same for each port
  • two lossless queues for each port at maximum
  • DWRR scheduling for the port

Other considerations

In case the information is not yet available in the minigraph, e.g., maximum cable length, we can use other yaml file to hardcode those values for development purpose.

Clone this wiki locally