[Nexthop][fboss2-dev] Add QoS buffermap configuration support#789
Closed
manoharan-nexthop wants to merge 1 commit into
Closed
[Nexthop][fboss2-dev] Add QoS buffermap configuration support#789manoharan-nexthop wants to merge 1 commit into
manoharan-nexthop wants to merge 1 commit into
Conversation
This was referenced Jan 8, 2026
4aedab0 to
4daa3c0
Compare
4daa3c0 to
a299448
Compare
77f6f22 to
fabd6db
Compare
3418ae4 to
b1ba451
Compare
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jan 28, 2026
Summary: **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` Add end-to-end tests to be run on an FBOSS DUT to validate CLI commands. Note: this change is part of a series, the previous one is #761, the next one is #789. Pull Request resolved: #783 Test Plan: New end-to-end test coverage for `fboss2-dev config interface <name> mtu <N>` and `fboss2-dev config interface <name> description <string>` Sample output of `run_test.py cli`: ``` Setting fboss environment variables Running CLI end-to-end tests... ########## Running CLI test: test_config_interface_description.py [ PASSED ] test_config_interface_description.py (84.0s) ########## Running CLI test: test_config_interface_mtu.py [ PASSED ] test_config_interface_mtu.py (71.8s) ============================================================ CLI Test Summary ============================================================ Passed: 2 Failed: 0 Total: 2 Time: 155.8s ``` Detailed output of each test suite: ``` ============================================================ CLI E2E Test: config interface <name> description <string> ============================================================ [Step 1] Finding an interface to test... Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev [CLI] Running: show interface [CLI] Completed in 18.14s: show interface Using interface: eth1/1/1 (VLAN: 2001) [Step 2] Getting current description... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 17.78s: show interface eth1/1/1 Current description: 'Test revision 2' [Step 3] Setting description to 'CLI_E2E_TEST_DESCRIPTION'... [CLI] Running: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION [CLI] Completed in 0.06s: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION [CLI] Running: config session commit [CLI] Completed in 7.43s: config session commit Description set to 'CLI_E2E_TEST_DESCRIPTION' [Step 4] Verifying description via 'show interface'... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 21.38s: show interface eth1/1/1 Verified: Description is 'CLI_E2E_TEST_DESCRIPTION' [Step 5] Restoring original description ('Test revision 2')... [CLI] Running: config interface eth1/1/1 description Test revision 2 [CLI] Completed in 0.05s: config interface eth1/1/1 description Test revision 2 [CLI] Running: config session commit [CLI] Completed in 6.34s: config session commit Restored description to 'Test revision 2' [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.31s: show interface eth1/1/1 ============================================================ TEST PASSED ============================================================ ``` ``` ============================================================ CLI E2E Test: config interface <name> mtu <N> ============================================================ [Step 1] Finding an interface to test... Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev [CLI] Running: show interface [CLI] Completed in 21.35s: show interface Using interface: eth1/1/1 (VLAN: 2001) [Step 2] Getting current MTU... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.47s: show interface eth1/1/1 Current MTU: 9000 [Step 3] Setting MTU to 1500... [CLI] Running: config interface eth1/1/1 mtu 1500 [CLI] Completed in 0.06s: config interface eth1/1/1 mtu 1500 [CLI] Running: config session commit [CLI] Completed in 6.52s: config session commit MTU set to 1500 [Step 4] Verifying MTU via 'show interface'... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.33s: show interface eth1/1/1 Verified: MTU is 1500 [Step 5] Verifying kernel interface MTU... Running: ip link show fboss2001 Verified: Kernel interface fboss2001 has MTU 1500 [Step 6] Restoring original MTU (9000)... [CLI] Running: config interface eth1/1/1 mtu 9000 [CLI] Completed in 0.05s: config interface eth1/1/1 mtu 9000 [CLI] Running: config session commit [CLI] Completed in 5.60s: config session commit Restored MTU to 9000 ============================================================ TEST PASSED ============================================================ ``` ``` Reviewed By: KevinYakar Differential Revision: D91234274 Pulled By: joseph5wu fbshipit-source-id: c17fd9fa5f63b59ceb61bf82f18fc0eee2606dc2
b1ba451 to
0f56ea6
Compare
Contributor
|
@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D91714907. |
joseph5wu
requested changes
Feb 11, 2026
joseph5wu
left a comment
Contributor
There was a problem hiding this comment.
Sorry about the delayed review.
There're several main improvements from this PR:
- Make the cli_metadata.thrift less bound with agent especially we know bgp cli is also coming.
- Check whether
std::vector<utils::LocalOption> LocalOptionscan support the multiple options for your qos command - Coldboot and Warmboot supports
Let me know if you have any questions
0f56ea6 to
40222ab
Compare
Contributor
|
@manoharan-nexthop has updated the pull request. You must reimport the pull request before landing. |
40222ab to
e1489a2
Compare
Contributor
|
@manoharan-nexthop has updated the pull request. You must reimport the pull request before landing. |
e1489a2 to
723d796
Compare
Contributor
|
@manoharan-nexthop has updated the pull request. You must reimport the pull request before landing. |
1. Some of the configuration commands like QoS buffer pool modification
requires an agent restart and some are hitless. Inorder to take
appropriate action during the commit, track the highest impact action by
storing the same in `$HOME/.fboss2/action_level` at the end of each
configuration change. The proposed change only prints a warning if the
action needs to be taken. Later this can be modified to perform the
action automatically
2. Add QoS buffer pool configuration commands
```
- fboss2 config qos buffer-pool <name> shared-bytes <value>
- fboss2 config qos buffer-pool <name> headroom-bytes <value>
- fboss2 config qos buffer-pool <name> reserved-bytes <value>
```
1. Updated existing UT for action information
2. Added new tests for QoS buffer bool configurations.
```
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config qos buffer-pool testpool headroom-bytes 1024
Successfully set headroom-bytes for buffer-pool 'testpool' to 1024
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config session diff
--- current live config
+++ session config
@@ -121,6 +121,12 @@
"arpAgerInterval": 5,
"arpRefreshSeconds": 20,
"arpTimeoutSeconds": 60,
+ "bufferPoolConfigs": {
+ "testpool": {
+ "headroomBytes": 1024,
+ "sharedBytes": 0
+ }
+ },
"clientIdToAdminDistance": {
"0": 20,
"1": 1,
[admin@fboss101 ~]$ ll ~/.fboss2
total 216
-rw-r--r-- 1 admin admin 213283 Jan 13 05:15 agent.conf
-rw-r--r-- 1 admin admin 42 Jan 13 05:15 conf_metadata.json
[admin@fboss101 ~]$ cat ~/.fboss2/conf_metadata.json
{
"action": {
"WEDGE_AGENT": "AGENT_RESTART"
}
}
```
723d796 to
de5878d
Compare
Contributor
|
@manoharan-nexthop has updated the pull request. You must reimport the pull request before landing. |
Contributor
|
@joseph5wu merged this pull request in d6c402e. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Feb 17, 2026
…mand. (#791) Summary: **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` Implements a new fboss2-dev CLI command to configure the access VLAN for an interface (switchport). This allows operators to change which VLAN a port belongs to. The command syntax is: ``` config interface <port> switchport access vlan <vlan-id> ``` Where: - `<port>` is the interface name (e.g., eth1/1/1) - `<vlan-id>` is the VLAN ID (1-4094) Note: This command doesn't yet automatically create the VLAN if it doesn't exist. The VLAN must already be configured in the system. Since VLAN membership changes cannot be applied dynamically via `reloadConfig()`, this change requires an agent warmboot to take effect. Note: this change is part of a series, the previous one is #789, the next one is #805. Pull Request resolved: #791 Test Plan: ## New unit tests ``` Note: Google Test filter = *SwitchportAccessVlan* [==========] Running 13 tests from 1 test suite. [----------] Global test environment set-up. [----------] 13 tests from CmdConfigInterfaceSwitchportAccessVlanTestFixture [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMin [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMin (3 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMax [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMax (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdValidMid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdZeroInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdZeroInvalid (7 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdTooHighInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdTooHighInvalid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNegativeInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNegativeInvalid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNonNumericInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNonNumericInvalid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdEmptyInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdEmptyInvalid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdMultipleValuesInvalid [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdMultipleValuesInvalid (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdOutOfRangeErrorMessage [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdOutOfRangeErrorMessage (1 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNonNumericErrorMessage [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.vlanIdNonNumericErrorMessage (0 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.queryClientSetsIngressVlanMultiplePorts [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.queryClientSetsIngressVlanMultiplePorts (21 ms) [ RUN ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.queryClientThrowsOnEmptyInterfaceList [ OK ] CmdConfigInterfaceSwitchportAccessVlanTestFixture.queryClientThrowsOnEmptyInterfaceList (5 ms) [----------] 13 tests from CmdConfigInterfaceSwitchportAccessVlanTestFixture (49 ms total) [----------] Global test environment tear-down [==========] 13 tests from 1 test suite ran. (49 ms total) [ PASSED ] 13 tests. ``` ## New end-to-end tests on minipack3 ``` ============================================================ CLI E2E Test: config interface <name> switchport access vlan <N> ============================================================ [Step 1] Finding an interface to test... [CLI] Running: show interface [CLI] Completed in 0.08s: show interface Using interface: eth1/1/1 (VLAN: 2005) [Step 2] Getting current access VLAN... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 0.07s: show interface eth1/1/1 Current access VLAN: 2005 [Step 3] Setting access VLAN to 2006... [CLI] Running: config interface eth1/1/1 switchport access vlan 2006 [CLI] Completed in 0.06s: config interface eth1/1/1 switchport access vlan 2006 [CLI] Running: config session commit [CLI] Completed in 8.49s: config session commit [CLI] Agent is ready (waited 7.6s) [CLI] Applied info: {"localhost": {"lastAppliedInMs": 1771036580360}} Access VLAN set to 2006 [Step 4] Verifying access VLAN via 'show interface'... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 0.07s: show interface eth1/1/1 Verified: Access VLAN is 2006 [Step 5] Restoring original access VLAN (2005)... [CLI] Running: config interface eth1/1/1 switchport access vlan 2005 [CLI] Completed in 0.06s: config interface eth1/1/1 switchport access vlan 2005 [CLI] Running: config session commit [CLI] Completed in 9.92s: config session commit [CLI] Agent is ready (waited 7.7s) [CLI] Applied info: {"localhost": {"lastAppliedInMs": 1771036598267}} Restored access VLAN to 2005 [CLI] Running: show interface eth1/1/1 [CLI] Completed in 0.08s: show interface eth1/1/1 ============================================================ TEST PASSED ============================================================ ``` ## Sample usage ``` [admin@fboss101 ~]$ /opt/fboss/bin/fboss2-dev config interface eth1/1/1 switchport access vlan 2007 Successfully set access VLAN for interface(s) eth1/1/1 to 2007 [admin@fboss101 ~]$ /opt/fboss/bin/fboss2-dev config session diff --- current live config +++ session config @@ -2178,7 +2178,7 @@ "2": "eth1/5/1" }, "expectedNeighborReachability": [], - "ingressVlan": 2005, + "ingressVlan": 2007, "logicalID": 9, "lookupClasses": [], "loopbackMode": 0, @@ -7061,7 +7061,7 @@ "emitTags": false, "logicalPort": 9, "spanningTreeState": 2, - "vlanID": 2005 + "vlanID": 2007 } ], "vlans": [ ``` Reviewed By: shiva-menta Differential Revision: D93503282 Pulled By: joseph5wu fbshipit-source-id: 65cf2cbbbb3fc8cf46b71079a89701fb8e0ccad2
dzarista
pushed a commit
to dzarista/fboss
that referenced
this pull request
Feb 19, 2026
Summary: **Pre-submission checklist** - [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install` - [x] `pre-commit run` Add end-to-end tests to be run on an FBOSS DUT to validate CLI commands. Note: this change is part of a series, the previous one is facebook#761, the next one is facebook#789. Pull Request resolved: facebook#783 Test Plan: New end-to-end test coverage for `fboss2-dev config interface <name> mtu <N>` and `fboss2-dev config interface <name> description <string>` Sample output of `run_test.py cli`: ``` Setting fboss environment variables Running CLI end-to-end tests... ########## Running CLI test: test_config_interface_description.py [ PASSED ] test_config_interface_description.py (84.0s) ########## Running CLI test: test_config_interface_mtu.py [ PASSED ] test_config_interface_mtu.py (71.8s) ============================================================ CLI Test Summary ============================================================ Passed: 2 Failed: 0 Total: 2 Time: 155.8s ``` Detailed output of each test suite: ``` ============================================================ CLI E2E Test: config interface <name> description <string> ============================================================ [Step 1] Finding an interface to test... Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev [CLI] Running: show interface [CLI] Completed in 18.14s: show interface Using interface: eth1/1/1 (VLAN: 2001) [Step 2] Getting current description... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 17.78s: show interface eth1/1/1 Current description: 'Test revision 2' [Step 3] Setting description to 'CLI_E2E_TEST_DESCRIPTION'... [CLI] Running: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION [CLI] Completed in 0.06s: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION [CLI] Running: config session commit [CLI] Completed in 7.43s: config session commit Description set to 'CLI_E2E_TEST_DESCRIPTION' [Step 4] Verifying description via 'show interface'... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 21.38s: show interface eth1/1/1 Verified: Description is 'CLI_E2E_TEST_DESCRIPTION' [Step 5] Restoring original description ('Test revision 2')... [CLI] Running: config interface eth1/1/1 description Test revision 2 [CLI] Completed in 0.05s: config interface eth1/1/1 description Test revision 2 [CLI] Running: config session commit [CLI] Completed in 6.34s: config session commit Restored description to 'Test revision 2' [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.31s: show interface eth1/1/1 ============================================================ TEST PASSED ============================================================ ``` ``` ============================================================ CLI E2E Test: config interface <name> mtu <N> ============================================================ [Step 1] Finding an interface to test... Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev [CLI] Running: show interface [CLI] Completed in 21.35s: show interface Using interface: eth1/1/1 (VLAN: 2001) [Step 2] Getting current MTU... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.47s: show interface eth1/1/1 Current MTU: 9000 [Step 3] Setting MTU to 1500... [CLI] Running: config interface eth1/1/1 mtu 1500 [CLI] Completed in 0.06s: config interface eth1/1/1 mtu 1500 [CLI] Running: config session commit [CLI] Completed in 6.52s: config session commit MTU set to 1500 [Step 4] Verifying MTU via 'show interface'... [CLI] Running: show interface eth1/1/1 [CLI] Completed in 19.33s: show interface eth1/1/1 Verified: MTU is 1500 [Step 5] Verifying kernel interface MTU... Running: ip link show fboss2001 Verified: Kernel interface fboss2001 has MTU 1500 [Step 6] Restoring original MTU (9000)... [CLI] Running: config interface eth1/1/1 mtu 9000 [CLI] Completed in 0.05s: config interface eth1/1/1 mtu 9000 [CLI] Running: config session commit [CLI] Completed in 5.60s: config session commit Restored MTU to 9000 ============================================================ TEST PASSED ============================================================ ``` ``` Reviewed By: KevinYakar Differential Revision: D91234274 Pulled By: joseph5wu fbshipit-source-id: c17fd9fa5f63b59ceb61bf82f18fc0eee2606dc2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
$HOME/.fboss2/conf_metadata.json at the end of each configuration change. And at the end of the commit, it will perform the agent restart. Current proposal has thewedge_agentto be restarted. Other agent restart can be added in future.Note: this change is part of a series, the previous one is #783.
Test Plan
CmdConfigQosBufferPool.ConfigSessionTestFixture.