GabrielBrascher 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_r285098627
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
 ##########
 @@ -1018,72 +1019,71 @@ public String toString() {
         private String _dpdkSourcePort;
         private String _dpdkExtraLines;
 
+        /* ----- BRIDGE NET ----- */
+
         public void defBridgeNet(String brName, String targetBrName, String 
macAddr, NicModel model) {
-            defBridgeNet(brName, targetBrName, macAddr, model, 0);
+            defBridgeNet(brName, targetBrName, macAddr, model, 0, null);
         }
 
-        public void defBridgeNet(String brName, String targetBrName, String 
macAddr, NicModel model, Integer networkRateKBps) {
+        public void defBridgeNet(String brName, String targetBrName, String 
macAddr, NicModel model, Integer networkRateKBps, Integer mtu) {
             _netType = GuestNetType.BRIDGE;
             _sourceName = brName;
             _networkName = targetBrName;
             _macAddr = macAddr;
             _model = model;
             _networkRateKBps = networkRateKBps;
+            _mtu = mtu;
         }
 
-        public void defDpdkNet(String dpdkSourcePath, String dpdkPort, String 
macAddress, NicModel model, Integer networkRateKBps, String extra) {
+        /* ----- DPDK-NET ----- */
+
+        public void defDpdkNet(String dpdkSourcePath, String dpdkPort, String 
macAddress, NicModel model, Integer networkRateKBps, String extra, Integer mtu) 
{
             _netType = GuestNetType.VHOSTUSER;
             _dpdkSourcePath = dpdkSourcePath;
             _dpdkSourcePort = dpdkPort;
             _macAddr = macAddress;
             _model = model;
             _networkRateKBps = networkRateKBps;
             _dpdkExtraLines = extra;
+            _mtu = mtu;
         }
 
-        public void defDirectNet(String sourceName, String targetName, String 
macAddr, NicModel model, String sourceMode) {
-            defDirectNet(sourceName, targetName, macAddr, model, sourceMode, 
0);
-        }
+        /* ----- DIRECT-NET ----- */
 
 Review comment:
   Comments are fine, but Javadoc would be better (just an observation).

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to