kvm: Add support for DPDK trunk interfaces (#4048)

Update to support trunk interfaces for DPDK enabled hosts
This commit is contained in:
mbrashearnttglobalnet 2020-06-11 21:47:36 -07:00 committed by GitHub
parent 195385f5b9
commit 9727548dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -70,9 +70,11 @@ public class DpdkDriverImpl extends AdapterBase implements DpdkDriver {
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));
if (vHostUserMode == DpdkHelper.VHostUserMode.CLIENT) {
stringBuilder.append(String.format(" options:vhost-server-path=%s/%s",