Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dynamic buffer calc] Support dynamic buffer calculation #973

Merged
merged 5 commits into from
Dec 15, 2020

Commits on Dec 4, 2020

  1. Support dynamic buffer calculation

    1. commands added(see below) and testcases for new commands
    2. db_migrator:
       - migrate CONFIG_DB from old approach to the new approach
       - when system warm starts from old image to the new one,
         copies related tables from CONFIG_DB to APPL_DB for the purpose
         that buffermgrd can start smoothly
    3. warm-reboot script: don't clear BUFFER_MAX_PARAM table across warm reboot
    
    CLI list
    - config interface buffer priority-group lossless <add|set|remove>
      - config interface buffer priority-group lossless add <port> <PG> [headroom-override-profile]
        for adding the PG for the first time
        providing option headroom-override-profile means to configure the PG as headroom override
        otherwise as dynamically calculated headroom
      - config interface buffer priority-group lossless set <port> <PG> [headroom-override-profile]
        for modifying an existing PG, the option headroom-override-profile has the same meaning as "add"
      - config interface buffer priority-group lossless remove <port> [PG]
        for removing the PG specified by option PG.
        if the option isn't provided, all lossless PGs on the port will be removed
    - config buffer-profile <add|set|remove>
      To add, modify or remove buffer profiles
    - show buffer <configuration|information>
    
    Testcase covered for global config commands.
    show command unconvered due to subprocess call isn't supported by test infra
    
    Signed-off-by: Stephen Sun <stephens@nvidia.com>
    stephenxs committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    32da2bc View commit details
    Browse the repository at this point in the history
  2. Update the upgrading behavior according to the discussion with MSFT

    1. If all the buffer configuration aligns the default, use dynamic
    buffer calculation mode. Otherwise, use the traditional mode
    2. Dynamic mode is adopted in switches newly installed from scratch
    and traditional mode in switches installed from minigraph
    This is done by:
    - introducing the option --no-dynamic-buffer in "config qos reload"
      to designate whether the dynamic or traditional mode is used
    - introducing a new filed "buffer_model" in DEVICE_METADATA|localhost
      to store which buffer model currently is used
    - updating db_migrator accordingly
    
    Signed-off-by: Stephen Sun <stephens@nvidia.com>
    stephenxs committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    0685448 View commit details
    Browse the repository at this point in the history
  3. Fix all review comments and support python 3

    Review comments:
    - Add testcases for show and config command
    - Address review comments in db_migrator
    - Use "size" to represent the size of the PG and "headroom" for xoff
    - Fix typo
    
    Signed-off-by: Stephen Sun <stephens@nvidia.com>
    stephenxs committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    c237619 View commit details
    Browse the repository at this point in the history
  4. use formal command in the manual

    Signed-off-by: Stephen Sun <stephens@nvidia.com>
    stephenxs committed Dec 4, 2020
    Configuration menu
    Copy the full SHA
    a63b850 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2020

  1. Fix review comments:

    - Fix alignment error
    - Update DEVICE_METADATA|localhost.buffer_model only if it is changed
    
    Signed-off-by: Stephen Sun <stephens@nvidia.com>
    stephenxs committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    aee20c1 View commit details
    Browse the repository at this point in the history