Skip to content

[AI Generated] Add NetShaper tool and MANA VF bandwidth-clamp validation - #4750

Open
VENNELA2132 wants to merge 2 commits into
microsoft:mainfrom
VENNELA2132:ernis/new_testcases/netshaper
Open

VENNELA2132 wants to merge 2 commits into
microsoft:mainfrom
VENNELA2132:ernis/new_testcases/netshaper

Conversation

@VENNELA2132

@VENNELA2132 VENNELA2132 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a generic NetShaper tool backed by upstream iproute2 and a single-node SR-IOV testcase for MANA VF bandwidth clamps on Standard_ND128isr_NDR_GB200_v6.

Changes

  • Build and install the latest upstream iproute2, including the required Azure Linux build dependencies.
  • Provide GET, SET, and DELETE operations with explicit interface, scope, handle ID, and metric parameters.
  • Parse bandwidth readback and distinguish an absent shaper from command or parsing failures.
  • Skip when the kernel lacks the net_shaper family or the driver explicitly reports an unsupported operation.
  • Validate MANA VFs using netdev scope, handle ID 1, and the bps metric.
  • Apply 100 Mbps and 1 Gbps caps, verify each bandwidth cap is applied successfully, and check bandwidth readback.
  • Remove each successfully applied cap in finally and verify its absence.
  • Add 23 unit tests covering commands, parsing, installation, Linux-only eligibility, node-state handling, and cleanup failure paths.

Validation

  • All 23 unit tests passed.
  • Black, isort, flake8, mypy, and whitespace checks passed.
  • Earlier Ubuntu 24.04 ARM64 validation on kernel 6.17 successfully exercised bandwidth clamping.
  • Ubuntu 22.04 ARM64 runs on kernels 5.15 and 6.8 confirmed the unsupported-kernel skip paths.
  • Debian 12 ARM64 skipped because the kernel lacked the net_shaper family.
  • Azure Linux 3 ARM64 successfully rebuilt upstream iproute2 as NetShaper 7.2.0. The testcase skipped on kernel 6.6.157.1-1.azl3 because the net_shaper family was unavailable.

Commits

  • 2dc4cade1 - [AI Generated] tools: add iproute2 netshaper support
  • 1ab8053b4 - [AI Generated] sriov: verify VF netshaper bandwidth clamp

Recommended Validation

The image selections below are recommended targets, not claims that every image passed.

Key Test Cases:
verify_sriov_netshaper_bandwidth_clamp

Impacted LISA Features:
Sriov

Tested Azure Marketplace Images:

  • canonical ubuntu-24_04-lts server-arm64 latest
  • microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest

Copilot AI balanced review requested due to automatic review settings October 7, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Major cleanup, node-state, and unsupported-platform handling issues remain.

3 open findings
What changed in this PR

Adds a NetShaper tool and targeted MANA VF bandwidth-clamp validation.

Changes:

  • Builds upstream iproute2 and exposes shaper operations.
  • Adds MANA VF clamp validation and cleanup.
  • Adds 17 unit tests.
File Description
selftests/​test_netshaper.py Tests commands, parsing, errors, and installation.
lisa/​tools/​netshaper.py Implements the NetShaper tool.
lisa/​tools/​__init__.py Exports NetShaper.
lisa/​microsoft/​testsuites/​network/​sriov.py Adds MANA VF clamp validation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lisa/microsoft/testsuites/network/sriov.py
Comment thread lisa/microsoft/testsuites/network/sriov.py Outdated
Comment thread lisa/tools/netshaper.py Outdated
Add a generic NetShaper tool backed by upstream iproute2 netshaper.

- Build and install the latest upstream iproute2.
- Expose GET, SET, and DELETE with explicit interface, scope, handle ID,
  and metric parameters.
- Parse shaper readback, including bandwidth units and optional netdev IDs.
- Distinguish absent shapers from command and parsing failures.
- Skip when the kernel family or requested driver operation is unsupported.
- Add unit coverage for commands, parsing, errors, and installation.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 04:28
@VENNELA2132
VENNELA2132 force-pushed the ernis/new_testcases/netshaper branch from 4f3bf0e to 7de1b9b Compare October 8, 2026 04:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Hardware-specific network mutation and runtime builds from upstream main require final human validation.

0 open findings

3 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Add single-node bandwidth-shaper validation for MANA VFs on
Standard_ND128isr_NDR_GB200_v6.

- Require Azure SR-IOV and select only MANA VF interfaces.
- Configure netdev scope, handle ID 1, and bps inside the testcase.
- Apply 100 Mbps and 1 Gbps caps and verify bandwidth readback.
- Verify each bandwidth cap is applied successfully.
- Delete each successfully applied cap in finally and verify its absence.
- Use the normal SR-IOV suite setup and teardown.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 09:34
@VENNELA2132
VENNELA2132 force-pushed the ernis/new_testcases/netshaper branch from 7de1b9b to 1ab8053 Compare October 8, 2026 09:34
@VENNELA2132

Copy link
Copy Markdown
Contributor Author

Fixed the CI unittest-discovery import failure in 1ab8053 by using the package-qualified lisa.microsoft.testsuites.network.common import. All 23 focused tests now pass without the extension-only import path; Black, isort, flake8, mypy, and whitespace checks pass. Full local discovery ran 359 tests and no longer reports the SR-IOV import error, but encountered 15 Azure preparation errors involving AzurePlatform.credential. The pushed revision needs fresh CI results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation is consistent with its stated scope and includes robust error handling and cleanup coverage.

Key Test Cases:
verify_sriov_netshaper_bandwidth_clamp

Impacted LISA Features:
NetworkInterface

Tested Azure Marketplace Images:

  • canonical ubuntu-24_04-lts server-arm64 latest
  • microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest

0 open findings

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@@ -0,0 +1,310 @@
from decimal import Decimal

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove two selftests files

This branch has not been deployed

No deployments
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.

3 participants