dellemc.enterprise_sonic.sonic_qos_buffer module – Manage QoS buffer configuration on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_qos_buffer.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
- This module provides configuration management of QoS buffer for devices running SONiC 
Parameters
| Parameter | Comments | 
|---|---|
| QoS buffer configuration | |
| Buffer pools configuration | |
| Name of buffer pool Choices: 
 | |
| Amount of shared buffer space in bytes, must be less than pool size Required non-key attribute | |
| Buffer profiles configuration static_threshold and dynamic_threshold are mutually exclusive required non-key attributes | |
| Dynamic threshold value Range -6-3 | |
| Name of buffer profile | |
| Threshold value at which to stop traffic from peer Range 46080-8388608 Configurable for ingress lossless pool | |
| Name of buffer pool Required non-key attribute Choices: 
 | |
| Size of reserved buffer in bytes Required non-key attribute | |
| Static threshold for the shared usage in bytes | |
| The state of the configuration after module completion Replaced and overridden states are not supported for this module due to configuration constraints Choices: 
 | 
Notes
Note
- Tested against Enterprise SONiC Distribution by Dell Technologies. 
- Supports - check_mode.
- The SONiC buffer initialization command must be executed before attempting to apply 
- the configuration commands provided in this resource module. The buffer initialization will cause 
- the switch to reboot. See the “playbooks/common_examples/QoS_buffer_init.yaml” file 
- in this repo for an example playbook that initializes the buffers, waits for the reboot, 
- then proceeds with execution of QoS buffer configuration commands. Alternatively, make use of the 
- sonic_roce resource module to enable RoCEv2 default buffer configuration. 
Examples
# Using Merged
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep buffer
# buffer init lossless
# buffer pool ingress_lossless_pool shared-headroom-size 1000000
  - name: Merge QoS buffer configuration
    dellemc.enterprise_sonic.sonic_qos_buffer:
      config:
        buffer_pools:
          - name: ingress_lossless_pool
            xoff: 3500000
        buffer_profiles:
          - name: profile1
            pool: ingress_lossless_pool
            size: 45
            static_threshold: 25
            pause_threshold: 55000
          - name: profile2
            pool: egress_lossless_pool
            size: 85
            dynamic_threshold: -2
          - name: profile3
            pool: egress_lossy_pool
            size: 90
            static_threshold: 30
      state: merged
# After state:
# ------------
#
# sonic# show running-configuration | grep buffer
# buffer init lossless
# buffer pool ingress_lossless_pool shared-headroom-size 3500000
# buffer profile profile1 ingress_lossless_pool 45 static-threshold 25 pause pause-threshold 55000
# buffer profile profile2 egress_lossy_pool 85 dynamic-threshold -2
# buffer profile profile3 egress_lossless_pool 90 static-threshold 30
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show running-configuration | grep buffer
# buffer init lossless
# buffer pool ingress_lossless_pool shared-headroom-size 3500000
# buffer profile profile1 ingress_lossless_pool 45 static-threshold 25 pause pause-threshold 55000
# buffer profile profile2 egress_lossy_pool 85 dynamic-threshold -2
# buffer profile profile3 egress_lossless_pool 90 static-threshold 30
  - name: Delete QoS buffer profile configuration
    dellemc.enterprise_sonic.sonic_qos_buffer:
      config:
        buffer_profiles:
          - name: profile1
            static_threshold: 25
            pause_threshold: 55000
          - name: profile2
            dynamic_threshold: -2
          - name: profile3
      state: deleted
# After state:
# ------------
#
# sonic# show running-configuration | grep buffer
# buffer init lossless
# buffer pool ingress_lossless_pool shared-headroom-size 3500000
# buffer profile profile1 ingress_lossless_pool 45
# buffer profile profile2 egress_lossy_pool 85
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| The resulting configuration model invocation. Returned: when changed Sample:  | |
| The generated configuration model invocation. Returned: when  Sample:  | |
| The configuration prior to the model invocation. Returned: always Sample:  | |
| The set of commands pushed to the remote device. Returned: always Sample:  | 
