Damans227 commented on code in PR #14378:
URL: https://github.com/apache/cloudstack/pull/14378#discussion_r4233530962


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtReplugNicCommandWrapper.java:
##########
@@ -64,9 +65,7 @@ public Answer execute(final ReplugNicCommand command, final 
LibvirtComputingReso
 
             final VifDriver newVifDriver = 
libvirtComputingResource.getVifDriver(nic.getType(), nic.getName());
             final InterfaceDef interfaceDef = newVifDriver.plug(nic, "Other 
PV", oldPluggedNic.getModel().toString(), null);
-            if (command.getDetails() != null) {
-                
libvirtComputingResource.setInterfaceDefQueueSettings(command.getDetails(), 
null, interfaceDef);
-            }
+            
libvirtComputingResource.setInterfaceDefQueueSettings(command.getDetails(), 
null, interfaceDef, nic.getMultiqueueNumber(), command.getVMType() == 
VirtualMachine.Type.DomainRouter);

Review Comment:
   what happens on a replug when the value is -1? no cpu count is passed here, 
so it looks like the nic ends up with queues set to -1



##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -7471,6 +7475,26 @@ public NetworkOffering createNetworkOffering(final 
NetworkOfferingBaseCmd cmd) {
         return offering;
     }
 
+    private void validateNetworkOfferingMultiqueueParameters(Integer 
publicMultiqueueNumber, Integer privateMultiqueueNumber, GuestType guestType, 
boolean forVpc) {
+        if (guestType == GuestType.L2 && 
ObjectUtils.anyNotNull(publicMultiqueueNumber, privateMultiqueueNumber)) {
+            throw new InvalidParameterValueException("Multiqueue parameters 
cannot be specified for L2 network offerings.");
+        }
+
+        if (publicMultiqueueNumber != null) {
+            if (forVpc) {
+                throw new InvalidParameterValueException(String.format("The 
[%s] parameter cannot be specified for offerings that are meant to be used for 
VPC tiers.", ApiConstants.PUBLIC_MULTIQUEUE_NUMBER));
+            }
+
+            if (publicMultiqueueNumber <= 0 && publicMultiqueueNumber != -1) {

Review Comment:
   should we cap this at 256? the host refuses a nic with more queues than 
that, so a big number here would stop the router from starting



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to