+ exec_cmd_no_error(
+ self._node, "echo '{out}' | sudo tee {running}".format(
+ out=src.safe_substitute(**kwargs), running=running))
+
+ def create_kernelvm_config_testpmd_io(self, **kwargs):
+ """Create QEMU testpmd-io command line.
+
+ :param kwargs: Key-value pairs to construct command line parameters.
+ :type kwargs: dict
+ """
+ testpmd_cmd = DpdkUtil.get_testpmd_cmdline(
+ eal_corelist='0-{smp}'.format(smp=self._opt.get('smp') - 1),
+ eal_driver=False,
+ eal_in_memory=True,
+ pmd_num_mbufs=16384,
+ pmd_rxq=kwargs['queues'],
+ pmd_txq=kwargs['queues'],
+ pmd_tx_offloads=False,
+ pmd_disable_hw_vlan=False,
+ pmd_max_pkt_len=9200 if kwargs['jumbo_frames'] else None,
+ pmd_nb_cores=str(self._opt.get('smp') - 1))
+
+ self._opt['vnf_bin'] = ('{testpmd_path}/{testpmd_cmd}'.
+ format(testpmd_path=self._testpmd_path,
+ testpmd_cmd=testpmd_cmd))
+
+ def create_kernelvm_config_testpmd_mac(self, **kwargs):
+ """Create QEMU testpmd-mac command line.
+
+ :param kwargs: Key-value pairs to construct command line parameters.
+ :type kwargs: dict
+ """
+ testpmd_cmd = DpdkUtil.get_testpmd_cmdline(
+ eal_corelist='0-{smp}'.format(smp=self._opt.get('smp') - 1),
+ eal_driver=False,
+ eal_in_memory=True,
+ pmd_num_mbufs=16384,
+ pmd_fwd_mode='mac',
+ pmd_eth_peer_0='0,{mac}'.format(mac=kwargs['vif1_mac']),
+ pmd_eth_peer_1='1,{mac}'.format(mac=kwargs['vif2_mac']),
+ pmd_rxq=kwargs['queues'],
+ pmd_txq=kwargs['queues'],
+ pmd_tx_offloads=False,
+ pmd_disable_hw_vlan=False,
+ pmd_max_pkt_len=9200 if kwargs['jumbo_frames'] else None,
+ pmd_nb_cores=str(self._opt.get('smp') - 1))
+
+ self._opt['vnf_bin'] = ('{testpmd_path}/{testpmd_cmd}'.
+ format(testpmd_path=self._testpmd_path,
+ testpmd_cmd=testpmd_cmd))