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 2020/04/29 16:50:01 UTC

[GitHub] [cloudstack] nvazquez commented on a change in pull request #4048: Update DpdkDriverImpl.java to support DPDK trunk interfaces

nvazquez commented on a change in pull request #4048:
URL: https://github.com/apache/cloudstack/pull/4048#discussion_r417462425



##########
File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/dpdk/DpdkDriverImpl.java
##########
@@ -70,10 +70,12 @@ public void addDpdkPort(String bridgeName, String port, String vlan, DpdkHelper.
                 dpdkPortVhostUserClientType;
 
         StringBuilder stringBuilder = new StringBuilder();
-        stringBuilder.append(String.format("ovs-vsctl add-port %s %s " +
-                "vlan_mode=access tag=%s " +
-                "-- set Interface %s type=%s", bridgeName, port, vlan, port, type));
-
+        stringBuilder.append(String.format("ovs-vsctl add-port %s %s ", bridgeName, port));
+        if (Integer.parseInt(vlan) > 0 && Integer.parseInt(vlan) < 4095) {
+            stringBuilder.append(String.format("vlan_mode=access tag=%s ", vlan));
+        }
+        stringBuilder.append(String.format("-- set Interface %s type=%s", port, type));
+        

Review comment:
       Packages failing with: 
   ````
   [ERROR] /jenkins/workspace/acs-pr-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.14.0.0-SNAPSHOT/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/dpdk/DpdkDriverImpl.java:78: Line has trailing spaces. [RegexpSingleline]
   ````
   
   @mbrashearnttglobalnet can you refactor this line space as a linux carriage?




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