Skip to content

feat: add iproute2 dcb tool support (ETS/PFC/APP) - #8

Merged
abaczek merged 1 commit into
intel:mainfrom
lkaliszc:MFD-9559
Oct 27, 2026
Merged

abaczek merged 1 commit into
intel:mainfrom
lkaliszc:MFD-9559

Conversation

@lkaliszc

Copy link
Copy Markdown
Contributor

This pull request introduces support for the Linux iproute2 dcb tool for reading and configuring Data Center Bridging (DCB) settings, alongside the legacy tools. It adds a new DcbCli class for interacting with the dcb tool, extends the API to allow selecting the tool, and provides comprehensive unit tests for the new functionality.

New DCB tool support:

  • Added the DcbCli class in mfd_dcb/dcb_wrapper.py to provide get/set operations for ETS, PFC, and APP tables via the iproute2 dcb command, including robust output parsing and error handling.
  • Introduced the DcbToolType enum in mfd_dcb/enums.py to select between legacy and dcb tools for configuration.

API extensions and integration:

  • Updated mfd_dcb/linux.py to add tool parameters to set_ets, set_pfc, and new APP table management methods (set_app, del_app, replace_app, flush_app), allowing explicit selection of the DCB tool and supporting the new dcb-based workflows. [1] [2] [3] [4] [5]
  • Modified the internal tool selection to instantiate DcbCli when tool_name == "dcb".

Examples and tests:

  • Expanded examples/linux_example.py to demonstrate setting and reading DCB configuration using the new dcb tool and the extended API. [1] [2]
  • Added a comprehensive unit test suite for DcbCli in tests/unit/test_mfd_dcb/test_dcb_wrapper.py, covering parsing, error handling, and merged configuration retrieval.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

APP parsing loses repeated protocol entries and misidentifies overlapping selectors.

1 open issue
What changed in this PR

Adds iproute2 dcb support alongside the existing Linux DCB tools.

Changes:

  • Adds ETS, PFC, and APP configuration readers.
  • Extends Linux APIs with tool selection and APP management.
  • Adds usage examples and unit tests.
File Description
tests/​unit/​test_mfd_dcb/​test_linux.py Tests new commands and legacy behavior.
tests/​unit/​test_mfd_dcb/​test_dcb_wrapper.py Tests parsing and error handling.
mfd_dcb/​linux.py Integrates tool selection and configuration commands.
mfd_dcb/​enums.py Adds the DCB tool enum.
mfd_dcb/​dcb_wrapper.py Implements iproute2 configuration readers.
examples/​linux_example.py Demonstrates the new APIs.

Review effort: Balanced

Comment thread mfd_dcb/dcb_wrapper.py Outdated
Comment thread mfd_dcb/dcb_wrapper.py Outdated
Comment thread mfd_dcb/linux.py
@lkaliszc
lkaliszc force-pushed the MFD-9559 branch 4 times, most recently from dfbe536 to 18a5b01 Compare October 22, 2026 10:19
Comment thread mfd_dcb/linux.py Outdated
@lkaliszc
lkaliszc force-pushed the MFD-9559 branch 2 times, most recently from 93f359b to 3fd0b0d Compare October 22, 2026 14:42
Comment thread mfd_dcb/linux.py Outdated
Comment thread mfd_dcb/linux.py Outdated
Comment thread mfd_dcb/dcb_wrapper.py
Comment thread mfd_dcb/linux.py Outdated
Comment thread mfd_dcb/dcb_wrapper.py Outdated
Signed-off-by: Kaliszczuk, Leszek <leszek.kaliszczuk@intel.com>
@abaczek
abaczek merged commit 4565b13 into intel:main Oct 27, 2026
23 checks passed
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