You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/01/26 13:05:11 UTC
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5875: Network Throttling for Additional Networks
DaanHoogland commented on a change in pull request #5875:
URL: https://github.com/apache/cloudstack/pull/5875#discussion_r792615302
##########
File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/DirectVifDriver.java
##########
@@ -47,12 +47,7 @@
public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType, String nicAdapter, Map<String, String> extraConfig) throws InternalErrorException, LibvirtException {
LibvirtVMDef.InterfaceDef intf = new LibvirtVMDef.InterfaceDef();
- if (nic.getType() == Networks.TrafficType.Guest) {
- Integer networkRateKBps = (nic.getNetworkRateMbps() != null && nic.getNetworkRateMbps().intValue() != -1) ? nic.getNetworkRateMbps().intValue() * 128 : 0;
- intf.defDirectNet(_libvirtComputingResource.getNetworkDirectDevice(), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter),
- _libvirtComputingResource.getNetworkDirectSourceMode(), networkRateKBps);
-
- } else if (nic.getType() == Networks.TrafficType.Public) {
+ if (nic.getType() == Networks.TrafficType.Guest || nic.getType() == Networks.TrafficType.Public) {
Review comment:
for two elements I don't see the improvement in readability (yet) @GutoVeronezi . what are you suggesting?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org