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

[SDFAB-844 - Part 2] Add SlicingConfig class #454

Merged
merged 38 commits into from
Jan 25, 2022

Conversation

ccascone
Copy link
Member

@ccascone ccascone commented Jan 14, 2022

This PR introduces a JSON schema for the slicing configuration as well as the SlicingConfig class for parsing the corresponding netcfg blob. The SlicingConfig class will be used by the NetcfgSlicingProvider to populate the SlicingManager stores.

TODO:

  • Improve test coverage for parsing errors

Sample JSON config:

{
  "slices": {
    "0": {
      "name": "Default",
      "tcs": {
        "REAL_TIME": {
          "queueId": 1,
          "isSystemTc": true
        }
      }
    },
    "1": {
      "name": "P4-UPF",
      "tcs": {
        "CONTROL": {
          "queueId": 2,
          "maxRateBps": "2000000"
        },
        "REAL_TIME": {
          "queueId": 3,
          "maxRateBps": "50000000"
        },
        "ELASTIC": {
          "queueId": 4,
          "gminRateBps": "10000000"
        }
      }
    },
    "2": {
      "name": "BESS-UPF",
      "tcs": {
        "ELASTIC": {
          "queueId": 5
        }
      }
    }
  }
}

Copy link
Collaborator

@pierventre pierventre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments. Do you plan to address the TODO in this PR ?

src/test/resources/slicing.json Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

❗ No coverage uploaded for pull request base (qos-refactoring@3f46e67). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 067a509 differs from pull request most recent head 20d4524. Consider uploading reports for the commit 20d4524 to get more accurate results
Impacted file tree graph

@@                Coverage Diff                 @@
##             qos-refactoring     #454   +/-   ##
==================================================
  Coverage                   ?   68.54%           
  Complexity                 ?      641           
==================================================
  Files                      ?       59           
  Lines                      ?     4393           
  Branches                   ?      483           
==================================================
  Hits                       ?     3011           
  Misses                     ?     1140           
  Partials                   ?      242           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f46e67...20d4524. Read the comment docs.

Base automatically changed from qos-refactoring-pr1 to qos-refactoring January 25, 2022 06:08
@ccascone ccascone merged commit 0c2a764 into qos-refactoring Jan 25, 2022
@ccascone ccascone deleted the qos-refactoring-pr2 branch January 25, 2022 06:23
ccascone added a commit that referenced this pull request Jan 26, 2022
* [SDFAB-844 - Part 1] Refactor SlicingManager to assume static allocation of queues to TCs (#453)

* Add SlicingProviderService interface

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove REST API for adding/removing slice/tcs

* Remove unused CLI commands

* Revisit TrafficClass and remove hardcoded initialization

Sytem is not a traffic class

* Introduce TrafficClassConfig class

* Remove queue allocation logic

* Comments and renaming on SlicingManager

* Fix meter color int value

* Less ambiguous handling of BE

* Fix tests

* Remove leftover QueueStoreValue

* Javadoc

* Wordsmithing

* Improvements to TrafficClassConfig

* Rename config class to description to disambiguate from netcfg

* Use default for mobile slice

* clean up rest API docs

* address review comments

* Fix test and checkstyles

* Move distributed store destroy to preDeactivate hook

* Update default tc javadoc

* Fix tests

* [SDFAB-844 - Part 2] Add SlicingConfig class (#454)

* Add SlicingProviderService interface

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove REST API for adding/removing slice/tcs

* Remove unused CLI commands

* Revisit TrafficClass and remove hardcoded initialization

Sytem is not a traffic class

* Introduce TrafficClassConfig class

* Remove queue allocation logic

* Comments and renaming on SlicingManager

* Fix meter color int value

* Less ambiguous handling of BE

* Fix tests

* Remove leftover QueueStoreValue

* Javadoc

* Wordsmithing

* Improvements to TrafficClassConfig

* Rename config class to description to disambiguate from netcfg

* First stab at config class

* First stab at tests for SlicingTests

* Forgot to check in the test JSON

* Consistently call it tcDescription instead of tcConfig

* Remove ability to configure best effort queue ID

For now, we can safely assume it will always be 0

* Use default for mobile slice

* clean up rest API docs

* address review comments

* Fix test and checkstyles

* Move distributed store destroy to preDeactivate hook

* Update default tc javadoc

* javadoc

* review comments

* tests

* Fix tests

* Restore double quotes in json example

* [SDFAB-844 - Part 3] Add NetcfgSlicingProvider (#457)

* Add SlicingProviderService interface

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove slice/tc initialization from FabricUpfProgrammable

We wil use netcfg for initialization

* Remove REST API for adding/removing slice/tcs

* Remove unused CLI commands

* Revisit TrafficClass and remove hardcoded initialization

Sytem is not a traffic class

* Introduce TrafficClassConfig class

* Remove queue allocation logic

* Comments and renaming on SlicingManager

* Fix meter color int value

* Less ambiguous handling of BE

* Fix tests

* Remove leftover QueueStoreValue

* Javadoc

* Wordsmithing

* Improvements to TrafficClassConfig

* Rename config class to description to disambiguate from netcfg

* First stab at config class

* First stab at tests for SlicingTests

* Forgot to check in the test JSON

* Consistently call it tcDescription instead of tcConfig

* Move constants to root package

* Centralize app name constants in one place

It was hard to kkep track of the different app names used

* Progress on netcfg slicing provider

* Working config add/remove

* Fix copyright

* Read initial config

* wordsmithing

* Dyanmic config of system tc

* Remove ability to configure best effort queue ID

For now, we can safely assume it will always be 0

* Clean up

* Use default for mobile slice

* clean up rest API docs

* address review comments

* Fix test and checkstyles

* Doubt

* Move distributed store destroy to preDeactivate hook

* Update default tc javadoc

* javadoc

* review comments

* tests

* Fix tests

* Address review comments

* Add initial tests

* Add additional tests

* Address review comments

* Add tests for system tc handling

* Re-add double quotes to javadoc config example

* Address Charles's comment

* Hardcode mobile slice to 0 for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants