testpmd_pvp: Adds pkt_fwd to allow pvp topology testing
[vswitchperf.git] / vnfs / qemu / qemu_dpdk_vhost_user.py
index fc46aba..f09ded1 100644 (file)
@@ -39,6 +39,12 @@ class QemuDpdkVhostUser(IVnfQemu):
         else:
             queue_str, mq_vector_str = '', ''
 
+        # Guest merge buffer setting
+        if S.getValue('GUEST_NIC_MERGE_BUFFERS_DISABLE')[self._number]:
+            merge_buff = 'mrg_rxbuf=off,'
+        else:
+            merge_buff = ''
+
         # calculate index of first interface, i.e. check how many
         # interfaces has been created for previous VMs, where 1st NIC
         # of 1st VM has index 0
@@ -50,9 +56,16 @@ class QemuDpdkVhostUser(IVnfQemu):
             ifi = str(index)
             net = 'net' + str(index + 1)
 
+            # In case of testpmd as switch, path to vhost netdev folder will be set
+            # to tmp location instead of default ovs_var_tmp folder.
+            if S.getValue('VSWITCH') == 'none':
+                vhost_folder = '/tmp/'
+            else:
+                vhost_folder = S.getValue('TOOLS')['ovs_var_tmp']
+
             self._cmd += ['-chardev',
                           'socket,id=char' + ifi +
-                          ',path=' + S.getValue('OVS_VAR_DIR') +
+                          ',path=' + vhost_folder +
                           'dpdkvhostuser' + ifi,
                           '-netdev',
                           'type=vhost-user,id=' + net +
@@ -60,7 +73,8 @@ class QemuDpdkVhostUser(IVnfQemu):
                           '-device',
                           'virtio-net-pci,mac=' +
                           self._nics[nic]['mac'] +
-                          ',netdev=' + net + ',csum=off,gso=off,' +
+                          ',netdev=' + net + ',csum=off,' + merge_buff +
+                          'gso=off,' +
                           'guest_tso4=off,guest_tso6=off,guest_ecn=off' +
                           mq_vector_str,
                          ]