X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vnfs%2Fqemu%2Fqemu.py;h=9382edef92c50d8078926dc0833d986118b581ee;hb=dd47e4e2ea55f01235c20bed8e07d69fb51c292e;hp=87f77583b3311abed99d4422698288a4e3f816a0;hpb=30d75a0778d825fa13eecea7d352eedfe35bd4ed;p=vswitchperf.git diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index 87f77583..9382edef 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -354,9 +354,22 @@ class IVnfQemu(IVnf): '/DPDK/app/test-pmd') self.execute_and_wait('make clean') self.execute_and_wait('make') - self.execute_and_wait('./testpmd -c 0x3 -n 4 --socket-mem 512 --' - ' --burst=64 -i --txqflags=0xf00 ' + - '--disable-hw-vlan', 60, "Done") + if int(S.getValue('GUEST_NIC_QUEUES')): + self.execute_and_wait( + './testpmd {} -n4 --socket-mem 512 --'.format( + S.getValue('GUEST_TESTPMD_CPU_MASK')) + + ' --burst=64 -i --txqflags=0xf00 ' + + '--nb-cores={} --rxq={} --txq={} '.format( + S.getValue('GUEST_TESTPMD_NB_CORES'), + S.getValue('GUEST_TESTPMD_TXQ'), + S.getValue('GUEST_TESTPMD_RXQ')) + + '--disable-hw-vlan', 60, "Done") + else: + self.execute_and_wait( + './testpmd {} -n 4 --socket-mem 512 --'.format( + S.getValue('GUEST_TESTPMD_CPU_MASK')) + + ' --burst=64 -i --txqflags=0xf00 ' + + '--disable-hw-vlan', 60, "Done") self.execute('set fwd ' + self._testpmd_fwd_mode, 1) self.execute_and_wait('start', 20, 'TX RS bit threshold=.+ - TXQ flags=0xf00') @@ -384,17 +397,23 @@ class IVnfQemu(IVnf): """ self._configure_disable_firewall() - self.execute('ifconfig ' + self._net1 + ' ' + - S.getValue('VANILLA_NIC1_IP_CIDR')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_NIC1_IP_CIDR')[self._number] + + ' dev ' + self._net1) + self.execute('ip link set dev ' + self._net1 + ' up') - self.execute('ifconfig ' + self._net2 + ' ' + - S.getValue('VANILLA_NIC2_IP_CIDR')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_NIC2_IP_CIDR')[self._number] + + ' dev ' + self._net2) + self.execute('ip link set dev ' + self._net2 + ' up') # configure linux bridge self.execute('brctl addbr br0') self.execute('brctl addif br0 ' + self._net1 + ' ' + self._net2) - self.execute('ifconfig br0 ' + - S.getValue('VANILLA_BRIDGE_IP')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_BRIDGE_IP')[self._number] + + ' dev br0') + self.execute('ip link set dev br0 up') # Add the arp entries for the IXIA ports and the bridge you are using. # Use command line values if provided.