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

Network rate must be multiplied by 125 not 128 #10645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rubueno
Copy link
Contributor

@Rubueno Rubueno commented Apr 1, 2025

Description

This PR fixes a minor bug in the libvirt domain xml concering the interface bandwidth. In a libvirt domain xml when nw_rate=5000 the kilobytes per second configured in the interface is 640000 which is 5.12 Gbit/s. Which is more than the configured network rate of 5Gbit/s. So instead multiply by 125 (1 Megabit = 125 Kilobyte). 5000 * 125 = 625000 KB/s = 5Gbit/s

QoS is defined in Kilobytes per second according to libvirt docs

average
Specifies the desired average bit rate for the interface being shaped (in kilobytes/second).

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

Untested, but the change is trivial.

How did you try to break this feature and the system with this change?

N/A

@wido wido self-requested a review April 1, 2025 14:50
Copy link
Contributor

@wido wido left a comment

Choose a reason for hiding this comment

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

Change looks good. We need to multiple by 125 when working with Bits. If it would be bytes we would need to convert with 128.

This change looks good to make the proper calculation.

LGTM

@DaanHoogland
Copy link
Contributor

@Rubueno , i am assuming you are testing this in production, are you? ;)

Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 16.30%. Comparing base (2dfe6a6) to head (46c7846).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...m/cloud/hypervisor/kvm/resource/VifDriverBase.java 60.00% 1 Missing and 1 partial ⚠️
...cloud/hypervisor/kvm/resource/BridgeVifDriver.java 0.00% 1 Missing ⚠️
...cloud/hypervisor/kvm/resource/DirectVifDriver.java 0.00% 1 Missing ⚠️
...om/cloud/hypervisor/kvm/resource/IvsVifDriver.java 0.00% 1 Missing ⚠️
...om/cloud/hypervisor/kvm/resource/OvsVifDriver.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10645   +/-   ##
=========================================
  Coverage     16.30%   16.30%           
- Complexity    13448    13449    +1     
=========================================
  Files          5674     5675    +1     
  Lines        499203   499254   +51     
  Branches      60369    60372    +3     
=========================================
+ Hits          81408    81427   +19     
- Misses       408726   408754   +28     
- Partials       9069     9073    +4     
Flag Coverage Δ
uitests 3.99% <ø> (-0.01%) ⬇️
unittests 17.16% <40.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

In a libvirt domain xml when nw_rate=5000 the kilobytes per second
configured in the interface is 640000 which is 5.12 Gbit/s. Which is
more than the configured network rate of 5Gbit/s. So instead multiply by
125.
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants