X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vnfs%2Fqemu%2Fqemu_dpdk_vhost_user.py;fp=vnfs%2Fqemu%2Fqemu_dpdk_vhost_user.py;h=f09ded136c7426f583f3ca1e184135db98207042;hb=3ea19952db315e88263437ed41b0c31bd3bdbdf4;hp=51c10242e25025292743f4691f07a9f5d8b91015;hpb=5bd06d3527c2ade600cab62764aed06f344986bc;p=vswitchperf.git diff --git a/vnfs/qemu/qemu_dpdk_vhost_user.py b/vnfs/qemu/qemu_dpdk_vhost_user.py index 51c10242..f09ded13 100644 --- a/vnfs/qemu/qemu_dpdk_vhost_user.py +++ b/vnfs/qemu/qemu_dpdk_vhost_user.py @@ -56,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('TOOLS')['ovs_var_tmp'] + + ',path=' + vhost_folder + 'dpdkvhostuser' + ifi, '-netdev', 'type=vhost-user,id=' + net +