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 2019/03/15 08:27:06 UTC

[GitHub] [cloudstack] gmueller-ewerk commented on a change in pull request #3186: Add possibility to set KVM MTU size for NIC

gmueller-ewerk commented on a change in pull request #3186: Add possibility to set KVM MTU size for NIC
URL: https://github.com/apache/cloudstack/pull/3186#discussion_r265885365
 
 

 ##########
 File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
 ##########
 @@ -203,6 +202,12 @@ public boolean parseDomainXML(String domXML) {
                 String model = getAttrValue("model", "type", nic);
                 String slot = StringUtils.removeStart(getAttrValue("address", "slot", nic), "0x");
 
+                String mtuAttrValue = getAttrValue("mtu", "size", nic);
+                int mtu = 1500;
+                if (mtuAttrValue != null) {
+                    mtu = Integer.parseInt(mtuAttrValue);
+                }
 
 Review comment:
   Correct. I change it the an **Integer** with default null value.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services